ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Consuming a WebServoces from Iseries

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Consuming a WebServoces from Iseries

    I have to consume a webservice to send an XML document from iSeries to .Net application. I have WSDL file and tried to use IBM product wsdl2ws.sh and also used Scott Klement's HTTP API but both ways are failing to produce any output. I know I have a valid and correct WSDL and I do not have any problem using these tools with other simple WSDL file. My first question is what else is out there (using RPGLE).
    I have also tried WebSphere(Java) to produce my classes . My question now is: what is my best option to consume a complicate webservice. What are other approaches?
    1- Write Java application
    2- Write C# application
    3- Buy a third party product totally on iSeries
    4- Anything else??

    We also do not have PHP technique and knowledge here.
    I appreciate your help in advanced.

    Thanks

  • #2
    Re: Consuming a WebServoces from Iseries

    If you are hitting the correct IP address and port for the webservice, then you shouldnt fail to get any output. Calling the webservice with incorrect parameters should still produce a response string from the web service. It just wont contain the info you are looking for, but there will be a standard Xml/Soap style response. IF you are not getting anything back, then the issue is likely ip address / port related.

    Look at the response code from the web service call. Most programmers call this variable RC. You would have used it on your post statement to call the webservice. If the response code is a -1, then that means that the IP & port combination is not valid. A -1 normally means that the system or application server for that address/port is either down, or one doesnt exist. A 500 response code means that a server listening to the IP and Port is responding, but that the webservice name is not found. This could be because their application server is down, or that the webservice name doesnt exist or is incorrect.

    If you are receiving a ZERO, that means the call was successful. This doesnt mean that you will receive the result string back that you want, but you should be getting back a result string with something in it.

    Writing the web service call in another language or another method isnt the issue. If you are getting a 500 or -1 response code, you will get it in java, or C#, or VB, or anything else. Those error codes will not magically disappear because you are calling the webservice via a different method or language.

    So check what you response code is first.
    Last edited by MichaelCatalani; February 3, 2012, 08:29 PM.
    Michael Catalani
    IS Director, eCommerce & Web Development
    Acceptance Insurance Corporation
    www.AcceptanceInsurance.com
    www.ProvatoSys.com

    Comment

    Working...
    X