Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Insert this line in the header of the generated SOAP message

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: Insert this line in the header of the generated SOAP message
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Mar 11, 2010 5:56 pm    Post subject:
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    Post subject: Reply to: <?xml version="1.0" encoding="UT
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: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Thu Mar 11, 2010 7:06 pm    Post subject:
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    Post subject: Reply to: <?xml version="1.0" encoding="UT
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts Default Message in Rexx cvnlynn CLIST & REXX 9 Wed Aug 02, 2017 12:38 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us