4
SOAP xml에 대한 네임 스페이스를 변경하는 데 문제가 있습니다. 나는 변경하는 방법을 잘 모르겠어요 "에 xmlns : ENV ="을 "에 xmlns : soapenv ="및 "XMLNS : TNS ="을 "의 xmlns : 웹 ="나는 구축을 위해 노력하고있어 무엇Ruby/Savon : SOAP 요청에 대한 네임 스페이스에 문제가 있습니다.
:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="http://www.webserviceX.NET/">
<soapenv:Header/>
<soapenv:Body>
<web:ConvertTemp>
<web:Temperature>100</web:Temperature>
<web:FromUnit>degreeCelsius</web:FromUnit>
<web:ToUnit>degreeFahrenheit</web:ToUnit>
</web:ConvertTemp>
</soapenv:Body>
</soapenv:Envelope>
나는 현재
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://www.webserviceX.NET/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Body>
<tns:ConvertTemp>
<tns:temperature>100</tns:temperature>
<tns:fromUnit>degreeCelsius</tns:fromUnit>
<tns:toUnit>degreeFahrenheit</tns:toUnit>
</tns:ConvertTemp>
</env:Body>
</env:Envelope>
내 코드지고있어 무엇 : 도움을
client = Savon.client(wsdl: "http://www.webservicex.net/ConvertTemperature.asmx?WSDL")
message = { temperature: '100',FromUnit: 'degreeCelsius' , ToUnit: 'degreeFahrenheit'}
response = client.call(:convert_temp, message: message)
감사합니다.
나는 비누와 동일한 camelcasing 문제가 있습니다. 어떻게 해결했는지 설명 할 수 있습니까? –
이것을 clientconvert_request_keys_to에 추가하십시오 : none, –