devinus / detergent

An emulsifying Erlang SOAP library

Home Page:http://github.com/devinus/detergent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

addSchemas results in trying to read undefined?

edescourtis opened this issue · comments

89> detergent:initModel("http://pastebin.com/raw.php?i=B09KWTsS").
Ns:"http://schemas.xmlsoap.org/soap/encoding/" Loc:undefined --> ** exception throw: {'EXIT',{{badmatch,{error,enoent}},
[{detergent,get_url_file,1,
[{file,"detergent.erl"},{line,441}]},
{detergent,'-find_file_fun/1-fun-0-',4,
[{file,"detergent.erl"},{line,424}]},
{detergent,addSchemas,6,[{file,"detergent.erl"},{line,401}]},
{detergent,parseWsdls,5,[{file,"detergent.erl"},{line,363}]},
{detergent,initModel2,5,
[{file,"detergent.erl"},{line,337}]}]}}
in function detergent:get_url_file/1 (detergent.erl, line 441)
in call from detergent:'-find_file_fun/1-fun-0-'/4 (detergent.erl, line 424)
in call from detergent:addSchemas/6 (detergent.erl, line 401)
in call from detergent:parseWsdls/5 (detergent.erl, line 363)
in call from detergent:initModel2/5 (detergent.erl, line 337)
90>
I am not too sure what the issue is.

<?xml version="1.0"?>
<definitions name="ma"
  xmlns="http://schemas.xmlsoap.org/wsdl/"
  xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:hy="http://www.herongyang.com/Service/"
  xmlns:tns="https://www.mitel.com/MiXML/ma"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:ma="https://www.mitel.com/MiXML/ma"
  targetNamespace="https://www.mitel.com/MiXML/ma">

  <types>
    <schema 
      targetNamespace="https://www.mitel.com/MiXML/ma"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:ma="https://www.mitel.com/MiXML/ma"
      xmlns="http://www.w3.org/2001/XMLSchema"
      elementFormDefault="unqualified"
      attributeFormDefault="unqualified"
    >
    <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
    </schema>
  </types>

  <message name="helloInputMessage">
    <part name="helloInputPart" element="hy:HelloRequest"/>
  </message>
  <message name="helloOutputMessage">
    <part name="helloOutputPart" element="hy:HelloResponse"/>
  </message>

  <portType name="helloPortType">
    <operation name="Hello">
      <input name="helloInput"
        message="hy:helloInputMessage"/>
      <output name="helloOutput"
        message="hy:helloOutputMessage"/>
    </operation>
  </portType>

  <binding name="helloBinding" type="hy:helloPortType">
    <SOAP:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="Hello">
      <SOAP:operation
        soapAction="http://www.herongyang.com/Service/Hello"/>
      <input name="helloInput">
        <SOAP:body use="literal"/>
      </input>
      <output name="helloOutput">
        <SOAP:body use="literal"/>
      </output>
    </operation>
  </binding>

  <service name="helloService">
    <port name="helloPort" binding="hy:helloBinding">
      <SOAP:address
location="http://www.herongyang.com/Service/Hello_SOAP_11.php"/>
    </port>
  </service>

</definitions>

Seems to be caused by this line <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>