Jump to content


Photo

SOAP Problems


  • Please log in to reply
No replies to this topic

#1 Soabirw

Soabirw
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 31 May 2006 - 04:30 PM

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...pi/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:

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);
}





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users