[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WSDL2RPG Response



Thanks for the quick thorough response.  Got to appreciate the knowledge you guys possess.


----- Original Message -----
From: Thomas Raddatz [mailto:thomas.raddatz@xxxxxxxxxxx]
Sent: Friday, January 13, 2012 05:21 PM
To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: WSDL2RPG Response

Rick,

the response field 'GetInfoByAreaCodeResponse' is defined like 
'tns_GetInfoByAreaCodeResponse_t':


D tns_GetInfoByAreaCodeResponse_t...
D                 DS                  based(pDummy)
D                                     qualified
D  GetInfoByAreaCodeResult...
D                                     likeds(tns_GetInfoByAreaCodeResult...
D                                     Mvd_t)


Hence the first parts of your qualified response field are:

   GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult


'GetInfoByAreaCodeResult' is defined like 'tns_GetInfoByAreaCodeResultMvd_t':


D tns_GetInfoByAreaCodeResultMvd_t...
D                 DS                  based(pDummy)
D                                     qualified
D  any                        1024A   varying


So eventually the one an only field you get back from the web service is:

   GetInfoByAreaCodeResponse.GetInfoByAreaCodeResult.any

That field contains an embedded XML document which has to be parsed in a 
second step after having received it:

       <NewDataSet xmlns="">
          <Table>
             <CITY>Wood Ridge</CITY>
             <STATE>NJ</STATE>
             <ZIP>07075</ZIP>
             <AREA_CODE>201</AREA_CODE>
             <TIME_ZONE>E</TIME_ZONE>
          </Table>
          ...
       </NewDataSet>

There are lots of posting describing how to parse an embedded XML string. 
WSDL2RPG cannot to that for you, because it does not know anything about 
the structure of the embedded XML. It is described at 'any' and hence can 
be made of any XML elements.

Thomas.


Am 13.01.2012 22:42, schrieb Rick Hill:
>     Hi Thomas,
>
>
>     Can someone give me an example of how to process the response from this
>     webservice (http://www.webservicex.net/uszip.asmx?WSDL)using
>     WSDL2RPG?   I'm getting lost in the response and result data structures
>     if I could see how the response should be for this one I could apply it
>     to others.    I have attached the generated stub and program.
>
>
>     Thanks for any help,
>
>     Rick
>
>
>
>
> -----------------------------------------------------------------------
> 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
-----------------------------------------------------------------------