-
Notifications
You must be signed in to change notification settings - Fork 82
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
wasabi seems to ignore choices #104
Comments
Just as a workaround hack: Manually adding the types like wsdl.instance_eval do makes savon work correctly and use the right namespace. So it is in fact the problem that wasabi does not recognize elements within a choice data type. |
Question: to diagnose, could you attempt to pin to an earlier version of Wasabi? Or, latest in its GitHub repo? |
I have had this problem as well, and it has been a long standing issue. We have worked around it by hardcoding the prefix within Savon. I have done a bit more digging and the problem is in the process_type method within the Parser. In two places this extracts the elements using xpath but ignores the fact that choices can be present
Changing these to allow for choices resolves the issue, at least in my test case
This doesn't appear to break any of the test cases |
Hi,
I'm currenty trying to debug a soap error where the ruby lib savon uses the wrong namespace for soap request elements, if these elements are part of a choice in the wsdl. Actually, savon does not parse the wsdl by itself, but uses wasabi, and then does not find the element in wasabis list of type definitions and namespaces.
Example:
wsdl = Wasabi::Document.new('https://tom.vgwort.de/services/1.0/authorMessageService.wsdl')
then most elements defined in this wsdl can be found in
wsdl.type_definitions or
wsdl.type_namespaces
except for those within choices, i.e. the elements pdf, plainText, and epub in the given example. Since savon can't find them in the list, it uses the wrong namespaces.
wasabi doesn't seem to cope at all with choice elements, although it is a valid xml schema element:
https://www.w3schools.com/xml/el_choice.asp
regards
Hadmut
The text was updated successfully, but these errors were encountered: