2

The WSDL I put through the generator gets parsed without a problem, but when I go to generate the actual class, it results in the following error.

Apex Generation Failed Unable to find element for {http://exacttarget.com/wsdl/partnerAPI}DefinitionResponseMsg

The WSDL is fairly long (4500 lines, 170,000 characters) but again it goes through the parsing no problem. I am still getting familiar with Salesforce in general, and this is my first time using the WSDL2Apex generator.

I dont want to post the entire wsdl, but I included the schema information, and wherever the element from the error above (DefinitionResponseMsg) shows up.

    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://exacttarget.com/wsdl/partnerAPI" targetNamespace="http://exacttarget.com/wsdl/partnerAPI">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://exacttarget.com/wsdl/partnerAPI" version="1.0"> 
<!--<import id="APIFault" schemaLocation="https://webservice.exacttarget.com/ETFrameworkFault.xsd" namespace="urn:fault.partner.exacttarget.com"/> -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:fault.partner.exacttarget.com" elementFormDefault="qualified" targetNamespace="urn:fault.partner.exacttarget.com" version="1.0">
<element name="apifault" type="tns:APIFault"/>
<complexType name="APIFault">
<sequence>
<element name="Code" type="xsd:int" minOccurs="1" maxOccurs="1"/>
<element name="Message" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<element name="LogID" type="xsd:long" minOccurs="0" maxOccurs="1"/>
<element name="Params" minOccurs="0" maxOccurs="1">
<complexType>
<sequence>
<element name="Param" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</schema>
<complexType name="APIObject">
<sequence>
<element name="Client" type="tns:ClientID" minOccurs="0" maxOccurs="1"/>
<element name="PartnerKey" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="1"/>
<element name="PartnerProperties" type="tns:APIProperty" minOccurs="0" maxOccurs="unbounded"/>
<element name="CreatedDate" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
<element name="ModifiedDate" type="xsd:dateTime" minOccurs="0" maxOccurs="1" nillable="true"/>
<element name="ID" type="xsd:int" minOccurs="0" maxOccurs="1"/>
<element name="ObjectID" type="xsd:string" nillable="true" minOccurs="0" maxOccurs="1"/>
<element name="CustomerKey" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="Owner" type="tns:Owner" minOccurs="0" maxOccurs="1"/>
<element name="CorrelationID" minOccurs="0" type="xsd:string"/>
<element name="ObjectState" type="xsd:string" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<complexType name="ClientID">
<sequence>
<element name="ClientID" type="xsd:int" minOccurs="0" maxOccurs="1">
<annotation>
<documentation>Deprecated. Use ID.</documentation>
</annotation>
</element>
<element name="ID" type="xsd:int" minOccurs="0" maxOccurs="1"/>
<element name="PartnerClientKey" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="UserID" type="xsd:int" minOccurs="0" maxOccurs="1"/>
<element name="PartnerUserKey" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="CreatedBy" type="xsd:int" minOccurs="0" maxOccurs="1"/>
<element name="ModifiedBy" type="xsd:int" minOccurs="0" maxOccurs="1"/>
<element name="EnterpriseID" type="xsd:long" minOccurs="0" maxOccurs="1"/>
<element name="CustomerKey" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<!--
Reserved for future use.  Will deprecate UserID and support CustomerKey as well.
-->
<!--
<element name="AccountUser" type="tns:AccountUser" minOccurs="0" maxOccurs="1"></element>
-->
</sequence>
</complexType>
<complexType name="APIProperty">
<sequence>
<element name="Name" type="xsd:string"/>
<element name="Value" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="NullAPIProperty">
<complexContent>
<extension base="tns:APIProperty"/>
</complexContent>
</complexType>
<complexType name="DataFolder">
<complexContent>
<extension base="tns:APIObject">
<sequence>
<element name="ParentFolder" minOccurs="0" type="tns:DataFolder"/>
<element name="Name" minOccurs="0" type="xsd:string"/>
<element name="Description" minOccurs="0" type="xsd:string"/>
<element name="ContentType" minOccurs="0" type="xsd:string"/>
<element name="IsActive" minOccurs="0" type="xsd:boolean"/>
<element name="IsEditable" minOccurs="0" type="xsd:boolean"/>
<element name="AllowChildren" minOccurs="0" type="xsd:boolean"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="Owner">
<sequence>
<element name="Client" type="tns:ClientID" minOccurs="0" maxOccurs="1"/>
<element name="FromName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="FromAddress" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="User" type="tns:AccountUser" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<simpleType name="AsyncResponseType">
<restriction base="xsd:string">
<enumeration value="None"/>
<enumeration value="email"/>
<enumeration value="FTP"/>
<enumeration value="HTTPPost"/>
</restriction>
</simpleType>
<complexType name="AsyncResponse">
<sequence>
<element name="ResponseType" type="tns:AsyncResponseType" minOccurs="1" maxOccurs="1"/>
<element name="ResponseAddress" type="string" minOccurs="1" maxOccurs="1"/>
<element name="RespondWhen" type="tns:RespondWhen" minOccurs="0"/>
<element name="IncludeResults" type="boolean" minOccurs="0"/>
<element name="IncludeObjects" type="boolean" minOccurs="0"/>
<element name="OnlyIncludeBase" type="boolean" minOccurs="0"/>
</sequence>
</complexType>
<complexType name="ContainerID">
<sequence>
<element name="APIObject" type="tns:APIObject" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<complexType abstract="true" name="Request"/>
<complexType name="Result">
<sequence>
<element name="StatusCode" type="xsd:string"/>
<element name="StatusMessage" type="xsd:string"/>
<element name="OrdinalID" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<element name="ErrorCode" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<element name="RequestID" minOccurs="0" type="xsd:string"/>
<element name="ConversationID" minOccurs="0" type="xsd:string"/>
<element name="OverallStatusCode" minOccurs="0" type="xsd:string"/>
<element name="RequestType" minOccurs="0" type="tns:RequestType"/>
<element name="ResultType" minOccurs="0" type="xsd:string"/>
<element name="ResultDetailXML" minOccurs="0" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ResultMessage">
<complexContent>
<extension base="tns:APIObject">
<sequence>
<element name="RequestID" minOccurs="0" type="xsd:string"/>
<element name="ConversationID" minOccurs="0" type="xsd:string"/>
<element name="OverallStatusCode" minOccurs="0" type="xsd:string"/>
<element name="StatusCode" minOccurs="0" type="xsd:string"/>
<element name="StatusMessage" minOccurs="0" type="xsd:string"/>
<element name="ErrorCode" minOccurs="0" type="xsd:int"/>
<element name="RequestType" minOccurs="0" type="tns:RequestType"/>
<element name="ResultType" minOccurs="0" type="xsd:string"/>
<element name="ResultDetailXML" minOccurs="0" type="xsd:string"/>
<element name="SequenceCode" minOccurs="0" type="xsd:int"/>
<element name="CallsInConversation" minOccurs="0" type="xsd:int"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="ResultItem">
<complexContent>
<extension base="tns:APIObject">
<sequence>
<element name="RequestID" minOccurs="0" type="xsd:string"/>
<element name="ConversationID" minOccurs="0" type="xsd:string"/>
<element name="StatusCode" type="xsd:string"/>
<element name="StatusMessage" type="xsd:string"/>
<element name="OrdinalID" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<element name="ErrorCode" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<element name="RequestType" minOccurs="0" type="tns:RequestType"/>
<element name="RequestObjectType" minOccurs="0" type="xsd:string"/>
</sequence>
</extension>
</complexContent>
</complexType>
<simpleType name="Priority">
<restriction base="xsd:string">
<enumeration value="Low"/>
<enumeration value="Medium"/>
<enumeration value="High"/>
</restriction>
</simpleType>
<complexType abstract="true" name="Options">
<sequence>
<element name="Client" type="tns:ClientID" minOccurs="0" maxOccurs="1"/>
<element name="SendResponseTo" type="tns:AsyncResponse" minOccurs="0" maxOccurs="unbounded"/>
<element name="SaveOptions" minOccurs="0" maxOccurs="1">
<complexType>
<sequence>
<element name="SaveOption" minOccurs="0" maxOccurs="unbounded" type="tns:SaveOption"/>
</sequence>
</complexType>
</element>
<element name="Priority" minOccurs="0" type="xsd:byte"/>
<element name="ConversationID" minOccurs="0" type="xsd:string"/>
<element name="SequenceCode" minOccurs="0" type="xsd:int"/>
<element name="CallsInConversation" minOccurs="0" type="xsd:int"/>
<element name="ScheduledTime" minOccurs="0" type="xsd:dateTime"/>
<element name="RequestType" minOccurs="0" type="tns:RequestType"/>
<element name="QueuePriority" minOccurs="0" type="tns:Priority"/>
</sequence>
</complexType>
<complexType name="TaskResult">
<sequence>
<element name="StatusCode" type="xsd:string"/>
<element name="StatusMessage" type="xsd:string"/>
<element name="OrdinalID" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<element name="ErrorCode" minOccurs="0" maxOccurs="1" type="xsd:int"/>
<element name="ID" minOccurs="0" type="xsd:string"/>
<element name="InteractionObjectID" minOccurs="0" type="xsd:string"/>
</sequence>
</complexType>
<simpleType name="RequestType">
<restriction base="xsd:string">
<enumeration value="Synchronous"/>
<enumeration value="Asynchronous"/>
</restriction>
</simpleType>
<simpleType name="RespondWhen">
<restriction base="xsd:string">
<enumeration value="Never"/>
<enumeration value="OnError"/>
<enumeration value="Always"/>
<enumeration value="OnConversationError"/>
<enumeration value="OnConversationComplete"/>
<enumeration value="OnCallComplete"/>
</restriction>
</simpleType>
<complexType name="SaveOption">
<sequence>
<element name="PropertyName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<element name="SaveAction" type="tns:SaveAction" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
<simpleType name="SaveAction">
<restriction base="xsd:string">
<enumeration value="AddOnly"/>
<enumeration value="Default"/>
<enumeration value="Nothing"/>
<enumeration value="UpdateAdd"/>
<enumeration value="UpdateOnly"/>
<enumeration value="Delete"/>
</restriction>
</simpleType>
<element name="CreateRequest">
<complexType>
<sequence>
<element name="Options" type="tns:CreateOptions" minOccurs="1" maxOccurs="1"/>
<element name="Objects" type="tns:APIObject" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
<complexType name="CreateResult">
<complexContent>
<extension base="tns:Result">
<sequence>
<element name="NewID" type="xsd:int"/>
<element name="NewObjectID" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="PartnerKey" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="Object" type="tns:APIObject" minOccurs="0"/>
<element name="CreateResults" minOccurs="0" maxOccurs="unbounded" type="tns:CreateResult"/>
<element name="ParentPropertyName" minOccurs="0" maxOccurs="1" type="xsd:string"/>
</sequence>
</extension>
</complexContent>
</complexType>
<element name="CreateResponse">
<complexType>
<sequence>
<element name="Results" type="tns:CreateResult" minOccurs="1" maxOccurs="unbounded"/>
<element name="RequestID" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="OverallStatus" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
</element>
<complexType name="CreateOptions">
<complexContent>
<extension base="tns:Options">
<sequence>
<element name="Container" type="tns:ContainerID" minOccurs="0" maxOccurs="1"/>
</sequence>
</extension>
</complexContent>
</complexType>
<element name="CreateOptions" type="tns:CreateOptions"/>
<complexType name="UpdateOptions">
<complexContent>
<extension base="tns:Options">
<sequence>
<element name="Container" type="tns:ContainerID" minOccurs="0" maxOccurs="1"/>
<element name="Action" type="xsd:string" minOccurs="0" maxOccurs="1"/>
</sequence>
</extension>
</complexContent>
</complexType>
<element name="UpdateOptions" type="tns:UpdateOptions"/>
<element name="UpdateRequest">
<complexType>
<sequence>
<element name="Options" type="tns:UpdateOptions" minOccurs="1" maxOccurs="1"/>
<element name="Objects" type="tns:APIObject" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
<complexType name="UpdateResult">
<complexContent>
<extension base="tns:Result">
<sequence>
<element name="Object" type="tns:APIObject"/>
<element name="UpdateResults" minOccurs="0" maxOccurs="unbounded" type="tns:UpdateResult"/>
<element name="ParentPropertyName" minOccurs="0" maxOccurs="1" type="xsd:string"/>
</sequence>
</extension>
</complexContent>
</complexType>
<element name="UpdateResponse">
<complexType>
<sequence>
<element name="Results" type="tns:UpdateResult" minOccurs="1" maxOccurs="unbounded"/>
<element name="RequestID" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="OverallStatus" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
</element>
<complexType name="DeleteOptions">
<complexContent>
<extension base="tns:Options"/>
</complexContent>
</complexType>
<element name="DeleteOptions" type="tns:DeleteOptions"/>
<element name="DeleteRequest">
<complexType>
<sequence>
<element name="Options" type="tns:DeleteOptions" minOccurs="1" maxOccurs="1"/>
<element name="Objects" type="tns:APIObject" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
<complexType name="DeleteResult">
<complexContent>
<extension base="tns:Result">
<sequence>
<element name="Object" type="tns:APIObject"/>
</sequence>
</extension>
</complexContent>
</complexType>
<element name="DeleteResponse">
<complexType>
<sequence>
<element name="Results" type="tns:DeleteResult" minOccurs="1" maxOccurs="unbounded"/>
<element name="RequestID" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="OverallStatus" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
</element>
<complexType name="RetrieveRequest">
<sequence>
<element name="ClientIDs" type="tns:ClientID" minOccurs="0" maxOccurs="unbounded"/>
<element name="ObjectType" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<element name="Properties" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
<element name="Filter" type="tns:FilterPart" minOccurs="0" maxOccurs="1"/>
<element name="RespondTo" type="tns:AsyncResponse" minOccurs="0" maxOccurs="unbounded"/>
<element name="PartnerProperties" type="tns:APIProperty" minOccurs="0" maxOccurs="unbounded"/>
<element name="ContinueRequest" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="QueryAllAccounts" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
<element name="RetrieveAllSinceLastBatch" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
<element name="RepeatLastResult" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
<element name="Retrieves" minOccurs="0">
<complexType>
<sequence>
<element name="Request" type="tns:Request" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
<element name="Options" type="tns:RetrieveOptions" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<element name="RetrieveRequestMsg">
<complexType>
<sequence>
<element name="RetrieveRequest" type="tns:RetrieveRequest" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
</element>
<element name="RetrieveResponseMsg">
<complexType>
<sequence>
<element name="OverallStatus" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<element name="RequestID" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="Results" type="tns:APIObject" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
<complexType name="RetrieveSingleRequest">
<complexContent>
<extension base="tns:Request">
<sequence>
<element name="RequestedObject" type="tns:APIObject" minOccurs="1" maxOccurs="1"/>
<element name="RetrieveOption" type="tns:Options" minOccurs="0" maxOccurs="1"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="Parameters">
<sequence>
<element name="Parameter" type="tns:APIProperty" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="RetrieveSingleOptions">
<complexContent>
<extension base="tns:Options">
<sequence>
<element name="Parameters" type="tns:Parameters">
<annotation>
<documentation/>
</annotation>
</element>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="RetrieveOptions">
<complexContent>
<extension base="tns:Options">
<sequence>
<element name="BatchSize" minOccurs="0" type="xsd:int"/>
<element name="IncludeObjects" type="boolean" minOccurs="0"/>
<element name="OnlyIncludeBase" type="boolean" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="QueryRequest">
<sequence>
<element name="ClientIDs" type="tns:ClientID" minOccurs="0" maxOccurs="unbounded"/>
<element name="Query" type="tns:Query" minOccurs="1" maxOccurs="1"/>
<element name="RespondTo" type="tns:AsyncResponse" minOccurs="0" maxOccurs="unbounded"/>
<element name="PartnerProperties" type="tns:APIProperty" minOccurs="0" maxOccurs="unbounded"/>
<element name="ContinueRequest" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="QueryAllAccounts" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
<element name="RetrieveAllSinceLastBatch" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<element name="QueryRequestMsg">
<complexType>
<sequence>
<element name="QueryRequest" type="tns:QueryRequest" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
</element>
<element name="QueryResponseMsg">
<complexType>
<sequence>
<element name="OverallStatus" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<element name="RequestID" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<element name="Results" type="tns:APIObject" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
<complexType name="QueryObject">
<sequence>
<element name="ObjectType" minOccurs="1" maxOccurs="1" type="xsd:string"/>
<element name="Properties" minOccurs="1" maxOccurs="unbounded" type="xsd:string"/>
<element name="Objects" minOccurs="0" maxOccurs="unbounded" type="tns:QueryObject"/>
</sequence>
</complexType>
<complexType name="Query">
<sequence>
<element name="Object" minOccurs="1" maxOccurs="1" type="tns:QueryObject"/>
<element name="Filter" type="tns:FilterPart" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<complexType name="FilterPart"/>
<complexType name="SimpleFilterPart">
<complexContent>
<extension base="tns:FilterPart">
<sequence>
<element name="Property" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<element name="SimpleOperator" type="tns:SimpleOperators" minOccurs="1" maxOccurs="1"/>
<element name="Value" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
<element name="DateValue" type="xsd:dateTime" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="TagFilterPart">
<complexContent>
<extension base="tns:FilterPart">
<sequence>
<element name="Tags" minOccurs="0">
<complexType>
<sequence>
<element name="Tag" minOccurs="0" maxOccurs="unbounded" type="xsd:string"/>
</sequence>
</complexType>
</element>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="ComplexFilterPart">
<complexContent>
<extension base="tns:FilterPart">
<sequence>
<element name="LeftOperand" type="tns:FilterPart" minOccurs="1" maxOccurs="1"/>
<element name="LogicalOperator" type="tns:LogicalOperators" minOccurs="1" maxOccurs="1"/>
<element name="RightOperand" type="tns:FilterPart" minOccurs="0" maxOccurs="1"/>
<element name="AdditionalOperands" minOccurs="0" maxOccurs="1">
<complexType>
<sequence>
<element name="Operand" minOccurs="0" maxOccurs="unbounded" type="tns:FilterPart"/>
</sequence>
</complexType>
</element>
</sequence>
</extension>
</complexContent>
</complexType>
<simpleType name="SimpleOperators">
<restriction base="xsd:string">
<enumeration value="equals"/>
<enumeration value="notEquals"/>
<enumeration value="greaterThan"/>
<enumeration value="lessThan"/>
<enumeration value="isNull"/>
<enumeration value="isNotNull"/>
<enumeration value="greaterThanOrEqual"/>
<enumeration value="lessThanOrEqual"/>
<enumeration value="between"/>
<enumeration value="IN"/>
<enumeration value="like"/>
<enumeration value="existsInString"/>
<enumeration value="existsInStringAsAWord"/>
<enumeration value="notExistsInString"/>
<enumeration value="beginsWith"/>
<enumeration value="endsWith"/>
<enumeration value="contains"/>
<enumeration value="notContains"/>
<enumeration value="isAnniversary"/>
<enumeration value="isNotAnniversary"/>
<enumeration value="greaterThanAnniversary"/>
<enumeration value="lessThanAnniversary"/>
</restriction>
</simpleType>
<simpleType name="LogicalOperators">
<restriction base="xsd:string">
<enumeration value="OR"/>
<enumeration value="AND"/>
</restriction>
</simpleType>
<element name="DefinitionRequestMsg">
<complexType>
<sequence>
<element name="DescribeRequests" minOccurs="0" maxOccurs="1" type="tns:ArrayOfObjectDefinitionRequest"/>
</sequence>
</complexType>
</element>
<complexType name="ArrayOfObjectDefinitionRequest">
<sequence>
<element name="ObjectDefinitionRequest" minOccurs="0" maxOccurs="unbounded" nillable="true" type="tns:ObjectDefinitionRequest"/>
</sequence>
</complexType>
<complexType name="ObjectDefinitionRequest">
<sequence>
<element name="Client" minOccurs="0" maxOccurs="1" type="tns:ClientID"/>
<element name="ObjectType" minOccurs="0" maxOccurs="1" type="string"/>
</sequence>
</complexType>
<element name="DefinitionResponseMsg">
<complexType>
<sequence>
<element minOccurs="0" maxOccurs="unbounded" name="ObjectDefinition" type="tns:ObjectDefinition"/>
<element minOccurs="0" maxOccurs="1" name="RequestID" type="string"/>
</sequence>
</complexType>
</element>
...


<message name="queryResponse">
<part element="tns:QueryResponseMsg" name="parameters"/>
</message>
<message name="definitionRequest">
<part element="tns:DefinitionRequestMsg" name="parameters"/>
</message>
<message name="definitionResponse">
<part element="tns:DefinitionResponseMsg" name="parameters"/>
</message>
<message name="executeRequest">
<part element="tns:ExecuteRequestMsg" name="parameters"/>
</message>
1

I assume you are getting the WSDL from https://webservice.exacttarget.com/etframework.wsdl or one of the variations as per Working with SOAP Web Service API and Getting Started Developers and the ExactTarget API.

Those WSDLs feature import elements, which the normal web version of WSDL2Apex can't handle. Did you manually flatten the WSDL before using it?

Through work I've made an independent version of WSDL2Apex that is compatible with WebServiceCallout.invoke and can handle the import elements. You can get it for free from http://www.fuseit.com/explorer. I was able to generate the Apex classes for ExactTarget with this.

public exacttargetComWsdlPartnerapi.DefinitionResponseMsg_element Describe(exacttargetComWsdlPartnerapi.ArrayOfObjectDefinitionRequest DescribeRequests) {
    exacttargetComWsdlPartnerapi.DefinitionRequestMsg_element request_x = new exacttargetComWsdlPartnerapi.DefinitionRequestMsg_element();
    exacttargetComWsdlPartnerapi.DefinitionResponseMsg_element response_x;
    request_x.DescribeRequests = DescribeRequests;
    Map<String, exacttargetComWsdlPartnerapi.DefinitionResponseMsg_element> response_map_x = new Map<String, exacttargetComWsdlPartnerapi.DefinitionResponseMsg_element>();
    response_map_x.put('response_x', response_x);
    WebServiceCallout.invoke(
        this,
        request_x,
        response_map_x,
        new String[]{endpoint_x,
        'Describe',
        'http://exacttarget.com/wsdl/partnerAPI',
        'DefinitionRequestMsg',
        'http://exacttarget.com/wsdl/partnerAPI',
        'DefinitionResponseMsg',
        'exacttargetComWsdlPartnerapi.DefinitionResponseMsg_element'}
    );
    response_x = response_map_x.get('response_x');
    return response_x;
}

Alternatively, there is the open source WSDL2Apex implementation from Salesforce. You could modify this to support import elements and merge it back for everyone to use.

2
  • I took the WSDL from webservice.exacttarget.com/etframework.wsdl but i removed the import tag and replaced it with the schema information it was importing. Is that what you mean by manually flattening? I tried using fuseit, but it is not compatible with OS X, so I could not download. The method you posted, is that just a method as a part of the APEX class or is that what would be generated from that entire WSDL? Feb 18 '15 at 20:16
  • Yes, that is what I meant by flattening the WSDL into a single file. There is web version of our FuseIT WSDL2Apex tool that you can use. The method I posted is only a small subset of the entire class. Feb 18 '15 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.