I am using CICS as web client and requesting an HTTP Server through CICS Web Converse Command. The request has performed using Cobol program (no URImap Involved) and in text/xml format. The CICS request is as follows.
EXEC CICS WEB OPEN
EXEC CICS WEB CONVERSE
QUERYSTRLEN (LENGTH OF MY-QUERY-STRING)
EXEC CICS WEB CLOSE
HOST: is the URL address used.
I received the response for the above request from the HTTP Server at the variable WS-HTTP-RESP. The details are as follows.
The query is, may i know what would be first 3 bytes represents. While i am trying to parse the xml system throwing an error message stating unacceptable characters at the xml string.
When i try to understand from the Webconverse command explanation [url](https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.5.0/reference/commands-api/dfhp4_webconverse.html)[/url] not able to find out (may be i am wrong).
The first 3 characters are :
Any suggestions please.
Note: (By removing first 3 bytes, system successfully parse the xml which received at the field WS-HTTP-RESP)
I use CICS container support and SOAP or REST to handle the XML. IBM has message handlers for the client pipelines. It's much easier to support and maintain.
CHANNELS and CONTAINERS , You can use it here as well for HTTP service but its optional hence in INTO we don't see that in this case and specify xml type in MEDIATYPE. I hope that's what you meant to say when you said about CONTAINER support.
How about trying with NOCLICONVERT ? or do you have same issue when you do SEND and RECEIVE? Also did you explore BODYCHARSET option?
I was already tried with the option NOCLICONVERT, the result is same. I noticed the same three characters with or without using NOCLICONVERT option.
I did tried with the SEND and receive, but it got failed. Looks to me CICS created some inbuilt headers while sending the request to HTTP server during the process. I think i need to use HTTPHEADER command to include them properly and format them before i sent the request.
I will explore the BODYCHARSET option and post the results.
Specifies the data content of any message body provided, for example text/xml. You must specify a 56-byte area for MEDIATYPE. The media type is up to 56 alphanumeric characters, including appropriate punctuation, but not spaces. For more information on media types, see IANA media types and character sets . CICS checks that the format of the media type is correct, but does not check the validity of the media type against the data content. CICS uses this information to produce the Content-Type header for the message.
For requests that require a body, you must specify the MEDIATYPE option. There is no default. However, if the required Content-Type header must contain spaces or more than 56 characters, the application can provide it using the WEB WRITE HTTPHEADER command. In this case, do not specify the MEDIATYPE option.
The supplied media type is used to determine whether code page conversion is required under the following circumstances:
If you are sending a message from a buffer, using the FROM option, and the CLIENTCONV and CHARACTERSET options are not specified.
If you are sending a message from a document, using the DOCTOKEN option, and the CLIENTCONV and CHARACTERSET options are not specified.
If you are sending a message from a named container, using the CONTAINER option, and either CLICONVERT is specified, or the CLIENTCONV and CHARACTERSET options are not specified.
If the supplied media type is text, the message is converted. If the supplied media type is nontext, the message is not converted.