IBM System i
--
Questions
--
Followers
Top Experts
I did create a webservice client form an existing wsdl, using the IBM "wsdl2rpg.sh" tool.
"/QIBM/ProdData/OS/WebServ
But the result was to complex to understand what I had to do to use it.
So I create an own service wit only 2 values in and 1 value out.
But still I have no clue where to start.
The result of the wsdl2rpg is:
14 C-sources,
1 Cl-source,
2 Rpgle-sources,
3 Rpgleinc-sources
I understand that de CL is compiling the C-sources and create the service program.
But I need some info about how to use the result of the wsdl2rpg generation.
I used the attached WSDL for this test.
(expected output value is Input1 + input2)
MyWs.wsdl
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
There is a whole manual on this tool. IT should answer just about any question you might have:
ftp://public.dhe.ibm.com/systems/support/i/iws/systems_i_software_iws_pdf_WebServicesClient_new.pdf
Also, here is a tutorial that walks you though the process of using wsdl2rpg using a simple example:
https://www.mcpressonline.com/programming/rpg/cool-things-ile-rpg-as-a-web-services-client
Found a WSDL on "http://currencyconverter.kowabunga.net/converter.asmx?WSDL",
it's not 100% the same but I was able to create a test program.
It's not working yet, but I understand the idea :-)
The only response I get from the WS-Call is an error:
"HTTPTransportException: HTTP transport error.■Server sent HTTP error: 'Forbidden'■"
Because I am able to get a response from WS with SoapUI it isn't a protected server.
It was possible to grab the wsdl from this server with wsdl2rpg.sh, so I assume it is also not a authorization issue on the AS/400.
Is there any log available where I can find the details about this error?






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
https://httpstatuses.com/403
The relevant log would be on the server. If you want client-side logging, you'd have to write that. Suggest you debug and view the url and request you are constructing.
Please post your code, and the working SoapUI request.
The stubs are generated from url : http://currencyconverter.kowabunga.net/converter.asmx?WSDL
The result of the attached RPG is:
WS_DS.HANDLE = SPP:0000800047154DD0
WS_DS.EXCOCCURRED = '1'
WS_DS.EXCCODE = 51
WS_DS.EXCSTRING = HTTPTransportException: HTTP transport error.■Server sent HTTP error: 'Forbidden'■
RPg-Line 19 "stub_create_ConverterSoap
I get an WS_DS.HANDLE value, so that seems to be correct (and available).
The attachment with SoapUI data contains the expected result.
But I really need to caal external services, so I tried an other one.
The result is now:
HTTPTransportException: Cannot initialize a channel to the emote end.■GSKit Error is 202 - Key database file was not found.
I understood that it is a certificate issue (far beyond my kowledge-area)
So I copied an example and it seems to do something.
axiscStubSetSecure(ws_ds.h
the new error is:
HTTPTransportException: HTTP transport error.■Server sent HTTP error: 'Bad Request'■
Because I dont know what I am doing, nor what the SetSecure is doing for me, I have really can't no idea what is wrong.
Could be data, could a certificate or something else.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
HTTPTransportException: Cannot initialize a channel to the emote end.■GSKit Error is 202 - Key database file was not found.
Looks like you're trying to connect to a service that requires SSL, but you didn't configure for SSL.
Then you called SetSecure to provide the local certificate database
axiscStubSetSecure(ws_ds.handle:'/QI BM/USERDAT A/ICSS/CER T/SERVER/D EFAULT.KDB ':'':'':'N ONE':'NONE ':'':'':'' :'true');
Now you are successfully connecting, but you are sending an invalid request to the web service host.
If you can provide a trace log (mask out anything private), we might be able to provide more help.
How can I make (or where can I find) a trace log?
The function axiscAxisWriteTrace() is not available in RPG, but axiscAxisStartTrace() is logging the whole process, and pointed me to the right direction.
I couldn't find this in the manual, but defining a Data-structure with LikeDs(), from a imported template, is requiring an inz option.
Without that, the result is unpredictable.
SO the first WS is running 10 other to go :-)
THANKS!!!!!!!!






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
IBM System i
--
Questions
--
Followers
Top Experts
IBM i, formerly known as AS/400, is a proprietary, midrange, object-based operating and application system. It includes a relational database, a menu-driven interface, support for multiple users, block-oriented terminal support and printers, and supports security, communications, and web-based application servers including Websphere, Apache and Tomcat.