开发者

Savon: How to change header from being <env:Header> to <soap:Header> or something different

开发者 https://www.devze.com 2023-03-16 18:32 出处:网络
In Savon, is there a way开发者_StackOverflow中文版 to change <env:Header> to be <soap:Header>

In Savon, is there a way开发者_StackOverflow中文版 to change

<env:Header>

to be

<soap:Header>

or anything different?

I've tried in the request block putting an additional header tag like this:

soap.header['soap:Header']

But that won't work.

I've browsed Savon Docs and haven't found anywhere to change that tag, only by manually building the XML.


EDITED for Savon 1.0.0

The value can be set in the configure block where you can also set logging and other parameters. Simply put

Savon.configure do |c|
  c.env_namespace = :soap
end

into your code.


For newer versions of Savon:

Savon.client(env_namespace: :soapenv) 
0

精彩评论

暂无评论...
验证码 换一张
取 消