View Full Version : Ebay And Soap

02-11-2010, 08:07 AM
hi there i have been for awhile trying to code up a connection between my test server and ebays sanbox server to test out some code i am using but at the momment i keep getting stalled at actualy creating the connection between the two servers i keep getting this response

Fatal error: Uncaught SoapFault exception: [ns1:Client] Application name invalid. in C:\Documents and Settings\Kieran\My Documents\My Development\PHP\TestBed\public_html\test.php:171
Stack trace:
#0 C:\Documents and Settings\Kieran\My Documents\My Development\PHP\TestBed\public_html\test.php(171): SoapClient->__soapCall('GetUser', Array, Array, Array)
#1 {main}
thrown in C:\Documents and Settings\Kieran\My Documents\My Development\PHP\TestBed\public_html\test.php on line 171

which is extremely annoying as i cant find out what causing this i have gone over my connection code a lot and i am hoping that someone else may have had this problem and had a solution (by the way i am aware of the premade packages by ebay)

$soapClient = new SoapClient('http://developer.ebay.com/webservices/latest/eBaySvc.wsdl',array('trace'=>1));
$soapHeaders= array(new SOAPHeader('urn:ebay:apis:eBLBaseComponents', 'RequesterCredentials', new SoapVar(array('eBayAuthToken'=>'1000 Char Token ','Credentials'=>array('AppId'=>'APPID','DevId'=>'DEVID','AuthCert'=>'AUTHCERT')),SOAP_ENC_OBJECT, null, null, null, 'urn:ebay:apis:eBLBaseComponents')));
$soapQueryString = "https://api.sandbox.ebay.com/wsapi?" . http_build_query(array('callname' => 'GetUser', 'siteid' => '0', 'version' => '655', 'appid' => 'AUTHCERT', 'Routing' => 'default'));

$soapResults = $soapClient->__soapCall('GetUser',array('Version'=>'655'), array('location'=>$soapQueryString),$soapHeaders);

Thanks in advance.