How to remove the Fatal error: SOAP-ERROR: Parsing Schema: unexpected in sequence error?

If you use the eBay API in any way on your website related to your products or orders then you may have come across an issue which happened last week probably around Jan 26 2012. If you call any eBay API method you will encounter the following error message:

Fatal error: SOAP-ERROR: Parsing Schema: unexpected  in sequence in eBaySOAP.php on line 87

Line 87 in eBaySOAP.php comes out to be “parent::__construct($session->wsdl, $session->options);” in the following function

public function __construct(eBaySession $session) {
	$this->session = $session;
	$this->__setHeaders();
	parent::__construct($session->wsdl, $session->options);
}

After much searching I came across this forum post on X.com which recommended that we change the URL of eBay WSDL from http://developer.ebay.com/webservices/latest/eBaySvc.wsdl to http://developer.ebay.com/webservices/753/eBaySvc.wsdl.

Go to line 21 on your eBaySOAP.php file and change the WSDL URL to

$this->wsdl = 'http://developer.ebay.com/webservices/753/eBaySvc.wsdl';

After making the change you should not encounter the error message and everything should work fine.

Comments?

Leave a Reply

Your email address will not be published. Required fields are marked *