Business Scenario: In Multi-System Environment There is growing need to Communicate and exchange information with Other system without impacting current state of the existing System.
Solution: IBM has provided Utility WSDL2RPG which helps to create a stub ILE service program in RPG to allow you to consume a web-service.
MTR: Depending on Your OS400 Version ensure that the system is having these PTF’s
Once you’ve ensured that you have the appropriate PTF for your release installed, you’re ready to go. The Qshell script for WSDL2RPG is created.
Before you can execute the script, you’ll need the location of the WSDL document that describes the web service. That location can be either the HTTP location of the WSDL or a local WSDL document on the IFS.
The options available for this script are listed below:
Use Case: Requirement to Fetch the account information from Third Party and use the same in Transaction on the Native system.
WSDL Definition: https://somewebsite.com:8083/PY920/GetAccountIDManager?WSDL
As preliminary step we would Enter the Qshell command line by typing QSH at the command line
Thereafter we create a directory we intend to put Stubs and Source Code for Service programs.
Once you create the Stubs and Source Code for Service program in /e1int/Account
As shown below.
It would also create Service program ACCOUNT in E1INT1 Library
Next Step would be to write Client in RPGLE TO CONSUME the Third-party Service.
RPGLE would be required to construct the xml message and invoke the client method which would return desired result. In this use case Server expects following xml to provide desired response.
Write a Client GETACTID to achieve above step.
You can leverage using axiscAxisStartTrace API to capture logs which would enable to you trap in case of failures.
Common Pit falls: If you are connecting to secured webservice ensure that secure socket level protocols are correctly set for your IBM OS.
Your email address will not be published. Required fields are marked *
Join our mailing list to receive updates from our team