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

Invoking webservice - Requester Mode


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
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
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

Global Moderator


Joined: 21 Sep 2010
Posts: 2727
Location: NYC,USA

PostPosted: Thu Aug 21, 2014 3:00 am
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
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts CICS webservice - Flexible Interface CICS 0
No new posts getting RC=3650 when invoking REXX wi... CLIST & REXX 7
No new posts FIELDS OVERLAPPING WITH MODE = IN OR ... CICS 3
No new posts Issue while reading a file in browse ... TSO/ISPF 7
No new posts Invoking a CICS transaction from a no... CICS 7
Search our Forums:

Back to Top