bet365 / soap

Make it easy to use SOAP from Erlang
Apache License 2.0
200 stars 74 forks source link

Namespace not found when parsing a wsdl file (that works with parser from other languages) #44

Open lejoko opened 5 years ago

lejoko commented 5 years ago

When parsing the attached file api.wsdl.txt (remove .txt before testing. github doesn't accept a .wsdl file)

I get:

Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Eshell V9.2  (abort with ^G)
1> soap_parse_wsdl:get_namespaces("api.wsdl",[]).
** exception error: no match of right hand side value {error,"Namespace not found http://common.dto.ws.hss.onevox.com"}
     in function  soap_parse_wsdl:add_schemas/5 (/Users/joel/src/soaptest/deps/soap/src/soap_parse_wsdl.erl, line 214)
     in call from soap_parse_wsdl:parse_wsdls/3 (/Users/joel/src/soaptest/deps/soap/src/soap_parse_wsdl.erl, line 146)
     in call from soap_parse_wsdl:file/4 (/Users/joel/src/soaptest/deps/soap/src/soap_parse_wsdl.erl, line 80)
     in call from soap_parse_wsdl:get_model/2 (/Users/joel/src/soaptest/deps/soap/src/soap_parse_wsdl.erl, line 55)
     in call from soap_parse_wsdl:get_namespaces/2 (/Users/joel/src/soaptest/deps/soap/src/soap_parse_wsdl.erl, line 66)
2> 

And I can't manage to find the problem. Obviously there is no error when parsing the file with soap libraries of other programming languages (python, ruby).