simpjd Posted April 14, 2009 Share Posted April 14, 2009 Ok so i've been integrating my website with a SOAP service that Amazon provide. When I call: $req = array('merchant' => array('merchantIdentifier' => $token, 'merchantName' => $name), 'documentIdentifier' => '591872944'); print_r($client -> __soapCall('getDocument', $req)); It is supposed to return an XML file of the document 591872944. Which it does, kind off.... The response starts as follows: --xxx-WASP-CPP-MIME-Boundary-xxx-0xb04e270-0b04e270-xxx-END-xxx Content-Type: text/xml; charset="UTF-8" <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SE="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns0:string_Response xsi:type="xsd:string" xmlns:ns0="http://systinet.com/xsd/SchemaTypes/">591872944 </ns0:string_Response><ns1:doc href="cid:0xaf6bc18-0xb41b9f8-0xafe85a0-0xb879518-0xb4b1820" xmlns:ns1="http://systinet.com/xsd/SchemaTypes/"/></SOAP-ENV:Body></SOAP-ENV:Envelope> --xxx-WASP-CPP-MIME-Boundary-xxx-0xb04e270-0b04e270-xxx-END-xxx Content-ID: <0xaf6bc18-0xb41b9f8-0xafe85a0-0xb879518-0xb4b1820> Content-Type: application/binary <?xml version="1.0" encoding="UTF-8"?> <AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd"> <Header> This is displaying the following error: SoapFault exception: [Client] looks like we got no XML document in /var/www/1visual_bms/client.php:19 Stack trace: #0 /var/www/1visual_bms/client.php(19): SoapClient->__soapCall('getDocument', Array) #1 {main} I believe it is because of the comment thing at the top...but I cannot remove this before the response is processed by PHP SOAP.... PLEASE HELP!!! Quote Link to comment https://forums.phpfreaks.com/topic/154075-php-soap-responsehelp-needed/ Share on other sites More sharing options...
ober Posted April 14, 2009 Share Posted April 14, 2009 Did you try digging around on Amazon's site? Surely they have help for this sort of thing. Quote Link to comment https://forums.phpfreaks.com/topic/154075-php-soap-responsehelp-needed/#findComment-809920 Share on other sites More sharing options...
simpjd Posted April 14, 2009 Author Share Posted April 14, 2009 No, its actually very limited. I'm sure this kind of thing crops up in other SOAP apps. There must be some way of bypassing the error or something....? Quote Link to comment https://forums.phpfreaks.com/topic/154075-php-soap-responsehelp-needed/#findComment-809943 Share on other sites More sharing options...
simpjd Posted April 14, 2009 Author Share Posted April 14, 2009 Is there maybe some kind of setting that means the SOAP return doesn't have to be XML??? Quote Link to comment https://forums.phpfreaks.com/topic/154075-php-soap-responsehelp-needed/#findComment-810153 Share on other sites More sharing options...
gffg4574fghsDSGDGKJYM Posted April 14, 2009 Share Posted April 14, 2009 ober is right there is a lot of help from amazon website. Documentation : http://aws.amazon.com/documentation/ Sample code and Example (in C#, Java, PHP, Ruby, ....) : http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=173 Amazon Developer Forum : http://developer.amazonwebservices.com/connect/forumindex.jspa And lot more... http://aws.amazon.com/ Quote Link to comment https://forums.phpfreaks.com/topic/154075-php-soap-responsehelp-needed/#findComment-810171 Share on other sites More sharing options...
simpjd Posted June 2, 2009 Author Share Posted June 2, 2009 Unfortunately I have still not been able to find a solution for this problem!! I would really appreciate any help...the amazon website has no such help for this problem. My best guess is the fact that the response comes back with a line break at the start..? Either this or when I try to access via soapUI, the response contains a soap "attachment" Anyone? Please? Quote Link to comment https://forums.phpfreaks.com/topic/154075-php-soap-responsehelp-needed/#findComment-847995 Share on other sites More sharing options...
Maq Posted June 2, 2009 Share Posted June 2, 2009 The SOAP API is right here: http://docs.amazonwebservices.com/AmazonEC2/dg/2007-01-19/using-soap-api.html Quote Link to comment https://forums.phpfreaks.com/topic/154075-php-soap-responsehelp-needed/#findComment-848011 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.