0
我有一個簡單的web服務,我用C#寫的。它只需要2個數字,並給你它們的總和。當在我的瀏覽器中測試它時,它完美地工作,但是當我導入服務到SOAPUI和嘗試測試它,它給了我下面的錯誤:SOAPUI - 文檔不是信封
線-1:錯誤:該文件是不是一個信封@http://www.w3.org/2003/05/soap-envelope:文檔元素不匹配了HTML @http://www.w3.org/1999/xhtml
這是什麼出現在左側窗口(請求)中:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Add xmlns="http://tempuri.org/">
<x>1</x>
<y>1</y>
</Add>
</soap:Body>
</soap:Envelope>
這是出現在右窗口(響應):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>IIS7</title>
<style type="text/css">
<!--body {
color:#000000;
background-color:#B3B3B3;
margin:0;
}
#container {
margin-left:auto;
margin-right:auto;
text-align:center;
}
a img {
border:none;
}-->
</style>
</head>
<body>
<div id="container">
<a href="http://go.microsoft.com/fwlink/?linkid=66138&clcid=0x409">
<img src="welcome.png" alt="IIS7" width="571" height="411"/>
</a>
</div>
</body>
</html>
看起來像服務正在返回一個HTML響應。你確定你有正確的端點嗎? –
你是如何在瀏覽器中測試它的? –