$wsdl = "https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl";
$soap = new SoapClient($wsdl);
throws the error:
SOAP-ERROR: Parsing Schema: unexpected in sequence
Tried on PHP versions 5.3.4, 5.3.0
$wsdl = "https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl";
$soap = new SoapClient($wsdl);
throws the error:
SOAP-ERROR: Parsing Schema: unexpected in sequence
Tried on PHP versions 5.3.4, 5.3.0
The problem is in https://www.paypalobjects.com/wsdl/eBLBaseComponents.xsd which is a dependency for https://www.paypalobjects.com/wsdl/PayPalSvc.wsdl
To work around this issue, you can download the WSDL and its dependencies and fix eBLBaseComponents.xsd manually (remove the erroneous extra > on the fourth line from the bottom right after ).
1) Download the following 4 files to the same directory
https://www.paypal.com/wsdl/PayPalSvc.wsdl
https://www.paypal.com/wsdl/eBLBaseComponents.xsd
https://www.paypal.com/wsdl/CoreComponentTypes.xsd
https://www.paypal.com/wsdl/EnhancedDataTypes.xsd
2) Remove the erroneous extra ">" on the fourth line from the bottom for eBLBaseComponents.xsd.
3) Upload your changes to your own host, or store them locally depending on your application.
4) In your application, point to the new, fixed WSDL.