Soabirw Posted May 31, 2006 Share Posted May 31, 2006 I keep getting this error from the SOAP server: Server did not recognize the value of HTTP Header SOAPAction: [a href=\"http://authorize.net/merchantApi/#GetReturns\" target=\"_blank\"]http://authorize.net/merchantApi/#GetReturns[/a]. Which I thought made sense. I know that it is wanting "http://authorize.net/merchantApi/GetReturns". Not sure how or why that pound gets put there, but then I tried to make the same script in Perl with SOAP::Lite and it puts it there too, so I get the exact same error. Think the last time I used SOAP was 2 years ago, so maybe I'm just too rusty. Here is the XML I am needing to produce:[a href=\"https://account.authorize.net/api/merchantapi.asmx?op=GetReturns\" target=\"_blank\"]https://account.authorize.net/api/merchanta...x?op=GetReturns[/a]It's a really small call. And here is my current PHP:[code]class auth { private $login; private $password; public function __construct($login,$password) { $this->login = $login; $this->password = $password; }}$client = new SoapClient(null, array( 'location' => 'https://account.authorize.net/api/merchantapi.asmx', 'uri' => 'http://authorize.net/merchantApi/' ));// Tried this way of connecting too.// $client = new SoapClient('https://account.authorize.net/api/merchantapi.asmx?WSDL');$auth = new auth('login','password');$header = new SoapHeader('http://authorize.net/merchantApi/','InHeader', $auth);$result = $client->__soapCall('GetReturns', array('transactionID' => 123456789), null, $header);if (is_soap_fault($result)) { trigger_error("SOAP Fault: (faultcode: {$result->faultcode}, faultstring: {$result->faultstring})", E_ERROR);}[/code] Quote Link to comment https://forums.phpfreaks.com/topic/10881-soap-problems/ 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.