Garethp Posted January 21, 2010 Share Posted January 21, 2010 Ok, so I have to use SOAP calls to fetch data. The format that the call has to be in is shown here http://125.236.209.214/autoiaspwebservice.asmx?op=PartGroups And I have no idea how to do this in PHP. I've looked into tutorials, but this is my end result <?php $client = new SoapClient(NULL, array( "location" => "http://125.236.209.214/autoiaspwebservice.asmx", "uri" => "http://autoi.com.au/PartGroups", "style" => SOAP_RPC, "use" => SOAP_ENCODED )); print($client->__call( /* SOAP Method Name */ "http://autoi.com.au/PartGroups", /* Parameters */ array( new SoapParam( /* Parameter Value */ "UserId", /* Parameter Name */ xxx ), new SoapParam( "AuthCode", "xxx" )), /* Options */ array( /* SOAP Method Namespace */ "uri" => "http://autoi.com.au/PartGroups", /* SOAPAction HTTP Header for SOAP Method */ "soapaction" => "http://autoi.com.au/PartGroups" )). "\n"); ?> And this is the response Fatal error: Uncaught SoapFault exception: [HTTP] Bad Request in C:\Program Files\EasyPHP 2.0b1\www\Soap.php:32 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://125.236....', 'http://autoi.co...', 1, 0) #1 C:\Program Files\EasyPHP 2.0b1\www\Soap.php(32): SoapClient->__call('http://autoi.co...', Array, Array) #2 {main} thrown in C:\Program Files\EasyPHP 2.0b1\www\Soap.php on line 32 I would be so grateful if someone could tell me what I'm doing wrong, or how I can send it the way it's meant to be sent Link to comment https://forums.phpfreaks.com/topic/189375-soap/ Share on other sites More sharing options...
Garethp Posted January 22, 2010 Author Share Posted January 22, 2010 Maybe I'm asking a bit much? If someone could point me to a site where I can find out how to write my own Request, that would be awesome Link to comment https://forums.phpfreaks.com/topic/189375-soap/#findComment-999731 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.