[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Where is the SOAP response found
Mike,
The SOAP response is not written to the IFS but parsed by eXpat at the time
it arrives at the client. The stub module registers and uses eXpat callback
procedures to store the incoming response values into standard RPG data
structures.
Given that you use WSDL2RPG v1.15, example 1 (WS000101T) shows that the
generated stub module returns a data structure to the test program:
*
* Response message
* This structure contains the result values returned by
* the web service.
D CityStateToZipCodeResponse...
D DS likeds(s0_CityStateToZipCodeRespon...
D se_t)
D inz
CityStateToZipCodeResponse =
ZipCodeSoap_CityStateToZipCode(
parameters:
errText);
At the end the response values can be found in data structure
"CityStateToZipCodeResponse".
Basically I agree with Scott, that it is better to use HTTPAPI directly
instead of WSDL2RPG, in case you want to store the SOAP response message in
the IFS and parse it later on. However if you really want to do it with
WSDL2RPG you may change the generated stub module by hand. The statement in
question is http_url_post_raw2(). Instead of forwarding the response stream
to procedure HTTP_receive response() you may consider to direct it to
write() like this:
fd = open(fileName: ...);
rc = http_url_post_raw2(
url
: hInpStream
: %paddr('WSDL2R87_ManagedMemoryDataSource_InputStream_read')
: ManagedMemoryDataSource_getSize(hDataSource)
: fd
: %paddr('write')
: getTimeout()
: getUserAgent()
: '');
callp close(fd);
Does that help you?
Regards,
Thomas.
Am 12.09.2012 16:44, schrieb MThronson@xxxxxxxxxxxxxxxxx:
Sorry, The question is "Where is the SOAP response found?" No when.
Mike Thronson
|------------>
| From: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|MThronson@xxxxxxxxxxxxxxxxx |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|ftpapi@xxxxxxxxxxxxxxxxxxxxxx |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|09/12/2012 09:29 AM |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|Where is the SOAP response found |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Sent by: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
I am working on my first application using WSDL2RPG and HTTPAPI.
I have a service program and a callable program created using WSDL2RPG that
are basically unchanged from what was generated. My question is when the
SOAP response found?
I would like the response to end up on the IFS so I can parse it in another
RPG program.
Thanks.
Mike Thronson
Sr. Programmer/Analyst
Heartland Coop
2829 Westown Parkway
Suite 350
West Des Moines, IA 50266
515.225.1334 Ext. 5203
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------