首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么不能从IIS获得SOAP1.2响应

为什么不能从IIS获得SOAP1.2响应
EN

Stack Overflow用户
提问于 2013-01-21 15:07:13
回答 1查看 1.1K关注 0票数 1

我使用C#设置了一个web服务,并在IIS 6中发布它,SOAP1.2请求和响应应该如下所示:

SOAP1.2请求

代码语言:javascript
复制
POST /WebServices/EUWS.asmx HTTP/1.1
Host: 10.30.178.81
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Add xmlns="http://www.eutesttools.com">
      <num1>double</num1>
      <num2>double</num2>
    </Add>
  </soap12:Body>
</soap12:Envelope>

SOAP1.2响应

代码语言:javascript
复制
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <AddResponse xmlns="http://www.eutesttools.com">
      <AddResult>double</AddResult>
    </AddResponse>
  </soap12:Body>
</soap12:Envelope>

但实际上,当我发布这个请求时:

代码语言:javascript
复制
Content-Type    application/soap+xml

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
    <soap12:Body>
        <Add xmlns="http://www.eutesttools.com">
        <num1>3</num1>
        <num2>5</num2>
    </Add>
</soap12:Body>
</soap12:Envelope>

然后我就会得到这样的回应:

代码语言:javascript
复制
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
    <AddResponse xmlns="http://www.eutesttools.com">
        <AddResult>8</AddResult>
    </AddResponse>
</soap:Body>
</soap:Envelope>

为什么我不能得到描述的回应?

EN

回答 1

Stack Overflow用户

发布于 2013-01-21 15:11:51

这是正确的反应。前缀不重要。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14441458

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档