Please help me edit Paypal WSDL because of its XSD schema imports. I needed to run it over to WSDL2Apex of Salesforce. And with import, it would return an error:

Error: Failed to parse wsdl: Found schema import from location CoreComponentTypes.xsd. External schema import not supported

I've found a good workaround through this answer: Schema error while trying to upload a WSDL but I don't know how to do it with the following files below and I need assistance.

If you will look at Paypal SOAP API docs, you will see that it requires eBay Business Language (eBL) base and core components:

The PayPal Web Services schema and its underlying eBay Business Language (eBL) base and core components are required for developing applications with the PayPal Web Services API.

Please help me integrate the eBL base and core components into Paypal WSDL. Here are the files:

  • 1
    – Eric
    Commented Sep 29, 2016 at 3:31
  • @Eric, sir, I've already searched the result and I've found out that none was clear, and just gave broad answer. And so I've decided to ask for a specific question sir, which focuses specifically with the Paypal SOAP API and the imports of the required XSD Commented Sep 29, 2016 at 3:47
  • Answer is not specific to PayPal API. External schema is essentially not supported by sf and anything you find is sn attempt at a workaround. PayPal has a rest API correct? If so I would use that.
    – Eric
    Commented Sep 29, 2016 at 3:48
  • Yes sir @Eric, unfortunately, I cannot ask for clarification in this answer: salesforce.stackexchange.com/questions/79957/… because I'm new here and my reputation is way below 50. Commented Sep 29, 2016 at 3:51
  • 1
    The answer does not change. If you have a question about the answer narrow your question to what you really want to ask and link to that answer in the post
    – Eric
    Commented Sep 29, 2016 at 3:53

1 Answer 1


That's an interesting WSDL that presents a number of challenges to import into Salesforce.

I've been able to generate the Apex classes for it using the FuseIT SFDC Explorer Wsdl2Apex functionality (Disclosure: This is a free tool made publicly available by my current employer).

I needed to make a number of modifications to get it to generate correctly:

  1. Download and save a local version of https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl
  2. Download and save a local version of https://www.sandbox.paypal.com/wsdl/EnhancedDataTypes.xsd
  3. In the WSDL, modify the import statements to have the full path to the XSDs. Use the local file path for EnhancedDataTypes.xsd

    <import namespace="urn:ebay:apis:CoreComponentTypes" schemaLocation="https://www.sandbox.paypal.com/wsdl/CoreComponentTypes.xsd"/>
    <import namespace="urn:ebay:apis:eBLBaseComponents" schemaLocation="https://www.sandbox.paypal.com/wsdl/eBLBaseComponents.xsd"/>
    <import namespace="urn:ebay:apis:EnhancedDataTypes" schemaLocation="C:\Users\IAmAFish\Documents\EnhancedDataTypes.xsd"/>
  4. Modify EnhancedDataTypes.xsd to comment out the unsupported elements under the EnhancedPaymentDataType complexType. Basically everything from the opening annotation to the closing sequence. The annotation and sequence throw all sorts of errors around "The 'annotation' element is not supported in this context"

Here is the output I generated:

  • 1
    Wow! Thank you @daniel-ballinger ! Did you know that yesterday, I've downloaded the very essential FuseIT SFDC Explorer Wsdl2Apex and tried it and it's very COOL! I've also come up with exchanging the the schemalocation of import to it's links but I haven't done the commenting of annotation (giggle). Thank you so much! Many developers have been looking for a solution to this. Commented Sep 30, 2016 at 1:01
  • And oh, guys looking for this solution, make sure you have the latest FuseIT SFDC Explorer Wsdl2Apex Commented Sep 30, 2016 at 1:48
  • 1
    @LynnellEmmanuelNeri Yes, sorry. Forgot to mention that this will need to latest build (3.3) I did today to support a local file path schemaLocation. Glad it helped! Commented Sep 30, 2016 at 2:07
  • And also, it looks like ebayApiPaypalapi.cls is truncated. However, I was able to generate full of it using the tools. Thanks again. Commented Sep 30, 2016 at 2:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .