1

when i try to parse the following WSDL then it gives me error::"Failed to parse wsdl: Unable to find wsdl:binding in the specified wsdl"

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


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


  <!--
<wsdl:import namespace="http://tempuri.org/" location="https://sv7767.si-servers.com/Streamics-test/External.svc?wsdl=wsdl0"/>
  -->

  <wsdl:types>

    <!--
<xsd:schema targetNamespace="http://www.materialise.be/eRP/Imports">


<xsd:import schemaLocation="https://sv7767.si-servers.com/Streamics-test/External.svc?xsd=xsd0" namespace="http://www.materialise.be/eRP"/>

<xsd:import schemaLocation="https://sv7767.si-servers.com/Streamics-test/External.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>

<xsd:import schemaLocation="https://sv7767.si-servers.com/Streamics-test/External.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/eRP.ExternalService.Model"/>

<xsd:import schemaLocation="https://sv7767.si-servers.com/Streamics-test/External.svc?xsd=xsd3" namespace="http://schemas.datacontract.org/2004/07/eRP.ExternalService.Model.Base"/>

<xsd:import schemaLocation="https://sv7767.si-servers.com/Streamics-test/External.svc?xsd=xsd4" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>

<xsd:import schemaLocation="https://sv7767.si-servers.com/Streamics-test/External.svc?xsd=xsd5" namespace="http://schemas.datacontract.org/2004/07/Materialise.eRP.Entities"/>


< /xsd:schema>
  -->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.materialise.be/eRP" />
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" />

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.datacontract.org/2004/07/eRP.ExternalService.Model" />
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.datacontract.org/2004/07/eRP.ExternalService.Model.Base" />

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.datacontract.org/2004/07/Materialise.eRP.Entities" />
  </wsdl:types>


  <wsdl:service name="ExternalServiceFacade">

    <wsdl:port name="BasicHttpBinding_IExternalService" binding="i0:BasicHttpBinding_IExternalService">
      <soap:address location="https://sv7767.si-servers.com/Streamics-test/External.svc" />
    </wsdl:port>
  </wsdl:service>
2
  • That WSDL is missing a lot of < characters. Are you able to clean it up a bit? Aug 12, 2014 at 9:38
  • Daniel i clean it up please share the the solution now
    – user10843
    Aug 12, 2014 at 9:49

1 Answer 1

1

The error here is reasonably clear.

In the service element there is a reference to a binding binding="i0:BasicHttpBinding_IExternalService".

There is no binding element in the wsdl with that name.

WSDL 1.1 will have the following elements.

WSDL1.1

Notice how the service port references a binding. You have the service and the port, but the BasicHttpBinding_IExternalService binding is missing.

By the looks of it someone has been taking sections out of the wsdl. In particular, there are large sections of <xsd:import> commented out. This will most likely be due to the native wsdl2apex tool not supporting these. If you are on windows you might want to try the alternative tool by FuseIT. (Full Disclosure: I work for FuseIT. The tool is free to download and use). This alternative Apex generator should be able to handle the imports without you needing to modify the WSDL by hand.

1
  • @user10843 I'd recommend you go back to the original WSDL and start again. If the binding wasn't there from the start you have a larger issue. Aug 12, 2014 at 20:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .