[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RPC webservice
Hi David,
The SOAP error says it all: The XML reader of the service provider can not
process your xml sting. The result string you created can be seen in the
httpapi debug file, as the string that is send.
To start off you need to add spaces between attributes; that is between
<soapenv:Envelope' and its following attributes being xmlns.
Also take out the spaces between the leading quote and the opening brackets.
For indentation you can leave the leading spaces directly following the plus
sign.
SOAP=
'<soapenv:Envelope'
+' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"'
+' xmlns:web="http://webservices.360Value.com">'
+'<soapenv:Header/>'
+ '<soapenv:Body>'
+ '<web:calculateRCV>'
etc.
Once you successfully changed your code you can look at the debug file to
see what you created, and possibly also copy/pase the sting in a temp file
that you open with a browser. That will clearly show you the possible
errors.
Kind regards,
Loek Maartens.
----- Original Message -----
From: "David Baugh" <davidb@xxxxxxxxxxxxxx>
To: <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, March 23, 2011 12:41 AM
Subject: RPC webservice
I'm attempting a connection to the following web-service,
http://training.360-value.com/apps/iv/webservices/RCV?WSDL
Any help to the un-initiated much appreciated.
(Note the Incoming procedure is bare-bones - cut down from a copied service
program on another web-service)
I get the following error:
SetError() #13: HTTP/1.1 500 Internal Server Error
recvdoc parms: identity 225
header_load_cookies() entered
cookie_parse() entered
cookie = JSESSIONID=63A1159053CA50032908F9715086D9FE.xvtapp1-demo;
Path=/apps/iv
cookie attr jsessionid=63A1159053CA50032908F9715086D9FE.xvtapp1-demo
cookie attr path=/apps/iv
recvdoc(): entered
SetError() #0:
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body>
<soap:Fault><faultcode>soap:Client</faultcode> <faultstring>Error reading
XMLStreamReader.</faultstring></soap:Fault> </soap:Body></soap:Envelope>
SetError() #13: HTTP/1.1 500 Internal Server Error
http_close(): entered
Here's my source:
SOAP=
'<soapenv:Envelope'
+'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"'
+'xmlns:web="http://webservices.360Value.com">'
+' <soapenv:Header/>'
+' <soapenv:Body>'
+' <web:calculateRCV>'
+' <groupId>XXXXXXXX</groupId>'
+' <password>XXXXXXXX</password>'
+' <userId>XXXXXXXXXXXXXXXX</userId>'
+' <!CDATA[<xml>'
+' <CONTEXT>'
+' <RESIDENTIAL usedefaults="YES" prefillonly="YES">'
+' <OWNER name="PREFERRED EXAMPLE" '
+' zipcode="84097" '
+' state="UT" '
+' country="USA" '
+' city="OREM" '
+' street="1015 N 1560 E" />'
+' </RESIDENTIAL>'
+' </CONTEXT>'
+' </xml>]]>'
+' <detailedReport>false</detailedReport>'
+' <version>0</version>'
+' </web:calculateRCV>'
+'</soapenv:Body>'
+'</soapenv:Envelope>';
rc = http_url_post_xml(
'http://training.360-value.com/apps/iv/webservices/RCV'
: %addr(SOAP) + 2
: %len(SOAP)
: *NULL
: %paddr(Incoming)
: %addr(resp)
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml; charset=utf-8');
P Incoming B
D Incoming PI
D r likeds(resp)
D depth 10I 0 value
D name 1024A varying const
D path 24576A varying const
D value 65535A varying const
D attrs * dim(32767)
D const options(*varsize)
// Local variables
D rtncde s 7A
D Actn s 1A
D Idx s 5P 0
/free
// http_comp('incoming');
select;
when name = 'a:Message';
//Err = value;
endsl;
/end-free
P E
--------------------------------------------------------------------------------
> -----------------------------------------------------------------------
> 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
-----------------------------------------------------------------------