You need to sign in to do that
Don't have an account?
Failed to parse wsdl, External schema import not supported Error is thrown.
Hi,
My task is to integrate PayPal using APEX.
I am trying to generate Apex class from PayPalSvc WSDL file.
When I use the "Generate from WSDL" option then browse for my WSDL and click the "Parse WSDL" button, I get the following error:
Error: Failed to parse wsdl: Found schema import from location CoreComponentTypes.xsd. External schema import not supported
xsd:import and wsdl:import are not supported (as the error message indicates).
I'm a newb, can you or someone explain or show me how to
"re-work the wsdl to have all the imported schemas in the wsdl document directly." ?
Location of PayPal WSDL and XSD Files
PayPal Schema : https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl
eBL Base Components and Component Types
https://www.sandbox.paypal.com/wsdl/eBLBaseComponents.xsd
https://www.sandbox.paypal.com/wsdl/CoreComponentTypes.xsd
How do I generate the Apex class?
Please shed some light on this.
Thanks in advance..!
Person.xsd
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.person.org"
xmlns="http://www.person.org"
elementFormDefault="qualified">
<xsd:complexType name="PersonType">
<xsd:sequence>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="SSN" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Product.xsd
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.product.org"
xmlns="http://www.product.org"
elementFormDefault="qualified">
<xsd:complexType name="ProductType">
<xsd:sequence>
<xsd:element name="Type" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Company.xsd
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.company.org"
xmlns="http://www.company.org"
elementFormDefault="qualified"
xmlns:per="http://www.person.org"
xmlns:pro="http://www.product.org">
<xsd:import namespace="http://www.person.org" schemaLocation="Person.xsd"/>
<xsd:import namespace="http://www.product.org" schemaLocation="Product.xsd"/>
<xsd:element name="Company">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Person" type="per:PersonType" maxOccurs="unbounded"/> <xsd:element name="Product" type="pro:ProductType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
In Company.xsd it imports an external schema, which is not supported in APEX.
Please let me know how to replace the following 2 lines:
<xsd:import namespace="http://www.person.org" schemaLocation="Person.xsd"/>
<xsd:import namespace="http://www.product.org" schemaLocation="Product.xsd"/>
Thanks,
KK
Hi, did you find an answer to create the Apex Class from WSDL with the import of the schema?
I have the same problem.
Regards,
Wilmer
Hi,
I am facing the same issue while integration with Paypal.
Can you please help if you you have got any solution for this issue?
Thanx