Apex Generation Failed : Unable to find element for {urn:avx.com/us/upi/messaging/UpdateAccountWSV1.0}UpdateName

I am getting the above error while parsing a wsdl .

There are no import/include elements in the wsdl . I have placed all the files in one wsdl only.

This is where it's referenced in the wsdl

<soap11:operation soapAction="urn:avx.com/us/upi/messaging/UpdateAccountWSV1.0/UpdateName"

UpdateName element :

<xsd:element name="UpdateName">
    <xsd:extension base="cthdr:UpperSchemaType">
        <xsd:element name="Organization" type="ct:Organization" minOccurs="0"/>

What could be the reason ?

  • Can you share the WSDL in question? Feel free to change the endpoint if you don't want it being called. Jan 4, 2017 at 19:50
  • What does the UpdateName element look like in the WSDL types? Does it have the expected namespace? It might be that it has something that isn't supported by the default wsdl2Apex. Jan 5, 2017 at 1:07
  • @DanielBallinger - Added the UpdateName element .
    – SFDCRookie
    Jan 5, 2017 at 12:51

1 Answer 1


The problem will likely be the <xsd:extension base="cthdr:UpperSchemaType"> element in the complex type. The native version of wsdl2apex doesn't support xsd:extension. As such it will be missing a number of required elements.

I make an alternative version of WSDL2Apex that has some increased support for these types of elements. You can get if for free in the FuseIT SFDC Explorer (Disclosure, this is from my current employer).

The alternative is to manually merge the elements from the extended type into UpdateName. It is possible, but can be error prone and not much fun if you need to do it multiple times.

  • Thank you for your analysis. I will try out your Fuse Tool . Also can you please give an example here with code how it can be done manually . Thanks in advance.
    – SFDCRookie
    Mar 20, 2017 at 13:31
  • As I mentioned, doing it manually isn't much fun and can be error prone, which is why I made a tool to automate the process. If you really want to do it manually, one approach is to use a tool like SoapUI to generate the correct SOAP request. Then modify your WSDL to create the same request. Generally this will involve copying the elements from one complex type to the next. Mar 21, 2017 at 20:09

You must log in to answer this question.

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