[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Consuming an internal web service
Sender: Thomas Raddatz <thomas.raddatz@xxxxxxxxxxx>
Gisbert,
WDSC can not help you, since it can not generate an RPG client stub for a given WSDL file. All it can
do is generate a Java client stub for a given WSDL file but no RPG.
However you may want to have a look at gSOAP which is a free utility dedicated to generate C client
stubs and/or server skeletons. I don't think you want to go to C, right? Nevertheless gGOAP can help
you since it also can generate sample soap messages. Forget about the C stuff and just take the sample
message.
You can get gSOAP here: http://www.cs.fsu.edu/~engelen/soap.html
Given that you installed gSOAP into directory "gsoap-win32-2.7" you have to run the following commands
to get the sample messages:
1) create a "temp" directory in "gsoap-win32-2.7"
2) open a DOS box and go to "gsoap-win32-2.7"
3) run wsdl2h to produce a special gSOAP header file
wsdl2h -otemp/KonverterPsKw.h http://localhost:9080/WS1UmrechnenPSinKW/wsdl/KonverterPsKw.wsdl
-o : output file = temp/KonverterPsKw.h
4) run soapcpp2.exe to create the C stub and the sample SOAP messages
soapcpp2.exe -C -L -Iimport -dtemp temp/KonverterPsKw.h
-C : generate client-side code only
-L : don't generate soapClientLib/soapServerLib
-I : use path(s) for #import
-d : use path to save files
Here is what you will get:
KonverterPsKwSoapBinding.umrechnenKwInPs.req.xml
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="http://pskw.tutorial.webservice.technowletter.de">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ns1:umrechnenKwInPs>
<aKW>0.0</aKW>
</ns1:umrechnenKwInPs>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
KonverterPsKwSoapBinding.umrechnenKwInPs.res.xml
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="http://pskw.tutorial.webservice.technowletter.de">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ns1:umrechnenKwInPsResponse>
<umrechnenKwInPsReturn>0.0</umrechnenKwInPsReturn>
</ns1:umrechnenKwInPsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
KonverterPsKwSoapBinding.umrechnenPsInKw.req.xml
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="http://pskw.tutorial.webservice.technowletter.de">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ns1:umrechnenPsInKw>
<aPS>0.0</aPS>
</ns1:umrechnenPsInKw>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
KonverterPsKwSoapBinding.umrechnenPsInKw.res.xml
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="http://pskw.tutorial.webservice.technowletter.de">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ns1:umrechnenPsInKwResponse>
<umrechnenPsInKwReturn>0.0</umrechnenPsInKwReturn>
</ns1:umrechnenPsInKwResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Hope this helps.
Thomas Raddatz.
Loecher, Gisbert schrieb:
Sender: "Loecher, Gisbert" <Gisbert.Loecher@xxxxxxxxxxxxx>
Hi there,
I started using LIBHTTP by working with examples 14 and 16 (requesting a web service) . I succeeded in creating
a modified version to request a simple internal web service.
In example 16 the XML file content is hard-coded (fields "access request" and "track request"), which might be error-prone.
Instead I would like to be able to use the WSDL file of the requested web service in order to create the XML file content automatically,
so that I can use it in my RPG program..
I understand that WDSC is able to do that for me, but that tool is so complex, I don't know where to start (without training).
is there a simple way in WDSC or outside of it to use a WSDL file to create all the XML file content? Can XML Toolkit for iSeries do that for me?
We will switch to V5R3 in April.
Thank you.
Gisbert Löcher
IT Development Department
______________________________________________
Nomura Bank (Luxembourg) S.A.
Direct Line: +352 463 888 312
Fax: +352 463 888 450
E-mail: gisbert.loecher@xxxxxxxxxxxxx
DISCLAIMER
The information contained in and contents of this e-mail including any attachment(s) (e-mail) are confidential and may be legally privileged. It is intended solely for the addressee only. If you are not the intended recipient, please notify Nomura Bank (Luxembourg) S.A. (Nomura) immediately by telephone and destroy and delete the message promptly from your computer. Any disclosure, copying, distribution, reproduction, dissemination, modification, publication or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this e-mail are those of the individual sender.
Nomura operates an e-mail usage policy for all staff. Any e-mail issued from Nomuras systems, which does not strictly relate to Nomuras business, may be in contravention of Nomuras email usage policy. Accordingly, Nomura accept no liability whatsoever arising in relation to any content of any e-mail which does not directly relate to Nomuras business or which purports to bind Nomura into any commitment unless you have been specifically notified that the individual sending such e-mail has formal authority to do so.
This e-mail has been screened for the presence of computer viruses. However, e-mail communication via the Internet can never be one hundred per cent secure and therefore Nomura cannot be held responsible for the accuracy, completeness or presence of a computer virus transmitted with this e-mail.
This e-mail is intended for informational purposes only and is not a solicitation or offers to buy or sell securities or related financial instruments.
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------