You need to pass an array to soap. Input the second element of which is a hash containing the namespace details.
You need to pass an array to soap. Input the second element of which is a hash containing the namespace details. Soap.
Input = "ProcessMessage", {"xmlns" => "starstandards.org/webservices/2005/10/tr... This should ensure you end up with the name space declaration as an attribute to the main element. You will probably also end up with a namespace declaration before the element like so ...... but this was not an issue for me, it was the lack of the namespace attribute that was the issue, not the presence of the namespace before the element.
Steve. Thank you for your message - it's not my solution but it got me to thinking and looking at the logs more carefullly. See my own answer.
There is not enough space here in comments. :-) – Nick Gorbikoff Mar 16 '10 at 20:30 Thanks your solution worked a charm just now when I was having the exact same problem. – bjeanes Oct 20 '10 at 16:26 Your solution worked for me.
I was missing the xmlns inside the action! I still get the wsdl: namespace inside the body, but it doesn't affect the SOAP request. – pedrofalcaocosta Jun 22 at 23:49.
I thought that was the only thing that was throwing me off but its not ( by the way it's hard set in soap. Rb in Savon lib on line 160). That even if I don't spacify it in soap.
Namespaces - it's hard generated and attached in final xml. Which is not allowed by my service. While the xml that is generated is a valid xml - it's not complete by the requirments of the service I'm trying to talk to.
I.e. : in generated xml, tag is missing, also, I need PayloadManifest in the header,plus I need wsu:created and wsu:expires in my wsse: tag, but they are not implemented, etc., etc. A bunch of other little quirks that are too specific to my case. However soap has a private method = xml_body.
Also soap lib in to_xml method is checking whether @xml_body was already set, before generating it's own xml. So I ended up slighly modifying behavior of soap. By making soap.
Xml_body = publicly accessable. So I was able to do: response = client. Process_message!
Do |soap| soap. Action = "starstandards.org/webservices/2005/10/tr... soap. Xml_body = "MY XML STRING GENERATED ELSEWHERE GOES HERE" end Which finally works!
I'll suggest this to rubii - if this option becomes available that will solve a lot rare cases - where people can generate their custom xml and use the rest of savon lib.
That would be a good solution I think. I found that IIS/. Net was complaining about the lack of a namespace but didn't care whether there was an directive at the top of the file.
Good luck, it was pretty painful getting to that point. – Steve Weet Mar 17 '10 at 9:53.
Nick, How did you modify soap. Rb? Xml_body is a method, so xml_soap = "xml" doesn't work for me when I make the method public.
Ah, never mind. I am using version 0.7.9, and found that the soap. Xml variable is publicly accessible.So, by adding this line: soap.
Xml = "entire xml you want to send", it worked! Rich.
Yep Rich, you right, that fix was added after I submitted the bug report, so you don't need to do this anymore, you can just override it directly from you code. – Nick Gorbikoff Jul 22 '10 at 2:59.
This thread has been very helpful. For my web service I needed to get rid of "wsdl" namespace on top of Steve's solution. Tested with Savon 0.9.6 client = Savon::Client.
New "https://example. Com/webservice/account. Asmx?
WSDL" response = client. Request "GetAccount" do # Gotcha 1: set default namespace for body elements soap. Input = "GetAccount", {"xmlns" => "https://example.Com/webservice/"} soap.
Body = { "AccountID" => 1234 } # Gotcha 2: get rid of namespace declaration of body elements soap. Element_form_default = :unqualified # Gotcha 3: set SOAPAction different from default http. Headers"SOAPAction" = '"https://example.
Com/webservice/GetAccount"' end.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.