IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Insert this line in the header of the generated SOAP message


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
f_caballero

New User


Joined: 11 Mar 2010
Posts: 5
Location: Spain

PostPosted: Thu Mar 11, 2010 2:52 pm
Reply with quote

Hi!
I have installed a requester web service in CICS.
My COBOL application runs INVOKE WEBSERVICE to send the SOAP request to web service provider.

The provider has problems to understand some characters in the message because the message does not include the first record with the text: '<?xml version="1.0" encoding="UTF-8"?>'.

The question is:
Is it possible to insert this line in the header of the generated SOAP message?

I have reviewed manuals and documentation but I do not found some article that gives me a way to do it.

Thanks a lot in advance.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 11, 2010 5:56 pm
Reply with quote

Are you using XML GENERATE? If so, WITH ENCODING 1208 will generate UTF-8 characters (it took less than 3 minutes in the COBOL manuals linked at the top of the page to find this out). If not, you're going to need to read section 1.7.6 of the COBOL Programming Guide (manuals link at the top of the page), and you will probably run into a number of other issues along the way.

Just inserting the text string is worthless if the data you're passing is not UTF-8 format, which has a variable number of bytes per character. So not only do you need to insert the string but you must ensure the message uses the appropriate codepage.
Back to top
View user's profile Send private message
f_caballero

New User


Joined: 11 Mar 2010
Posts: 5
Location: Spain

PostPosted: Thu Mar 11, 2010 7:01 pm
Reply with quote

Thanks for your response Robert.
The COBOL program does not generate the XML message.
CICS facilities of Webservices generate the XML:
- DFHWS2LS batch job to generate COBOL COPYS and WSBIND file from the Web Services Description Language (WSDL) file that describes the SOAP messages.
- Requester PIPELINE to manage the format conversions and communication with the Web service provider.
- And EXEC CICS INVOKE WEBSERVICES ..... to communicate mainframe application in COBOL and Web services.

So, the generation of XML code is out of scope for the COBOL program.


Regards.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 11, 2010 7:06 pm
Reply with quote

So either you don't need to do anything in the COBOL program, or you need to find out how to change DFHWS2LS or the WSDL to use UTF-8. As I said, just putting the encoding in a heading doesn't do anything for you. The heading should be automatically generated by the WSDL or DFHWS2LS -- if not, you need to find out why not.
Back to top
View user's profile Send private message
f_caballero

New User


Joined: 11 Mar 2010
Posts: 5
Location: Spain

PostPosted: Thu Mar 11, 2010 8:22 pm
Reply with quote

I think as you, and I have reviewed about the WS2LS parameters.
From the beginning I have suspected that he was something that had relation with the treatment of the WSDL file.
My knowledge about this is very limited and I can not found the "magic word" that makes appear, or disappear, the head line.
I have investigated about the headers handlers and I think that I can include a COBOL program, executed from the configuration of the CICS PIPELINE to insert the first line in the container that takes the message.

Thanks again.
Regards.
Back to top
View user's profile Send private message
f_caballero

New User


Joined: 11 Mar 2010
Posts: 5
Location: Spain

PostPosted: Fri Mar 26, 2010 10:17 pm
Reply with quote

Hi again, the case has been closed and solved.
This the "magic word":
Use "CCSID=1145" during wsbind file generation by runing DFHWS2LS.
That does no insert the heading line "<?xml version="1.0" encoding="UTF-8"?>"; it is not really necessary.
The problem was we are using the CICS default code-page "037" that does not include the Spanish local character "Ñ".
I think I have to improved my ability to read in English (and to write too, of course).
Thanks and bye.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
This topic is locked: you cannot edit posts or make replies. how can I proof that message was post... Java & MQSeries 1
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts IMS Message : DFS3577A IMS DB/DC 4
No new posts rewrite same SAY line CLIST & REXX 8
Search our Forums:

Back to Top