function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
krishna59krishna59 

Apex code generation failed from wsdl

HI,

I am trying to generate apex code from wsdl.Below is the file content .The file parses fine.But while generating apex code i got the error Apex Generatoin Failed Element not defined for part 'notification_response'. 


Can any one help me on this.

 

<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:typens="urn:WashOut" targetNamespace="urn:WashOut" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xsd:schema targetNamespace="urn:WashOut">
<xsd:complexType name="request">
<xsd:sequence>
<xsd:element name="notification" type="typens:notification"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="notification">
<xsd:sequence>
<xsd:element name="sObject" type="typens:sObject"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="sObject">
<xsd:sequence>
<xsd:element name="id" type="xsd:string"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="notification_response">
<xsd:sequence>
<xsd:element name="ack" type="xsd:boolean"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="notifications">
<wsdl:part name="request" type="typens:request"></wsdl:part>
</wsdl:message>
<wsdl:message name="notifications_response">
<wsdl:part name="notification_response" type="typens:notification_response"></wsdl:part>
</wsdl:message>
<wsdl:portType name="salesforce_accounts_port">
<wsdl:operation name="notifications">
<wsdl:input message="typens:notifications"></wsdl:input>
<wsdl:output message="typens:notifications_response"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="salesforce_accounts_binding" type="typens:salesforce_accounts_port">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"></soap:binding>
<wsdl:operation name="notifications">
<soap:operation soapAction="notifications"></soap:operation>
<wsdl:input>
<soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:WashOut"></soap:body>
</wsdl:input>
<wsdl:output>
<soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:WashOut"></soap:body>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="service">
<wsdl:port name="salesforce_accounts_port" binding="typens:salesforce_accounts_binding">
<soap:address location="http://localhost:3000/salesforce_accounts/action?controller=salesforce_accounts"></soap:address>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

 

 

 

 

Thanks,

Krishna.

 

Avidev9Avidev9
Well seems like a incomplete WSDL, the complex type "notification_response" is not defined in the WSDL class.
krishna59krishna59

Hi Avidev9

 

The complex type notification_response is defined in the wsdl at line 29.Below is the code.

 

<xsd:complexType name="notification_response">
<xsd:sequence>
<xsd:element name="ack" type="xsd:boolean"></xsd:element>
</xsd:sequence>
</xsd:complexType>

 

 

Thanks

krishna.

 

 

BUSYB0YBUSYB0Y

Did you modify the WSDL in any way?