2016-02-28 78 views
1

我創建了一個soapui項目來測試this wsdl爲什麼SOAPUI返回錯誤的請求?

當發送該請求

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:x/="http://www.w3schools.com/xml/"> 
<soapenv:Header/> 
<soapenv:Body> 
    <x/:CelsiusToFahrenheit> 
     <!--Optional:--> 
     <x/:Celsius>30</x/:Celsius> 
    </x/:CelsiusToFahrenheit> 
</soapenv:Body> 

我得到的原始響應

HTTP/1.1 400 Bad Request 
    Cache-Control: private,public 
    Content-Type: text/xml; charset=utf-8 
    Date: Sun, 28 Feb 2016 17:33:28 GMT 
    Server: Microsoft-IIS/7.5 
    X-AspNet-Version: 4.0.30319 
    X-Powered-By: ASP.NET 
    Content-Length: 0 

回答

2

的錯誤是如此微不足道,由於錯誤的請求到名稱空間中的特殊字符(x/),這可以是基礎d。通過驗證的請求(點擊請求編輯鍵「Alt + v`)

無法弄明白這是爲什麼時的soapUI產生的要求,例如特殊字符來

應該怎樣才能做到使請求有效?

請改變請求到低於(替換x/x):

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:x="http://www.w3schools.com/xml/"> 
    <soapenv:Header/> 
    <soapenv:Body> 
     <x:CelsiusToFahrenheit> 
     <x:Celsius>30</x:Celsius> 
     </x:CelsiusToFahrenheit> 
    </soapenv:Body> 
</soapenv:Envelope> 

下面是在改變與上述請求成功響應的屏幕截圖。

CelsiusToFahrenheit request and response

相關問題