0
私はSOAP APIにアクセスするためにSavon gemを使用しています。つまり、APIには大文字のキーと小文字の他のキーが必要なため、convert_request_keys_to
オプションのパラメータを使用することはできません。あなたはrequest
が小文字であり、すべての残りの部分は大文字で見ることができるようにRails Savonの宝石のキー(大文字と小文字)
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="XmlServices">
<soapenv:Header/>
<soapenv:Body>
<xs:GetRooms>
<xs:request>
<xs:Credentials>
<xs:Credential1>"example1"</xs:Credential1>
<xs:Credential2>"example2"</xs:Credential2>
<xs:Credential3>"example3"</xs:Credential3>
</xs:Credentials>
</xs:request>
</xs:GetRooms>
:
これは私がに準拠する必要があるAPIの形式です。
これは私が宝石を使用する方法である:
def call(method, attributes = nil)
attributes = { 'request': { 'Credentials': attributes } }
response = client.call(method, message: attributes)
#do something with response
end
私は右のそれを呼び出していますか?私は行方不明のオプションがありますか?リポジトリをフォークして、自分でgemを変更する必要がありますか?