bet365 / soap

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

Parse WSDL Without Services #30

Open greenyouse opened 6 years ago

greenyouse commented 6 years ago

I have some WSDLs that pull in services from other WSDLs using imports. When I try running soap:wsdl2erlang on the files, it errors out with:

** exception error: no function clause matching 
                    soap_parse_wsdl:'-services/1-lc$^0/1-0-'(undefined) (src/soap_parse_wsdl.erl, line 114)
     in function  soap_parse_wsdl:get_services/3 (src/soap_parse_wsdl.erl, line 105)
     in call from soap_parse_wsdl:get_services/3 (src/soap_parse_wsdl.erl, line 110)
     in call from soap:wsdl2erlang/2 (/tmp/soap/_build/default/lib/soap/src/soap.erl, line 305)

For reproduction I uploaded a modified version of the w3schools TempConverter WSDL from the docs. There's a services WSDL that contains all the services and an abstract WSDL with the rest of the code.

I'm not sure what the best way to handle this would be. In Java wsimport outputs class files for each service but since this outputs a file per WSDL maybe there's a way to merge abstract and service WSDLs? If this doesn't sound like a common use case then feel free to close it and I'll stick to editing the files by hand.

benjamin-bergia commented 6 years ago

I am trying to work with the VMWare WebService API and I get the same issue.