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

RE: Web Service Basics



Tom,

This looks like a standard request.

The gzip,deflate is not supported within HTTPAPI but that is usually negotiated between the client and the server and should not be a problem (ie, there will be no negotiation therefore gzip,deflate will not be used). BTW, those are just methods to compress the HTTP data. Some debate about whether it is "worth it" to compress and decompress on a box like the IBMi but very common on the PC level as the cpu is way fast enough to render the page without delay. It appears even mobile devices will benefit from gzip these days (shorter transmit/receive and fast enough CPU). 

The user and password appear to be part of the of the soap message. Assuming the user and password are standard characters, no special conversion is needed. The entire soap message is converted for you by HTTPAPI.

The NONCE might be an issue if you are supposed to generate that for each request but if it is "your NONCE", then pass it as they gave it to you. NONCEs are generally used one time and have to be created for each transaction according to a formula (often involving time and randomness).

The WSDL shows this service to have many transactions. If you only need the "get", doing it yourself will probably work fine. Otherwise, WSDLRPG might be helpful to create each method and help to parse the results.

Let it rip and see what you get.

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Tom Thomson
Sent: Tuesday, February 12, 2013 2:27 PM
To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Subject: Web Service Basics

Hello,

 

I want to consume a web service via http_url_post_xml.  The web service
provider sent me a sample request (below) and I believe this was generated
by the SOAP UI tool.  I see a number of things in the sample that I expect
will cause me headaches and are different, or new, from other services that
I have accessed using HTTPAPI.  "Accept-Encoding: gzip,deflate" - never
heard of it.  The security relating to sending the user name and password is
foreign to me.   I suspect the user name and password would first have to be
converted from EBCDIC to ASCII before putting into the soap message but that
is only a guess.  What else do you knowledgeable people see that is
troublesome?  Would the WSDL2RPG product be something very useful in this
case?

 

Regards,

-Tom

 

Sample request info below

 

POST https://stagingmembership.big4.com.au/MembershipService.svc/basic
HTTP/1.1

Accept-Encoding: gzip,deflate

Content-Type: text/xml;charset=UTF-8

SOAPAction: "http://tempuri.org/IMembershipService/Get";

Content-Length: 1049

Host: stagingmembership.big4.com.au

Connection: Keep-Alive

User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";

xmlns:tem="http://tempuri.org/";>

<soapenv:Header>

<wsse:Security soapenv:mustUnderstand="1"

xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
ty-secext-1.0.xsd"

xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd">

<wsse:UsernameToken wsu:Id="UsernameToken-11">

<wsse:Username>ad06ef56-0a50-45eb-bcbe-c4d4c983bb1f</wsse:Username>

<wsse:Password

Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token
-profile-1.0#PasswordT

ext">V6NtNUP2</wsse:Password>

<wsse:Nonce

EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-m
essage-security-1.0#Ba

se64Binary">RyWUxnYXdO2RToxI/3aJVg==</wsse:Nonce>

<wsu:Created>2013-02-11T04:56:39.129Z</wsu:Created>

</wsse:UsernameToken>

</wsse:Security>

</soapenv:Header>

<soapenv:Body>

<tem:Get>

<!--Optional:-->

<tem:memberNumber>1234567</tem:memberNumber>

</tem:Get>

</soapenv:Body>

</soapenv:Envelope>

 

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------