Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Invoking webservice - Requester Mode

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
ask2sudhir.ibm

New User


Joined: 24 Aug 2012
Posts: 7
Location: india

PostPosted: Wed Aug 20, 2014 5:27 pm    Post subject: Invoking webservice - Requester Mode
Reply with quote

Hi,

I am trying to implement CICS as web service requester.

But we are not able to have any success yet.
Below is code and copybooks its a simple hello world program.

First thing I am struggling with is the CONT and NUM variables generated from DFHWS2LS I am not sure what to do with those variables.

Please have a look at the code and copybook and please let me know what is going wrong.

I am getting DFHPI0000000 something in output from SEND TEXT in my code after doing GET container.

Program + copybook + WSDL are attached.

Copybooks

input
05 sayHello.

10 arg0-num PIC S9(9) COMP-5 SYNC.
10 arg0-cont PIC X(16).


01 HELLOI01-arg0.
05 arg0 PIC X(255).

output

05 sayHelloResponse.

10 Xreturn-num PIC S9(9) COMP-5 SYNC.
10 Xreturn-cont PIC X(16).


01 HELLOO01-Xreturn.
05 Xreturn PIC X(255).


any help is much appreciated.
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Thu Aug 21, 2014 3:00 am    Post subject:
Reply with quote

Sudhir,

I don't see anywhere FLENGTH is getting calcuated during the PUT and GET so may that be the reason and also review right container name is passed while you do a GET.
Back to top
View user's profile Send private message
ask2sudhir.ibm

New User


Joined: 24 Aug 2012
Posts: 7
Location: india

PostPosted: Thu Aug 21, 2014 10:24 am    Post subject: Invoking webservice - Requester Mode
Reply with quote

Hi Rohit,

When I put the code in XPED the container name while doing GET is correct.
Also I have not put FLENGTH I know but I am not getting any error as well while running the program because of that.

The issue is I am not passing the data correctly to webservice in SOAP message. I am passing NULL to it.

And in return I am getting some junk value like DFHPI00000 of 20 bytes in output after doing a get container.


My doubt is that I am not handling these varibale NUM and CONT in copybooks correctly. As I have not coded such program before.

Still looking for help and direction to resolve this.
Back to top
View user's profile Send private message
ask2sudhir.ibm

New User


Joined: 24 Aug 2012
Posts: 7
Location: india

PostPosted: Thu Aug 21, 2014 8:35 pm    Post subject: help required - Invoking webservice - Requester Mode
Reply with quote

Could someone please advice what I am missing here as I am still struggling to get it correct.
Back to top
View user's profile Send private message
koppineedi

New User


Joined: 19 Sep 2007
Posts: 7
Location: chennai

PostPosted: Fri Aug 22, 2014 8:17 pm    Post subject:
Reply with quote

Can you share the structure of output - TESTOUT

Regards,
Hari
Back to top
View user's profile Send private message
ask2sudhir.ibm

New User


Joined: 24 Aug 2012
Posts: 7
Location: india

PostPosted: Fri Aug 22, 2014 10:06 pm    Post subject: Reply to: Invoking webservice - Requester Mode
Reply with quote

Here are the copybboks for input and output

Copybooks

input
05 sayHello.

10 arg0-num PIC S9(9) COMP-5 SYNC.
10 arg0-cont PIC X(16).


01 HELLOI01-arg0.
05 arg0 PIC X(255).

output

05 sayHelloResponse.

10 Xreturn-num PIC S9(9) COMP-5 SYNC.
10 Xreturn-cont PIC X(16).


01 HELLOO01-Xreturn.
05 Xreturn PIC X(255).
Back to top
View user's profile Send private message
koppineedi

New User


Joined: 19 Sep 2007
Posts: 7
Location: chennai

PostPosted: Mon Aug 25, 2014 8:20 pm    Post subject: Reply to: Invoking webservice - Requester Mode
Reply with quote

NUM field is used to check whether we have any data present in the container.


EXEC CICS GET CONTAINER(WS-CONTAINER-NAME)
CHANNEL(WS-CHANNEL-NAME)
INTO(sayHelloResponse)
END-EXEC

when you get the response into container, use the proper response container.(Xreturn-cont)

If Xreturn-num > 0

EXEC CICS GET CONTAINER(Xreturn-cont)
CHANNEL(WS-CHANNEL-NAME)
INTO(HELLOO01-Xreturn)
END-EXEC

end-if.

Regards,
Hari
Back to top
View user's profile Send private message
ask2sudhir.ibm

New User


Joined: 24 Aug 2012
Posts: 7
Location: india

PostPosted: Wed Aug 27, 2014 11:44 am    Post subject: Invoking webservice - Requester Mode
Reply with quote

Thanks Hari!!!
Finally I was able to get it correct. The issue was I was putting the data in wrong container and I was passing NULL to web service.

Also when we get response of web service we need to do GET container twice.

First GET will get the container name where the response is. And this container is the one which is in output copybook with name as -cont.

So we need to populate the first container from the area where we are putting the actuall data which we want to pass to web service.

Next put is for putting the whole structure into memory spaces.

Thanks
Sudhir
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 Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts Invoking CA 7 commands through REXX kenshin CLIST & REXX 10 Fri Aug 12, 2016 9:33 pm
No new posts Invoking SAS in Mainframe mkk157 All Other Mainframe Topics 3 Thu Jun 02, 2016 1:12 pm
No new posts Invoking a CICS program through LINK P Srinivasan CICS 10 Mon Apr 18, 2016 8:55 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us