由于寻址错误,WCF Soap服务失败

时间:2014-01-03 08:26:53

标签: wcf soap

我正在为客户开发一个wcf soap服务。

但由于寻址错误,服务失败。

这是客户端发送的请求

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://www.test.com/services/ilp/userActivity">
    <soapenv:Header>
<ilpx_syncRequestHeaderInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ilpx_version>V1.0</ilpx_version>
<ilpx_messageIdentifier>2</ilpx_messageIdentifier>
</ilpx_syncRequestHeaderInfo>
<To soapenv:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://portalservice.labs.com/PortalService.svc</To>
</soapenv:Header>
<soapenv:Body>
<getUserEventsRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.test.com/services/ilp/userActivity">
    <sourcedId></sourcedId>
    <language>en</language>
    <requestUsername>datatel</requestUsername>
    <requestTimeFrame>
    <begin>2014-01-03T05:00:00Z</begin>
    <end>2014-01-06T05:00:00Z</end>
    </requestTimeFrame>
    </getUserEventsRequest>
    </soapenv:Body>
    </soapenv:Envelope>

这是服务器需要的

 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:user="http://www.test.com/services/ilp/userActivity" xmlns="http://www.test.com/services/ilp/userActivity">
     <soapenv:Header>
      <user:ilpx_syncRequestHeaderInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <!--Optional:-->
         <user:ilpx_version>V1.0</user:ilpx_version>
         <!--Optional:-->
         <user:ilpx_messageIdentifier>2</user:ilpx_messageIdentifier>
      </user:ilpx_syncRequestHeaderInfo>
   </soapenv:Header>
   <soapenv:Body>
        <user:getUserEventsRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <!--Optional:-->
         <user:sourcedId/>
         <!--Optional:-->
         <user:language>en</user:language>
         <!--Optional:-->
         <user:requestUsername>datatel</user:requestUsername>
         <!--Optional:-->
         <user:requestTimeFrame>
    <!--Optional:-->
             <user:begin>2014-01-03T05:00:00Z</user:begin>
            <!--Optional:-->
            <user:end>2014-01-06T05:00:00Z</user:end>
          </user:requestTimeFrame>
      </user:getUserEventsRequest>
   </soapenv:Body>
</soapenv:Envelope>

To Must Understand是失败请求中额外的标记,此标记表示如何使wcf服务理解此标记。 请帮帮忙?

0 个答案:

没有答案