1

I am trying wsdl for first time. When I try to generate from wsdl to my salesforce. I am getting error :

Error Apex Generation Failed Unable to find schema for element; {http://tempuri.org/}Get3DAssemblyFile_STLResponse

I try by remove the Get3DAssemblyFile_STLResponse but getting error while uploading. I am getting error on the 3rd step Generated Code

My wsdl file

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"  xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://tempuri.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://tempuri.org/" name="GeometryDataService">


<wsdl:types>


<xsd:schema targetNamespace="http://tempuri.org/Imports">

 <!-- <xsd:import schemaLocation="http://geometry.etoedge.com/GeometryService/Service.svc?xsd=xsd0" namespace="http://tempuri.org/" /> <xsd:import schemaLocation="http://geometry.etoedge.com/GeometryService/Service.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/> <xsd:import schemaLocation="http://geometry.etoedge.com/GeometryService/Service.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/" /> -->


</xsd:schema>

<xsd:schema targetNamespace="http://geometry.etoedge.com/GeometryService/Service.svc?xsd=xsd0"/>

<xsd:schema targetNamespace="http://geometry.etoedge.com/GeometryService/Service.svc?xsd=xsd1"/>

 <xsd:schema targetNamespace="http://geometry.etoedge.com/GeometryService/Service.svc?xsd=xsd2"/>

 <xsd:schema targetNamespace="http://tempuri.org/IGeometryDataService"/>

 </wsdl:types>


-<wsdl:message name="IGeometryDataService_GetData_InputMessage">

 <wsdl:part name="parameters" element="tns:GetData"/>

 </wsdl:message>


 -<wsdl:message name="IGeometryDataService_GetData_OutputMessage">

  <wsdl:part name="parameters" element="tns:GetDataResponse"/>

   </wsdl:message>
   -<wsdl:message name="IGeometryDataService_GetDataUsingDataContract_InputMessage">

    <wsdl:part name="parameters" element="tns:GetDataUsingDataContract"/>

</wsdl:message>


-<wsdl:message name="IGeometryDataService_GetDataUsingDataContract_OutputMessage">

 <wsdl:part name="parameters" element="tns:GetDataUsingDataContractResponse"/>

 </wsdl:message>


 -<wsdl:message name="IGeometryDataService_Assemble3DFile_InputMessage">

 <wsdl:part name="parameters" element="tns:Assemble3DFile"/>

 </wsdl:message>


 -<wsdl:message name="IGeometryDataService_Assemble3DFile_OutputMessage">

 <wsdl:part name="parameters" element="tns:Assemble3DFileResponse"/>

 </wsdl:message>


 -<wsdl:message name="IGeometryDataService_Get3DAssemblyFile_ZIP_InputMessage">

 <wsdl:part name="parameters" element="tns:Get3DAssemblyFile_ZIP"/>

 </wsdl:message>


 -<wsdl:message name="IGeometryDataService_Get3DAssemblyFile_ZIP_OutputMessage">

 <wsdl:part name="parameters" element="tns:Get3DAssemblyFile_ZIPResponse"/>

 </wsdl:message>


 -<wsdl:message name="IGeometryDataService_Get3DAssemblyFile_PDF_InputMessage">

 <wsdl:part name="parameters" element="tns:Get3DAssemblyFile_PDF"/>

 </wsdl:message>


 -<wsdl:message    name="IGeometryDataService_Get3DAssemblyFile_PDF_OutputMessage">

 <wsdl:part name="parameters" element="tns:Get3DAssemblyFile_PDFResponse"/>

 </wsdl:message>


 -<wsdl:message name="IGeometryDataService_Get3DAssemblyFile_STL_InputMessage">

 <wsdl:part name="parameters" element="tns:Get3DAssemblyFile_STL"/>

 </wsdl:message>


 -<wsdl:message name="IGeometryDataService_Get3DAssemblyFile_STL_OutputMessage">

 <wsdl:part name="parameters" element="tns:Get3DAssemblyFile_STLResponse"/>

 </wsdl:message>


-<wsdl:portType name="IGeometryDataService">


   -<wsdl:operation name="GetData">

   <wsdl:input message="tns:IGeometryDataService_GetData_InputMessage" wsaw:Action="http://tempuri.org/IGeometryDataService/GetData"/>

   <wsdl:output message="tns:IGeometryDataService_GetData_OutputMessage" wsaw:Action="http://tempuri.org/IGeometryDataService/GetDataResponse"/>

   </wsdl:operation>


-<wsdl:operation name="GetDataUsingDataContract">

 <wsdl:input message="tns:IGeometryDataService_GetDataUsingDataContract_InputMessage" wsaw:Action="http://tempuri.org/IGeometryDataService/GetDataUsingDataContract"/>

    <wsdl:output message="tns:IGeometryDataService_GetDataUsingDataContract_OutputMessage" wsaw:Action="http://tempuri.org/IGeometryDataService/GetDataUsingDataContractResponse"/>

    </wsdl:operation>


   -<wsdl:operation name="Assemble3DFile">

<wsdl:input message="tns:IGeometryDataService_Assemble3DFile_InputMessage" wsaw:Action="http://tempuri.org/IGeometryDataService/Assemble3DFile"/>

     <wsdl:output message="tns:IGeometryDataService_Assemble3DFile_OutputMessage" wsaw:Action="http://tempuri.org/IGeometryDataService/Assemble3DFileResponse"/>

    </wsdl:operation>


    -<wsdl:operation name="Get3DAssemblyFile_ZIP">

 <wsdl:input message="tns:IGeometryDataService_Get3DAssemblyFile_ZIP_InputMessage" wsaw:Action="http://tempuri.org/IGeometryDataService/Get3DAssemblyFile_ZIP"/>

<wsdl:output message="tns:IGeometryDataService_Get3DAssemblyFile_ZIP_OutputMessage" wsaw:Action="http://tempuri.org/IGeometryDataService/Get3DAssemblyFile_ZIPResponse"/>

    </wsdl:operation>


   -<wsdl:operation name="Get3DAssemblyFile_PDF">

    <wsdl:input message="tns:IGeometryDataService_Get3DAssemblyFile_PDF_InputMessage" wsaw:Action="http://tempuri.org/IGeometryDataService/Get3DAssemblyFile_PDF"/>

 <wsdl:output message="tns:IGeometryDataService_Get3DAssemblyFile_PDF_OutputMessage" wsaw:Action="http://tempuri.org/IGeometryDataService/Get3DAssemblyFile_PDFResponse"/>

    </wsdl:operation>


    -<wsdl:operation name="Get3DAssemblyFile_STL">

 <wsdl:input message="tns:IGeometryDataService_Get3DAssemblyFile_STL_InputMessage" wsaw:Action="http://tempuri.org/IGeometryDataService/Get3DAssemblyFile_STL"/>

  <wsdl:output message="tns:IGeometryDataService_Get3DAssemblyFile_STL_OutputMessage" wsaw:Action="http://tempuri.org/IGeometryDataService/Get3DAssemblyFile_STLResponse"/>

    </wsdl:operation>

    </wsdl:portType>


    -<wsdl:binding name="BasicHttpBinding_IGeometryDataService" type="tns:IGeometryDataService">

    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>


    -<wsdl:operation name="GetData">

    <soap:operation style="document" soapAction="http://tempuri.org/IGeometryDataService/GetData"/>


    -<wsdl:input>

  <soap:body use="literal"/>

  </wsdl:input>


  -<wsdl:output>

     <soap:body use="literal"/>

    </wsdl:output>

    </wsdl:operation>


    -<wsdl:operation name="GetDataUsingDataContract">

   <soap:operation style="document" soapAction="http://tempuri.org/IGeometryDataService/GetDataUsingDataContract"/>


   -<wsdl:input>

    <soap:body use="literal"/>

    </wsdl:input>


  -<wsdl:output>

   <soap:body use="literal"/>

   </wsdl:output>

   </wsdl:operation>


  -<wsdl:operation name="Assemble3DFile">

  <soap:operation style="document" soapAction="http://tempuri.org/IGeometryDataService/Assemble3DFile"/>


    -<wsdl:input>

     <soap:body use="literal"/>

    </wsdl:input>


    -<wsdl:output>

    <soap:body use="literal"/>

      </wsdl:output>

    </wsdl:operation>


    -<wsdl:operation name="Get3DAssemblyFile_ZIP">

    <soap:operation style="document" soapAction="http://tempuri.org/IGeometryDataService/Get3DAssemblyFile_ZIP"/>


   -<wsdl:input>

   <soap:body use="literal"/>

     </wsdl:input>


   -<wsdl:output>

    <soap:body use="literal"/>

    </wsdl:output>

   </wsdl:operation>


  -<wsdl:operation name="Get3DAssemblyFile_PDF">

   <soap:operation style="document" soapAction="http://tempuri.org/IGeometryDataService/Get3DAssemblyFile_PDF"/>


   -<wsdl:input>

    <soap:body use="literal"/>

   </wsdl:input>


   -<wsdl:output>

    <soap:body use="literal"/>

   </wsdl:output>

   </wsdl:operation>


     -<wsdl:operation name="Get3DAssemblyFile_STL">

    <soap:operation style="document" soapAction="http://tempuri.org/IGeometryDataService/Get3DAssemblyFile_STL"/>


   -<wsdl:input>

    <soap:body use="literal"/>

   </wsdl:input>


   -<wsdl:output>

    <soap:body use="literal"/>

    </wsdl:output>

    </wsdl:operation>

    </wsdl:binding>


    -<wsdl:service name="GeometryDataService">


     -<wsdl:port name="BasicHttpBinding_IGeometryDataService" binding="tns:BasicHttpBinding_IGeometryDataService">

     <soap:address location="http://geometry.etoedge.com/GeometryService/Service.svc"/>

     </wsdl:port>

     </wsdl:service>

      </wsdl:definitions>

Not able to understand why this error comes. Please help me fix this error.

  • Are you creating WSDL?? – Shantanu Mahajan Jul 7 '15 at 11:52
  • yes I am trying to create WSDL – Anu Jul 7 '15 at 11:53
2

From your WSDL at http://geometry.etoedge.com/GeometryService/Service.svc, it appears you are trying to work around the Wsdl2Apex limitations for xsd:import.

At a guess, I'd say something was broken around Get3DAssemblyFile when you flattened the WSDL.

I've done a lot of work in this area and presented it at last years Dreamforce. See Improved Apex support for SOAP based web services.

Using the FuseIT SDFC Explorer implementation of Wsdl2Apex I was able to generate and deploy Apex classes from the source WSDL (Full Disclosure, FuseIT is my current employer). You end up with two Apex clasess. tempuriOrg and schemasDatacontractOrg200407. These can be renamed as required during the generation process.

If for some reason you really don't want to use my implementation of WSDL2Apex, you could also try using the WSDL from http://geometry.etoedge.com/GeometryService/Service.svc?singlewsdl. .NET will now remove the imports for you using the singleWsdl parameter.

There is also the open source version of Wsdl2Apex if you want to improve the native support for your issue.

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.