与损坏请求相关的 Savon 问题
我将 Savon 版本更新到 0.9.6,但我的服务器请求似乎格式错误。在更新之前,我使用的是Savon 0.9.2。
我有一个与下面的帖子中提到的类似的问题,但是,它的不同之处在于重复的项目包括完整的对象。我尝试过使用数组,但没有成功。 Savon:如何在 SOAP 请求的哈希主体中指定自定义 XML?
请求是这样构建的:
#Address object
address = {
'AddressCode' => 'Dest',
'Line1' => '1234 Anywhere Street',
'City' => 'Anywhere',
'Region' => 'Somewhere',
'PostalCode' => '12345',
'Country' => 'USA'
}
#Building the request
request = {"Request" => {
'CompanyCode' => 'DEFAULT',
'DocType' => 'Word',
'Addresses' => {'BaseAddress' => [address]}
}}
0.9.6(损坏的)请求部分
<ser:Request>
<ser:CompanyCode>DEFAULT</ser:CompanyCode>
<ser:DocType>Word</ser:DocType>
<ser:Addresses>
<ins0:Addresses>
<ins0:BaseAddress>AddressCodeDestLine11234 Anywhere StreetCityAnywhere RegionSomewherePostalCode12345CountryUS</ins0:BaseAddress>
</ser:Addresses>
</ser:Request>
0.9.2(工作)请求部分
<ser:Request>
<ser:CompanyCode>DEFAULT</ser:CompanyCode>
<ser:DocType>Word</ser:DocType>
<ser:Addresses>
<ser:BaseAddress>
<ser:AddressCode>Dest</ser:AddressCode>
<ser:Line1>1234 Anywhere Street</ser:Line1>
<ser:City>Anywhere</ser:City>
<ser:Region>Somewhere</ser:Region>
<ser:PostalCode>12345</ser:PostalCode>
<ser:Country>US</ser:Country>
</ser:BaseAddress>
</ser:Addresses>
</ser:Request>
有人有什么想法吗? 我非常感谢您愿意提供的任何建议。
谢谢你!
I updated my Savon version to 0.9.6 and my server requests seem to be malforming. Before the update, I was using Savon 0.9.2.
I have a similar problem as someone mentioned in the post below, however, it differs in that the repeated items include full objects. I've tried using arrays, with no luck.
Savon: How can I specify a custom XML in a hash body for a SOAP request?
The requests are built this way:
#Address object
address = {
'AddressCode' => 'Dest',
'Line1' => '1234 Anywhere Street',
'City' => 'Anywhere',
'Region' => 'Somewhere',
'PostalCode' => '12345',
'Country' => 'USA'
}
#Building the request
request = {"Request" => {
'CompanyCode' => 'DEFAULT',
'DocType' => 'Word',
'Addresses' => {'BaseAddress' => [address]}
}}
0.9.6 (Broken) Request portion
<ser:Request>
<ser:CompanyCode>DEFAULT</ser:CompanyCode>
<ser:DocType>Word</ser:DocType>
<ser:Addresses>
<ins0:Addresses>
<ins0:BaseAddress>AddressCodeDestLine11234 Anywhere StreetCityAnywhere RegionSomewherePostalCode12345CountryUS</ins0:BaseAddress>
</ser:Addresses>
</ser:Request>
0.9.2 (Working) Request portion
<ser:Request>
<ser:CompanyCode>DEFAULT</ser:CompanyCode>
<ser:DocType>Word</ser:DocType>
<ser:Addresses>
<ser:BaseAddress>
<ser:AddressCode>Dest</ser:AddressCode>
<ser:Line1>1234 Anywhere Street</ser:Line1>
<ser:City>Anywhere</ser:City>
<ser:Region>Somewhere</ser:Region>
<ser:PostalCode>12345</ser:PostalCode>
<ser:Country>US</ser:Country>
</ser:BaseAddress>
</ser:Addresses>
</ser:Request>
Does anyone have any ideas?
I would really appreciate any advice you are willing to offer.
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论