Savon 2.3.0 how to add attribute to message_tag

203 views
Skip to first unread message

josep...@gmail.com

unread,
Sep 9, 2013, 7:26:11 PM9/9/13
to sav...@googlegroups.com

In Savon 1, I could use the soap.input to add xmlns like following:

soap_client = Savon.client("http://pathtowsdl.com/a.svc?wsdl")

response = soap_client.request "AnAction" do
  http.headers["soapAction"] = "AnAction"
  soap.input = ["AnAction", {"xmlns" => "http://apathtosomething.com"}]
  soap.body = {
    "SomeAttribute" => "SomeValue"
  }
end

In Savon 2, I can do client.call(:authenticate, message_tag: :authenticationRequest)but how to add the xmlns to the authenticationRequest tag?

Current output: <AuthenticationRequest>, Expected: <AuthenticationRequest xmlns="xyz">


steffen...@gmail.com

unread,
Sep 11, 2013, 8:06:05 AM9/11/13
to sav...@googlegroups.com
Hi Joseph,

We responded to this very question on StackOverflow. I presume it was you who asked, b/c the examples are identical?

-st
Sent from my BlackBerry

Date: Mon, 9 Sep 2013 16:26:11 -0700 (PDT)
Subject: Savon 2.3.0 how to add attribute to message_tag
--
You received this message because you are subscribed to the Google Groups "Savon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to savonrb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ming Chen

unread,
Sep 12, 2013, 12:33:59 AM9/12/13
to sav...@googlegroups.com, steffen...@gmail.com
Yes Steffen. I also noticed it seems you already updated the document which is great.

barber...@gmail.com

unread,
Jan 18, 2014, 7:38:03 PM1/18/14
to sav...@googlegroups.com
What about adding attributes to tags within the message tag.

Prior to Savon 2.3 you would use attributes!, but that doesn't seem to work any more.

Thanks
Reply all
Reply to author
Forward
0 new messages