I am getting this error while generating wsdl file. Can any one help me to fix this error. My wsdl :

<?xml version="1.0" encoding="utf-8"?>

    <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 targetNamespace="http://tempuri.org/"></xsd:schema>
<xsd:schema targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/"></xsd:schema>
<xsd:schema targetNamespace="http://schemas.datacontract.org/2004/07/"></xsd:schema>
<!--<xsd:schema targetNamespace="http://tempuri.org/IGeometryDataService/Get3DAssemblyFile_STLResponse"></xsd:schema>-->

  • As you've noticed the Apex generation tooling from WSDL is pretty limited. You can't just comment out the imports, you have to manually gather the imported files and include them in your WSDL. – Keith C Jul 7 '15 at 14:25
  • I have comment xsd:import because it don't support in wsdl generation I have converted them to xsd:schema if you see xsd:schema it is same as xsd:import . – Anu Jul 7 '15 at 14:28
  • I search for a definition of Get3DAssemblyFile_STLResponse and didn't find it; did you miss an import? – Keith C Jul 7 '15 at 14:31
  • Sorry i think i missed in mu question. No i did not import because its url is tempuri.org/IGeometryDataService/Get3DAssemblyFile_STLResponse and iam already importing tempuri.org. Do you think I need to import tempuri.org/IGeometryDataService/Get3DAssemblyFile_STLResponse – Anu Jul 7 '15 at 14:35
  • You need to change references to all the external import files to copies of the content of those files embedded in the one WSDL file. – Keith C Jul 7 '15 at 14:36

The web service you are referencing (http://geometry.etoedge.com/GeometryService/Service.svc) has all the signs of being based on .NET.

When you ask for the WDSL, you have two options:

The former is the older way that .NET generated WSDLs. It is technically correct, but the native version of Wsdl2Apex doesn't support xsd:import.

The singleWsdl version will flatten this all down to a single WSDL that Wsdl2Apex will most likely support.

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.