We are generating xml using a web service(cobol code) in which we are doing an XML GENERATE to generate xml from a copybook. Now this generated XML consists of special characters like [·, Ý, ¨] which show correctly in SOAP response. But when the same message is viewed in http logs, the characters get converted to HEX like below : SOAP Response:
<StatusDesc>capital one bank Ýusa¨ ,n.a</StatusDesc>
Http Log:
<StatusDesc>capital one bank [0xc3][0x9d]usa[0xc2][0xa8] ,n.a</StatusDesc>
Now to handle this we tried to do an XML GENERATE using the WITH ENCODING 1208 clause to support the UTF-8 encoding. This in turn generated the XML in unreadable format, and nothing was readable in SOAP response. So not sure if we are missing out on anything here or is this not how we should be handling the HEX characters in http log.
?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:mes="http://MessageView/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body>mes:ÃŒ_%€ÎÃÂÊËÑ?>‚‘‚€ÃÂ>Ä?ÀÑ>łÃÂè㘂ž ÄÄÈñ>Ã?ñ>Éê˞ìëÈ/ÈÃÂ˞ëÈ/ÈÃÂËä?ÀÞ‘™ÂÂëÈ/ÈÃÂËä?ÀÞëÃÂÊÎÃÂÊëÃ
The question is that is there a way to handle these characters so that the hex characters in the http log get converted to their proper display. Should this be done in Cobol web service or do we need some kind of conversion to handle the http logs outside z/os.