私はsavonバージョン2(Ruby on Railsを使用)を使用してWebサービスを呼び出しており、エンベロープにいくつかの追加の名前空間を挿入する必要があります。何かのようなもの:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:add="http://schemas.xmlsoap.org/ws/2003/03/addressing"
xmlns:newNamespace1="http://someURL.pt/Test1"
xmlns:newNamespace2="http://someURL.pt/Test2"
xmlns:newNamespace3="http://someURL.pt/Test3"
私の現在のコードは次のとおりです。
client = Savon.client do
wsdl "https://someValidURL?wsdl"
namespace "http://someURL.pt/Test1"
namespace "http://someURL.pt/Test2"
namespace "http://someURL.pt/Test3"
end
response = client.call( ...the webservice call... )
...しかし、私のリクエストでは、Savonは最後の名前空間のみを配置します
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsns="http://someURL.pt/Test3"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
SavonGitプロジェクトでこれに関するドキュメントは見つかりませんでした。
誰かがこの問題の回避策を持っていますか?
PS-私はまた、1つの可能な解決策がすべてのxmlリクエスト(エンベロープ)をリクエストに設定することであることを確認しますが...まあ...ハックに非常に似ています。
これが不可能で、これを行うための他の良い宝石がある場合は、教えてください=)