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

Can not parse WSDL file with yaws_soap_lib #65

Closed
gregorej opened this issue Oct 20, 2011 · 6 comments
Closed

Can not parse WSDL file with yaws_soap_lib #65

gregorej opened this issue Oct 20, 2011 · 6 comments

Comments

@gregorej
Copy link

I've been trying to use YAWS' SOAP lib (old version, can't remember which one) to parse a WSDL file and invoke service operation. However, I could not parse the WSDL property. The WSDL itself is valid (tested on multiple on-line validators). Probably the problem was an empty tag in the WSDL file. Details are here: http://stackoverflow.com/questions/5404926/wsdl-empty-types-tag-and-yaws-soap-support

Right now I am trying to do the same with 1.9.1 version and erlsom 1.2.1. Unfortunately I had no luck. It appears to me that yaws is trying to include files that are not existent (such as soap.xsd, wsdl.xsl) and erlsom can't handle that. The commands I am invoking:

inets:start(),
yaws_soap_lib:initModel(WSDL_FILE_URL)

the error:

** exception error: no match of right hand side value {error,"Include file not found XSD_INDLUDED_IN_WSDL_URL"}
     in function  yaws_soap_lib:addSchemas/5
     in call from yaws_soap_lib:parseWsdls/5
     in call from yaws_soap_lib:initModel2/5

Both urls are available through HTTP

@vinoski
Copy link
Collaborator

vinoski commented Oct 21, 2011

I'm currently discussing your issue with the author of erlsom, and we're trying to figure out if we can address this and if so what best way to do it would be. Stay tuned.

willemdj added a commit to willemdj/yaws that referenced this issue Oct 29, 2011
vinoski added a commit that referenced this issue Oct 29, 2011
Allow to pass options to erlsom (fix issue #65)
@vinoski
Copy link
Collaborator

vinoski commented Oct 29, 2011

Please try out Willem's changes, they should allow you to do what you're trying to do. Let us know how it goes.

@gregorej
Copy link
Author

gregorej commented Nov 3, 2011

I've just tried it with newly pulled version but the problem still exists. The only difference I can see are the arities of functions in stack trace:

exception error: no match of right hand side value {error,"Include file not found XSD_INDLUDED_IN_WSDL_URL"}
     in function  yaws_soap_lib:addSchemas/4
     in call from yaws_soap_lib:parseWsdls/4
     in call from yaws_soap_lib:initModel2/5

@vinoski
Copy link
Collaborator

vinoski commented Nov 3, 2011

You need to make your call differently, which is why Willem made the changes he made. Hopefully Willem will chime in with specific instructions for you.

@willemdj
Copy link
Contributor

willemdj commented Nov 4, 2011

Yes, Steve is right.

The changes I made allow you to pass a list of options to yaws_soap_lib:initModel(). These options will be passed on to erlsom. One of them can be a reference to a function that fetches the included XSDs.

You can find more about it in the erlsom documentation. In your case, you might try to pass it a reference to a function called find_xsd() in erlsom_lib. Your call could look something like this: yaws_soap_lib:initModel(WSDL_FILE_URL, [{include_fun, {yaws_soap_lib, find_xsd}}]) - I can't guarantee that this will work, but it should be enough to get you started, I hope.

@gregorej
Copy link
Author

gregorej commented Nov 4, 2011

OK, I've managed to build model with following command:

yaws_soap_lib:initModel(WSDL_FILE_URL, [{include_fun, {erlsom_lib, find_xsd}}])

Thanks!

@gregorej gregorej closed this as completed Nov 4, 2011
jgrinstead pushed a commit to jgrinstead/yaws that referenced this issue Apr 23, 2015
Allow to pass options to erlsom (fix issue erlyaws#65)
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