-
Notifications
You must be signed in to change notification settings - Fork 616
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
wsdl input/namespace issue #37
Comments
unfortunately, parsing all these different kinds of wsdl documents is not the easiest thing to do. but i'll try to get yours working without having to explicitly name the soap input. will get back to you asap. btw. i appreciate any help in improving the wsdl parser. |
Thanks for the quick response. I understand parsing wsdl is not easy :) |
from what i've seen now, the telnic wsdl is split into several documents and savon does not support this right now. since getting and parsing the wsdl is not recommended for production and downloading several documents would be even more inefficient ... i would suggest to disable the wsdl for speed and loc improvements:
but i'll leave this issue open for now. i'm definitely thinking about improving the wsdl parser, but as i said: you should always disable it for production. |
I think this is part of the same issue. Aside from the WSDL parser issue - Even disabling the WSDL for production the code creating the XML Body of the SOAP Payload assumes the "wsdl" namespace for the input method which is not always the case.
In the SOAP Class the :wsdl namespace is forced on the input method. An example of a case which requires a different namespace have a look at the ParlayX Third Party Call Service: In the case of the above service a it requires the method to be "n1" not "wsdl". |
thinking about a proper way to solve this issue. |
Running into the same issue. It'll solve the issue with xml_body method. |
I have the same issue, but even going one step further I would need something like this so I would have to change the both namespaces (for the envelope and the body) <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sim="http://dvr.avocent.com/simple-asset"> |
Same issue here. |
i hear you guys! thinking about the best way to customize this convention. suggestions welcome. |
I modified my version so that it will work for me, as I need both the default behavior and my "special" version I added another variable which i can set and that dose the job for me. Unfortunately is currently my option not as flexible as I hoped as I had to hard code the xml body call to do either sim or the default. I'm relatively new to ruby and i did not spent hours on it either, but if the xml call be done with an variable I believe the issue can be reasonably easy solved. I can sent you my version if you like. |
quick survey: would you need to changed or disable the :wsdl namespace globally (for all client instances), per client instance or per request? |
Seems like per-client disabling would be the most robust. I'm sure there's a fair amount of people who will connect to multiple services, but each service probably only needs to be customized once. As with reneneumann, I would also request the ability to modify the Envelope/Body namespaces and attributes. I'm trying to connect to a NuSOAP (php) service, and they expect something like this:
|
@rubiii I think per client instance, at least in my case. Any movement on this topic? |
Having access to the soap body would alleviate this too. I am being bit by this hitting a proprietary soap service. Has anyone found a workaround? |
On a similar note, is there a way to pass in a hash to soap.body, and have it end up CamelCase, not lowerCamelCase? |
I thought I'd take it a step further as in the namespace issues when creating the soap body xml (as: http://github.com/rubiii/savon/issues#issue/37/comment/168261). I have a service that uses the namespace all the way. That is not only on the root tag of the body but on all tags in both body and header. The body therefore needs to specify the namespace on each tag like this:
I have not found a way to make Savon do this automagically but I think it would be a cool addition once the issues discussed above are addressed. What I do is specify the hash keys as strings instead of symbols. No big deal, really.
Of-course I also have a monkey-patch that lets me replace the "wsdl" sent to xml.tag! I interact with SOAP as little as possible because it is such a mess of a "standard" so I don't know how common this type of namespace is. Prioritize it as you see fit is all I am saying. :) |
I am connecting to a service where the WSDL sets elementFormDefault="qualified". From what I understand, this value can be set to 'qualified' or 'unqualified'. An over-simplified description: when set to 'qualified', all of the elements in the SOAP request need to be fully qualified, as in eimermusic's example above. This behavior is specified here: http://www.w3.org/TR/xmlschema-0/#QualLocals. An explicit setting for this style of output in the SOAP body would be nice, but if the WSDL file specifies that the elements should all be fully namespace qualified, then the elements in the SOAP body should be fully qualified. For now, I have to place the namespace in the hash keys... |
the service I connect to does not have a wsdl, but that sounds like a good attribute to react to. |
any updates about this issue ? |
the input/namespace issue is fixed in the dev branch. these changes will be released as a beta gem asap. the dev branch contains quite a lot of changes, so hopefully you guys will be able to test and provide feedback. |
khoenshel: i opened a new issue for the elementFormDefault="qualified" comment at: http://github.com/rubiii/savon/issues/issue/91 |
please try savon 0.8.0.beta.1 |
Hi The 0.8.0 has solved the problem for me. Rubii has done a great job on this version. |
Well, one thing that isn't "pretty": Because I only need a custom namespace and not "wsdl:", I only use the endpoint-parameter. IMO it would be much nicer if I could use It feels strange to give client.request a namespace as first parameter, and declare it 'later' in the block. What do you think about this? |
i'm not really sure if the following example is what you need:
creates the following request:
if that's not what you're trying to do, please post a sample request as a gist/pastie and i'll try to work out the savon code for you. |
just a small fyi. (I haven't had the time to try 0.8 beta yet, sorry if this is supported already) I have found services that require the root body tag to be void of any namespace. E.g. outputting: Since it looks like custom namespaces work I thought i'd be a shame to forget the edge-case of no namespace. |
thanks for the feedback. v0.8.0 supports both custom and no namespaces. |
released v0.8.0 which should solve this problem. |
I'm having a problem using Savon with a wsdl service provided by Telnic (dev.telnic.org). I'm finding that I have to explicitly name the requested operation and its namespace. Example:
The text was updated successfully, but these errors were encountered: