简体   繁体   English

有关Savon Gem,WSDL和Rails请求的信息

[英]Informations about a request for Savon Gem , WSDL and Rails

I solved my problem, but i still can't understand why there was this ** problem. 我解决了我的问题,但我仍然不明白为什么会有这个**问题。

Little explanation : I have to make a call to SOAP server, with some params. 小小的解释:我必须使用一些参数来调用SOAP服务器。

Here is the definition from the wsdl webservice : 这是wsdl Webservice的定义:

Method : "lanceDecodage"
 Jeton: xsd:string
 ID_JOB: xsd:string
 Priorite: xsd:int

I wanted to do this like this : 我想这样做:

@response_second = Savon.client(server).request(:lanceDecodage) do
      soap.body =  {
       :jeton => "ABCDEF"
       :ID_JOB => "123"
       :Priorite => 456
      }
    end

But the server say me i didn't specified the "Priorite" params. 但是服务器说我没有指定“ Priorite”参数。

So this ugly request did the trick : 因此,这个丑陋的要求起到了作用:

 @response_second = Savon.client(server).request(:lanceDecodage) do
          soap.body =  
            '<Jeton>ABCDEF</Jeton><ID_JOB>' + sound.id_job.to_s + '</ID_JOB><Priorite xsi:type="xsd:int">456</Priorite>'
        end

What was the problem with the 'xsi:type="xsd:int"' ? 'xsi:type =“ xsd:int”'是什么问题? Did we have to specify the type for Integer? 我们是否必须指定整数类型? Is there a problem on the WebService? WebService上有问题吗?

Thank you for your response. 感谢您的答复。

我没有一个很好的答案,但是显然问题出在卑鄙的SOAP服务中……感谢您的答复

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM