Hi Scott, I understand the HTTPAPI is working correctly and my thanks to you for providing the api's and your support. My experience with soap is fairly limited and the company I have been working with has been of limited help. I'm not sure if they can't find anybody on their side who knows what they are talking about or they are just dragging their feet but I am needing to complete this project. I have tried adding a xmlns:tem="http://tempuri.org/"> description but I receive a "400 bad request" message when I do. During one of my brief conversations they told me their site doesn't support temporary name spaces. If I go to http://soapclient.com/soaptest.html and use the wsdl https://incoming.paymentarchive.com/fileretrieval/fileretrieval.asmx?WSDL and paste <ItemQuery> <GetItemData> <BASICAUTHENTICATION> <USERNAME>FIDWEBSVC</USERNAME> <PASSWORD>397WSM4Z</PASSWORD> </BASICAUTHENTICATION> <RESPONSEFORMAT> <PAGINATION> <ROWSPERPAGE>20</ROWSPERPAGE> <PAGENUMBER>1</PAGENUMBER> </PAGINATION> <OUTPUTFIELDS> <OUTPUTFIELD FIELD="IRN" ORDERBY="NO"/> <OUTPUTFIELD FIELD="SEQNUM" ORDERBY="NO"/> </OUTPUTFIELDS> </RESPONSEFORMAT> <SEARCH> <SEARCHFIELDS> <SEARCHFIELD FIELD="IRN" OPERATOR="EQUALS"> <VALUE1>200812230802590000011</VALUE1> </SEARCHFIELD> </SEARCHFIELDS> </SEARCH> </GetItemData> </ItemQuery> into the SOAP Method: GetItemData and click on invoke it returns what I am looking for so I'm pretty sure the "payload" is correct. I know that xml is case sensitive so I am assuming they must be converting tags to upper or lower case. Funny thing I just noticed looking at the test page it has "s:string" to the right of the input field. Since I am getting a fault message "Parameter name: s" I wonder what is missing? Having said all that I'm hoping that you or someone can guess what everything else should look like because this soapclient.com is able to read the wsdl and get the soap request formatted correctly. I've attached my source this time. I realize that I have provided the user and password so I will change it once I get it to work. Thanks for your time, Bruce -----Original Message----- From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement Sent: Sunday, January 04, 2009 2:26 PM To: HTTPAPI and FTPAPI Projects Subject: Re: Need help Hi Bruce, Just to make we understand each other: HTTPAPI is working as expected. HTTPAPI's job is to send data via the HTTP protocol, and it's doing that correctly in this case. Your issue is in knowing exactly which data to ask HTTPAPI to send. Unfortunately, I don't know that myself, since I haven't used this particular service, and the WSDL has only limited information. So please understand that everything I say below is a *GUESS* and may be completely wrong or unrelated. The WSDL tells us that the SOAP request must be in the following format: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"> <soapenv:Header/> <soapenv:Body> <tem:GetItemData> <tem:ItemQuery> ... "payload" goes here ... </tem:ItemQuery> </tem:GetItemData> </soapenv:Body> </soapenv:Envelope> Please change your SOAP to match the above. Although I'm sure you've tried many ways, the one you posted does not have correct namespaces assigned to GetItemData and ItemQuery, so the one you posted is wrong. Use the above one, please. THAT part of the message, if nothing else, is spelled out in the WSDL, so we know what it needs to be. The big problem here is what to put in the "ItemQuery" tag. (where I put '"payload" goes here.') The WSDL doesn't tell us what to put there. So here are some guesses: a) Your ItemQuery contains XML tags, but not a complete XML document. I say that because an XML document (a valid one, at any rate) needs to be completely enclosed in an XML tag. i.e., the following is not valid: <parm1>Blah</parm1> <parm2>Blah</parm2> There has to be a tag that encloses the whole document, like this: <MyDocument> <parm1>Blah</parm1> <parm2>Blah</parm2> </MyDocument> The payload of your SOAP message looks like this: <BASICAUTHENTICATION>...</BASICAUTHENTICATION> <RESPONSEFORMAT>...</RESPONSEFORMAT> <SEARCH>...</SEARCH> There's no one tag that encloses the whole document, and therefore it's not a valid XML message. Still, it's possible that it's what the service expects -- but it seems very suspicious to me. b) Your XML tags (in the "payload") are in all capital letters. XML tag names are case-sensitive, so please be sure that the service wants them in all caps, as you've coded. In my experience, it's very unusual for an XML document to be in all caps as yours is. (It's certainly legal -- but very unusual, so it strikes me as suspicious) c) The most important thing from your log is the Soap:Fault. This is (supposedly) an error message that tells us what's wrong. Here's what yours says (reformatted to make it easier to read) <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>Server was unable to process request. ---> Value cannot be null. Parameter name: s</faultstring> <detail /> </soap:Fault> To me, this suggests that it's looking for a variable named 's' (could that be cut off? I don't know). And either that variable hasn't been passed, or it's empty/blank. Not exactly sure what that means, except that it's misinterpreting the XML document... could be capitalization, escaping, name spaces... or it could simply be that it's expecting an element named 's'. But, I thought it was worth examining... Bruce Reynolds wrote: > Hi Scott, > > I am trying to access a soap interface without any success. > > The wsdl for the site is located at > https://incoming.paymentarchive.com/fileretrieval/fileretrieval.asmx?WSDL > > I have tried several different methods but my latest attempt is: > rc = http_url_post( > 'https://incoming.paymentarchive.com/' > + 'FileRetrieval/FileRetrieval.asmx' > : %addr(soap) + 2 > : %len(soap) > : '/tmp/RDMresponse.html' > : HTTP_TIMEOUT > : HTTP_USERAGENT > : 'text/xml; charset=utf-8' > : 'http://tempuri.org/GetItemData'); > > The soap variable contains: > <?xml version="1.0" encoding="utf-8"?> > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> > <soap:Body> > <GetItemData> > <ItemQuery> > <BASICAUTHENTICATION> > <USERNAME>.......</USERNAME> > <PASSWORD>.......</PASSWORD> > </BASICAUTHENTICATION> > <RESPONSEFORMAT> > <PAGINATION> > <ROWSPERPAGE>20</ROWSPERPAGE> > <PAGENUMBER>1</PAGENUMBER> > </PAGINATION> > <OUTPUTFIELDS> > <OUTPUTFIELD FIELD="IRN" ORDERBY="NO"/> > <OUTPUTFIELD FIELD="SEQNUM" ORDERBY="NO"/> > </OUTPUTFIELDS> > </RESPONSEFORMAT> > <SEARCH> > <SEARCHFIELDS> > <SEARCHFIELD FIELD="IRN" OPERATOR="EQUALS"> > <VALUE1>200812230802590000011</VALUE1> > </SEARCHFIELD> > </SEARCHFIELDS> > </SEARCH> > </ItemQuery> > </GetItemData> > </soap:Body> > </soap:Envelope> > > If I past from <ItemQuery> tag through </ItemQuery> tag in to their test > value > https://incoming.paymentarchive.com/fileretrieval/fileretrieval.asmx?op=GetI > temData > It returns the correct response. I tried it on > http://soapclient.com/soapclient?template=%2Fclientform.html&fn=soapform&Soa > pTemplate=%2FSoapResult.html&SoapWSDL=https%3A%2F%2Fincoming.paymentarchive. > com%2Ffileretrieval%2Ffileretrieval.asmx%3Fwsdl++&_ArraySize=2 > and it worked as well so I the request xml is correct but there is something > wrong with my soap. > >>From my call on the iSeries I get: > <?xml version="1.0" encoding="utf-8"?><soap:Envelope > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultco > de>soap:Server</faultcode > Parameter name: s</fault><faultstring>Server was unable to process request. > ---> Value cannot be null.string><detail > /></soap:Fault></soap:Body></soap:Envelope> > > I've attached the log as well. As I said I have tried various things > without any luck. I'm hoping you can point me in right direction. > > Thanks, > Bruce > > > ------------------------------------------------------------------------ > > ----------------------------------------------------------------------- > This is the FTPAPI mailing list. To unsubscribe, please go to: > http://www.scottklement.com/mailman/listinfo/ftpapi > ----------------------------------------------------------------------- ----------------------------------------------------------------------- This is the FTPAPI mailing list. To unsubscribe, please go to: http://www.scottklement.com/mailman/listinfo/ftpapi -----------------------------------------------------------------------
Attachment:
soaptst.rpgle
Description: Binary data
----------------------------------------------------------------------- This is the FTPAPI mailing list. To unsubscribe, please go to: http://www.scottklement.com/mailman/listinfo/ftpapi -----------------------------------------------------------------------