[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help hooking up my working EGL written Web Service with your EXAMPLE19



On 9/13/2010 12:17 PM, Adrian wrote:
> Scott, I have built some simple off line web services which take 1 or
> more parms and do some work on a database and then return an XML
> string response something like as follows:
>
> return (string):
>   <Response><Status>1</Status><StatusMsg></StatusMsg><TranRef>  000000030
>   2</TranRef></Response>

Seems pretty basic/straightforward.

> As a business we are new to the use of web services and building them.
> The problem I'm having is knowing quite how to retrofit a service
> which is using different parameters or perhaps more or fewer
> parameters than your example is built for.

Sorry to hear that this is hard.  Please describe how it can be made 
clearer for you?


> In fact one such web service processes some extremely large strings
> which are SOA messages and these can be many Kilo bytes in size. Am I
> correct in thinking that the input parameters are always embedded as
> part of the SOAP body rather than on the call to the API?

That depends on the web service you're running. In a SOAP web service, 
all of the data that's exchanged is encapsulated in the SOAP message.

But other types of web services (most notably REST) will use data in the 
URI instead.


> My web services are deployed to a WAS server running on our iSeries
> development machine and it would be a massive benefit to be able to
> call these EGL built and deployed web services directly from RPG.

We'll see what we can do...


> The end point URL I�m confident I have correct but as mine is not a
> .Net environment or service I�m unsure where I will find the correct
> value for the second URL, the one known as the SOAP Action, indeed
> when I look at my automatically built WSDL file I have an xml
> structure which looks like the one I see in the WSDL for the language
> translation programme (EXAMPLE19) but mine is an empty pair of quotes
> and is not populated with a value as yours is.

HTTPAPI doesn't care whatsoever what your set the SOAPAction to, or even 
whether you supply one.  The SoapAction is purely for the benefit of the 
server you're talking to.

If your server wants an empty SoapAction (two quotes with nothing 
between) feel free to send that.  There is no requirement that your code 
be exactly like EXAMPLE19!

> I don�t know whether I should change my WSDL (my service works just
> fine as it is) or weather I need to look elsewhere for this value.

Calling a web service with HTTPAPI is all about knowing what the server 
requires, and sending it. HTTPAPI aims to be flexible enough to handle 
any type of data required.  Every web service is different, and I'm 
sorry that the examples I picked don't happen to match your environment 
-- I tried to pick examples that would be close to what people need, but 
it's hard when everyone's needs are different!

I definitely would NOT change the WSDL.  (You'll make the WSDL 
incompatible with the actual web service, and make it useless.)  I also 
wouldn't try to change the service to match EXAMPLE19.

Instead, I'd just do what your web service requires.  Run your WSDL 
through SoapUI, see what the SoapAction and SOAP messages look like. Try 
it out, kick the tires from within SoapUI, get a feeling for what needs 
to be sent/received.

Once you know that, copy/paste your XML messages into an RPG program, 
and use HTTPAPI to send/receive them.


> So how should EXAMPLE19 look if I want to pass in three parameter and
> can it handle parameters which can be 20K strings (these will contain
> SOA compliant XML messages typically). I will happily share more
> specific detail if this helps, just tell me what you need to see and
> it shall be done?

I really can't approach it from the "changes to EXAMPLE19" angle.  You 
really need to start by knowing what _you_ require, rather than 
re-imagining an existing web service to come up with something hypothetical.

Every web service is different.  Why should I invent a whole new web 
service that's sort-of like EXAMPLE19?  That would take me a TON of 
time, and still might not be useful to you.  Instead, please use the 
WSDL of _your_ service to know what you need for _your_ service.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------