What techniques can I use to modify a 3rd party WSDL that includes import tags so that I can use the Salesforce generate apex class from WSDL feature?


I'm a beginner at using WSDLs and I'm trying to implement a 3rd party WSDL on salesforce. When I try to parse the wsdl I get the error "Error: Failed to parse wsdl: Unsupported Schema element found http://www.w3.org/2001/XMLSchema:include. At: 13:54".

I'm making an assumption that this is referring to XMLSchema import tag


Is it possible to flatten the import statement so that the Salesforce WSDL to Apex parse can handle this? I've done a lot of googling but am having some trouble as I don't know the terminology to describe what I'm looking to do.

I've upload the WSDL and related files in it's entirety into a gist.

  • Any joy with this Ralph? Happy to take a deeper look if your still puzzling? Jun 1, 2013 at 18:27
  • Not yet @andrew, hoping to spend more time on it tomorrow. I'm torn between abandoning the approach and just manually consuming the SOAP, or just use a non-salesforce tool to consume the webservice and then have that communicate to Salesforce. As much as I'd love to get it working natively, in the past i've gotten burned wasting a ton of time working around the shortcomings of Salesforce features with no finished result :( Jun 3, 2013 at 15:24

1 Answer 1


UPDATE: As it stands this doesn't actually work. You will get the message

Apex Generation Failed
No type specified for element vendorId

Most likely the issue is the missing first import that defines the data types.

I was able to get the WSDL to import and generate code by merging the content of clareityStoreFaults.xsd directly into the ClareityStore.wsdl. Note that I didn't do the same for the http://schemas.xmlsoap.org/wsdl/ import.

So the steps were:

  1. Comment out <xs:import namespace="http://schemas.xmlsoap.org/wsdl/"></xs:import>
  2. Comment out <xs:import namespace="http://ws.clareity.com/clareityStoreFaults" schemaLocation="clareityStoreFaults.xsd"></xs:import>
  3. Paste the contents of clareityStoreFaults.xsd xs:schema element under the commented out code from step 2.
  4. Import the modified WSDL into Salesforce

I haven't been able to test if it actually works against the web service, but it does import and generate code.

  • Thanks for the tips, I'll keep hacking away. I tried a similar approach, and it accepted the file, but didn't generate the code. Got a schema type parameter not found, although it didn't give any detail as to what type was missing. May 28, 2013 at 1:08
  • It isn't immediately helpful, but there is always Ideas: Support for SOAP 1.2. Also Referencing external schemas in a WSDL May 28, 2013 at 2:32

You must log in to answer this question.

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