Invoking web services from ILE (RPGILE or C)

HolderAndrew

Well Known Member
Hi List,

we are evaluating various methods for invoking web services as part of a 9.1 upgrade plan from Xe and was hoping that someone out there may have experience of calling web service from RPGILE or C program on iseries (we are V7.2 at moment). We have seen some high level IBM documents (which is a good sign that this can be done!) but if someone has some practical experience of how this can be done (avoiding the pitfalls!) then I would be extremely grateful.

The area that we are concentrating on is to cover integrations which are currently using native iseries comms/objects (sockets, C & RPGILE). We are doing PoC to test whether webservice calls can support the business volumes involved so any advice or experience on performance would also be very helpful.


Many thanks

Andrew
 
Andrew,

Just curious ... are you looking to interface with E1 from native iSeries code? or looking to call an external web service?

If it's the former, you may find XML Call Object to be simpler and certainly more direct. That is also assuming your ultimate goal is to call a E1 BSFN.

Craig
 
Thanks for reply Craig.

It could be both, depending upon the interface. But certainly one of the main goals is to ultimately call the std apis (via E1 BSFN) to control inserts to the subsystem table (SVM910/F986113). If this could be done via XML Call Object (I am not familiar with this so excuse my ignorance) then great. I was hoping that there might be some std method to do this (ie. invoke subsystem UBEs) from iseries but as it is blue stack I doubt that Oracle would make it too easy for us! It would be nice if somebody out there said that they have done this and could advise so that we can get a heads up on best way to do it. Our fallback soln may be to invoke SQLRPGILE to do simple inserts directly to SS table (as I have described in other thread) but obviously this is not an ideal soln and not officially supported.

Brgds
Andrew
 
I'm certainly an advocate for calling the APIs to properly initiate the process. You could write a native C iSeries object that includes the JDE headers and links to the JDE libs. That could take parameters for user/password/env plus whatever key info you need for the subsystem. Then just call the API and it as if this were done from an APP or UBE etc. That would be a stand alone solution for one specific subsystem (or whatever JDE actions you want to take), but you could get clever and genericise it somewhat.

Another option is to create a iSeries object that calls the XMLCallObject API. The function you want to call is specified through the XML document you pass and the returning response document is the results. That is totally generic and leaves the implementation to the caller of this callobject utility and the function that is called.

Either way an iSeries CL or RPG program can call this object and execute something within the E1 realm.

just some thoughts ...
Craig
 
Thanks again.

that sounds really good, I'll try and hunt an example to look at , this sounds like most efficient solution if it works. I dont suppose someone out there might have an example that they could share? :)


Brgds
Andrew
 
If you look in the interop guide from Oracle as well as on Oracle support you can find several examples of using XML CallObject. Its pretty simple and straight forward. Keep in mind there will be a little setup needed on the Enterprise server to support XML CallObject requests. We have used XML CallObject quite extensively for years for many of our applications written outside of the JDE toolset. In fact our highest transaction system (our Point of Sale application) uses XML CallObject. We have also purchased products from 3rd party Oracle partners that utilize XML CallObject as an interop solution.
 
Great point by Brian ... the XMLCallObject interface is used by several supported 3rd party products. I wouldn't think that ability would disappear at some tools release without a warning. Point being, be comfortable with it as a technical solution.

Craig
 
Hi all,

thx for you input on this. I have now managed to get BSSV calls working from iseries, there is a good guide on how to do this at http://www.ibm.com/developerworks/ibmi/library/i-amrawsdl2rpg/ which if you follow well gets you very close. Then there is a Web Services Guide for ILE programming that helps to get you past the winning post! The last obstacle that I had to fiddle with were the SOAP headers but if you put the trace on to see the logs (as described in the programmer guide) and compare against SOAPUI std E1 WSDL stuff, it becomes clear at the end! Good luck with whoever tries this, but this does offer us at least a lot of new integration possibilities with 9.1. Exciting stuff!
 
Back
Top