WSDL2RPG - change URL after creation of client pgm

Discussions related to HTTPAPI (An HTTP Client Package for RPG programming.) http://www.scottklement.com/httpapi/
Post Reply
chef
Posts: 3
Joined: Wed Nov 23, 2022 7:19 am

WSDL2RPG - change URL after creation of client pgm

Post by chef »

Several client programs (generated from Raddatz-WSDL2RPG) have been tested as aimed at one server, for which they were generated (according to each WSDL). Now I would like to aim the same client programs at a different server, without having to re-generate the client programs (using command WSDL2RPG). Is this as simple as changing the url in module WSS000x (the value of named constant cURL), re-compiling WSS000x, re-creating the service pgm using the new module, and re-creating the client pgm using the new service pgm? Or will that not suffice? If not, can this be done some other way? If so, how?

Thanks for your consideration.
Scott Klement
Site Admin
Posts: 658
Joined: Sun Jul 04, 2021 5:12 am

Re: WSDL2RPG - change URL after creation of client pgm

Post by Scott Klement »

That sounds like it'd work -- as long as you know that the endpoint URL is the only thing that is different...

Otherwise, you could re-generate your code from the updated copy of the WSDL that has the new endpoint that you'd like to use.
chef
Posts: 3
Joined: Wed Nov 23, 2022 7:19 am

Re: WSDL2RPG - change URL after creation of client pgm

Post by chef »

Thanks for responding, Scott. You must be about the best person in the world to address this question, but I was not very confident that, out of all the things you must have to do, that you would even see this - let alone within a very short interval of time. So I am honored to have been given "the time of day" by the "real SK" - whose articles and PDFs I have read and learned from for - it must be at least a decade by now. You must be a wonderful and kindly gentleman.

I don't post much in online forums, as I am usually able to answer my own questions - but this one, I could not find anything online that came close - well, a few search engine "hits" but they were for other platforms/environments - like Java and other web service methods. Sorry for the double post, but I was not sure where it should go, and was hoping it wouldn't be buried where nobody would ever see it. I guess I could participate more, maybe to help others, like you do - some might benefit from that, as I have a lot of experience with different things mostly "400"-related - "traditional" RPG (III, -400, ILE IV, free-form), SQL, DB admin, sys admin, web site creation, web services, ERP packages, business analysis, spec writing, a lot of explaining and documentation - things like that.

But I take this occasion to tell you - you are so much appreciated and have helped me learn and be better able to produce for my clients - many times over the years. For example, I have used your HTTPAPI a few times for production applications, and many other tutorials from your web site, about . . . all sorts of things. Just so you know that there are others "out there" in cyber-space that "listen intently to what you say". I read where you had a serious health issue a few years ago - I hope you have recovered nicely. Take care, stay healthy, don't go "anywhere".

Love,
Cheffie
Scott Klement
Site Admin
Posts: 658
Joined: Sun Jul 04, 2021 5:12 am

Re: WSDL2RPG - change URL after creation of client pgm

Post by Scott Klement »

I disagree. The best person to answer this would be Thomas Raddatz who wrote WSDL2RPG. I have barely used it (mostly just for "play.") I tend to just use HTTPAPI directly.

Additionally, I haven't worked with a SOAP/WSDL web service in many years. I work with REST every day -- but SOAP has been mostly phased out everywhere that I do business with.
Post Reply