I am trying to generate Apex classes from WSDL. I was given a zipped file with one WSDL and three SXD files. After pretty much I've tried it all including consulting with Salesforce I have the final version of WSDL. I passed parsing finally and tried to generate Apex class again, now I got a different error:

Apex Generation Failed. Unable to find element for {http://svc.kp.org/hp_admn/mbr_admn/addr_validate/v2}getAddressValidationResponse

You can see the WSDL here https://gist.github.com/Miroandme/public.

I do not have a lot of experience with external application WSDLs and am not sure how to handle this part.

  • Not sure how to submit WSDL here. Looks like my file is too long. I wonder if I can attach the file.
    – User Miro
    Commented Sep 8, 2018 at 23:44
  • You could do pastebin or a github gist, if you think it'll help. If it's that big though, I'm not sure we're going to be able to help, but we can at least take a look for you, in case it's something obvious.
    – sfdcfox
    Commented Sep 8, 2018 at 23:48
  • gist.github.com/Miroandme/public
    – User Miro
    Commented Sep 9, 2018 at 0:12
  • Above is my public Gits where WSDL can be reviewed.
    – User Miro
    Commented Sep 9, 2018 at 0:13
  • Your WSDL as linked is invalid. It uses a trnheader: namespace for certain element types which isn't defined as a xmlns in the document. If you can share the unmodified WSDL it will likely be easier to resolve. Commented Sep 9, 2018 at 23:19

1 Answer 1


This tool WSDL Parser and Apex Generator that is part of the FuseIT SFDC Explorer includes:

Support for complex types that extend from a base class <xsd:extension base="tns:Sample">

which is one of the things that is probably tripping up the standard Salesforce tool. See An alternative to Salesforces Wsdl2Apex for calling SOAP web services in Apex from Danial Ballinger's blog for some history on this work.

Some of these capabilities may have made it into this open source WSDL2Apex project as Daniel contributed to that.

You must log in to answer this question.

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