Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when parsing a WSDL #10

Open
js-ojus opened this issue Sep 14, 2016 · 7 comments
Open

Error when parsing a WSDL #10

js-ojus opened this issue Sep 14, 2016 · 7 comments

Comments

@js-ojus
Copy link

js-ojus commented Sep 14, 2016

When using soap:wsdl2erlang(...). on http://demo-hotelws.touricoholidays.com/HotelFlow.svc?wsdl, I get the following.

** exception error: no function clause matching 
                    soap_parse_wsdl:'-services/1-lc$^0/1-0-'(undefined) (src/soap_parse_wsdl.erl, line 116)
     in function  soap_parse_wsdl:get_services/3 (src/soap_parse_wsdl.erl, line 107)
     in call from soap_parse_wsdl:get_services/3 (src/soap_parse_wsdl.erl, line 112)
     in call from soap:wsdl2erlang/2 (src/soap.erl, line 305)

A little investigation shows that erlsom:scan(...) is returning a bunch of undefined elements for the imported document at http://demo-hotelws.touricoholidays.com/HotelFlow.svc?wsdl=wsdl0.

So, it is possible that this is erlsom's problem. Or, it could be a problem with the model being passed to erlsom:scan.

In any case, could you take a look at this, please? All help is appreciated. Thanks!

@js-ojus
Copy link
Author

js-ojus commented Sep 16, 2016

Bumping this, because of urgency at my end! My apologies!

Could this be an erlsom issue @willemdj?

@willemdj
Copy link
Contributor

I think that it is more likely to be caused by a somewhat unusual structure of the WSDL. You could for example try to replace the bit

<wsdl:import namespace="http://tourico.com/webservices/hotelv3" location="http://demo-hotelws.touricoholidays.com/HotelFlow.svc?wsdl=wsdl0"/> <wsdl:types/>

by the contents (the wsdl:types part) of http://demo-hotelws.touricoholidays.com/HotelFlow.svc?wsdl

@js-ojus
Copy link
Author

js-ojus commented Sep 17, 2016

Thanks for your quick reply @willemdj!

I have downloaded both WSDLs, modified the main one to include the imported types. When this modified version is given as input, the referred XSDs are no longer being fetched from the net.

** exception error: no match of right hand side value {error,
                                                       "Include file not found http://demo-hotelws.touricoholidays.com/HotelFlow.svc?xsd=xsd0"}
     in function  soap_parse_wsdl:add_schemas/5 (src/soap_parse_wsdl.erl, line 215)
     in call from soap_parse_wsdl:parse_wsdls/3 (src/soap_parse_wsdl.erl, line 148)
     in call from soap_parse_wsdl:file/4 (src/soap_parse_wsdl.erl, line 80)
     in call from soap_parse_wsdl:get_model/2 (src/soap_parse_wsdl.erl, line 55) 
     in call from soap_parse_wsdl:get_namespaces/2 (src/soap_parse_wsdl.erl, line 66)
     in call from soap:wsdl2erlang/2 (src/soap.erl, line 313)

I am still looking into this, but posting the update here!

@mkrogemann
Copy link

Same issue here. It looks like the imported types, which are given as remote resources ("http://...") are not downloaded. It appears that soap expects them to be located in the local file system.
Any prognosis on how difficult it would be to produce a fix?

@willemdj
Copy link
Contributor

willemdj commented Nov 9, 2016

Hi,

I don't think that is the problem, it should get remote resources as well.

I do recognize that there is a problem with the WSDL that the original issue refers to. This is related to the complex structure of that WSDL. Assuming that you are trying to process a different WSDL, could you let me know what error you are getting, and if possible also provide the files?

Thanks,
Willem

@mkrogemann
Copy link

The error that I get is that included XSDs appear to be expected in local file system. I'll open another issue.

@js-ojus
Copy link
Author

js-ojus commented Dec 20, 2016

Apologies for disappearing!

The problem indeed was with the WSDL. It got resolved after I upgraded a later version of the API, with an updated WSDL.

Nonetheless, I could make calls using the original WSDL from Python. So, soap did have some problem fetching the referenced WSDLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants