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
Deeps_DeepDeeps_Deep 

Apex classes generation failed from WSDL File

I am getting when trying to generate apex classes from a WSDL generated by Inforamtica Web Service.
 
Error: Unable to find element for {http://www.informatica.com/wsdl/}t_targetResponse
 
I don't know what can be done with this element. Has anybody faced this kind of issue ?
 
Here is my WSDL file.

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:n="http://www.informatica.com/wsdl/" xmlns:infa="http://www.informatica.com/" targetNamespace="http://www.informatica.com/" xmlns="http://schemas.xmlsoap.org/wsdl/">
 <wsdl:types>
 <xsd:schema targetNamespace="http://www.informatica.com/wsdl/" xmlns="http://www.informatica.com/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:infatype="http://www.informatica.com/types/" elementFormDefault="qualified" attributeFormDefault="unqualified">
  <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/http/" />
  <xsd:element name="ws_ip_op_resp_2Response" type="ws_ip_op_resp_2ResponseType" />
 <xsd:complexType name="ws_ip_op_resp_2RequestType">
 <xsd:sequence>
 <xsd:element name="ws_ip_op_resp_2RequestElement">
 <xsd:complexType>
 <xsd:sequence>
 <xsd:element name="Address_ID" minOccurs="0" maxOccurs="1">
 <xsd:simpleType>
  <xsd:restriction base="xsd:decimal" />
  </xsd:simpleType>
  </xsd:element>
  </xsd:sequence>
  </xsd:complexType>
  </xsd:element>
  </xsd:sequence>
  </xsd:complexType>
 <xsd:complexType name="ws_ip_op_resp_2ResponseType">
 <xsd:sequence>
 <xsd:element name="ws_ip_op_resp_2ResponseElement">
 <xsd:complexType>
 <xsd:sequence>
 <xsd:element name="Address_ID" minOccurs="0" maxOccurs="1">
 <xsd:simpleType>
  <xsd:restriction base="xsd:decimal" />
  </xsd:simpleType>
  </xsd:element>
  </xsd:sequence>
  </xsd:complexType>
  </xsd:element>
  </xsd:sequence>
  </xsd:complexType>
  <xsd:element name="ws_ip_op_resp_2Request" type="ws_ip_op_resp_2RequestType" />
  </xsd:schema>
  </wsdl:types>
 <wsdl:message name="t_targetOut">
  <wsdl:part name="parameters" element="n:t_targetResponse" />
  </wsdl:message>
 <wsdl:message name="ws_ip_op_resp_2In">
  <wsdl:part name="parameters" element="n:ws_ip_op_resp_2Request" />
  </wsdl:message>
 <wsdl:portType name="Salesforce_ip_op_resp2Port">
 <wsdl:operation name="Salesforce_ip_op_resp2Operation">
  <wsdl:input message="infa:ws_ip_op_resp_2In" />
  <wsdl:output message="infa:t_targetOut" />
  </wsdl:operation>
  </wsdl:portType>
 <wsdl:binding name="Salesforce_ip_op_resp2Binding" type="infa:Salesforce_ip_op_resp2Port">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
 <wsdl:operation name="Salesforce_ip_op_resp2Operation">
  <soap:operation soapAction="" style="document" />
 <wsdl:input>
  <soap:body use="literal" />
  </wsdl:input>
 <wsdl:output>
  <soap:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
 <wsdl:service name="Salesforce_ip_op_resp2">
 <wsdl:port name="Salesforce_ip_op_resp2Port" binding="infa:Salesforce_ip_op_resp2Binding">
  <soap:address location="https://gnwlonsdapomna:7343/wsh/services/RealTime/Salesforce_ip_op_resp2" />
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>
Thanks,
Deepak
Manoj_Manoj_

The wsdl file appears to be wrong.

Every element that is used in the wsdl file should be defined somewhere in the file

For eg ur wsdl has 2 lines which are similar 

1. <wsdl:part name="parameters" element="n:t_targetResponse" />

2. <wsdl:part name="parameters" element="n:ws_ip_op_resp_2Request" />


Line 1 refers to element "n:t_targetResponse"  

Line 2 refers to element "n:ws_ip_op_resp_2Request"

 

The element "n:ws_ip_op_resp_2Request" that is refered by line 2 is defined in the following line in the wsdl

<xsd:element name="ws_ip_op_resp_2Request" type="ws_ip_op_resp_2RequestType" />

 

But the element "n:t_targetResponse" is not defined in the wsdl and that is what the error is about.

 

So try regenerating the wsdl file and that should solve the issue.

 

Manoj

imuino2imuino2

Regenerate your WSDL for that go to your org select Setup -> Develop -> API and then choose enterprise or partner WSDL, copy the code generated and replace the code in your WSDL file.

 

Ignacio.

Deeps_DeepDeeps_Deep

Thanks for all for your replies.

The WSDL which I am using is generated from Informatica Web Service. As the developer said he is able to run the service from an inbuilt tool in Informatica. He is providing me with the same WSDL generated from the tool.

 

Is there anything that can be modified in the file in order to remove these errors ?

elghoul_girlelghoul_girl

Hello,

 

   I am facing the same problem. Can you please advice how did you solve these errors?

 

Thanks.

    Sally