[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SV: Need help
Hi,
You should perhaps try http_url_post_xml.
Take a look at example19.
You will need to install the expat parser http://www.scottklement.com/expat/
Set a breakpoint in the incoming subroutine, and you will get the idea how
this works.
Here is how the soap envelope looks like when I try to create a webservice
client in WSDC with the wsdl at
https://incoming.paymentarchive.com/fileretrieval/fileretrieval.asmx?WSDL
Soap= '<?xml version="1.0" encoding="UTF-8"?>'
+'<soapenv:Envelope'
+' xmlns:q0="http://tempuri.org/"'
+' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"'
+' xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
+' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">'
+'<soapenv:Body>'
+'<q0: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>'
+'</q0:GetItemData>'
+'</soapenv:Body>'
+'</soapenv:Envelope>'
HTTP_setCCSIDs(1208: 0); // CCSID 1208 = UTF-8
// The Incoming subroutine parses the return xml.
rc = http_url_post_xml(
'https://incoming.paymentarchive.com/'
+ 'fileretrieval/fileretrieval.asmx'
: %addr(SOAP) + 2
: %len(SOAP)
: *NULL
: %paddr(Incoming)
: *NULL
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml;charset=utf-8'
: 'http://tempuri.org/GetItemData');
You will have to find out how to parse the data in the incoming subroutine.
But a debug will give you the result.
Best regards,
Magne
-----Opprinnelig melding-----
Fra: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] På vegne av Bruce Reynolds
Sendt: 2. januar 2009 21:15
Til: 'HTTPAPI and FTPAPI Projects'
Emne: RE: Need help
I tried it with and without. Same result.
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mike Krebs
Sent: Friday, January 02, 2009 12:13 PM
To: 'HTTPAPI and FTPAPI Projects'
Subject: RE: Need help
Bruce,
Comparing your debug with the SOAP 1.1 request shown on the web page, it
looks like you did good. Only difference I see is this line:
<GetItemData xmlns="http://tempuri.org/">
Example 18 has the items prefixed by "tns:". Loading your WDSL in SOAPUI
shows the request as this format. Probably shouldn't be needed based on
request data shown on web page, but the web service doesn't like something.
<tem:GetItemData>
<!--Optional:-->
<tem:ItemQuery>?</tem:ItemQuery>
</tem:GetItemData>
Good luck, let us know what fixes it!
Mike Krebs
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Bruce Reynolds
Sent: Wednesday, December 31, 2008 3:59 PM
To: 'HTTPAPI and FTPAPI Projects'
Subject: Need help
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
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------