有一对应用,A使用Java开发,B使用.NET开发;现要求B应用开发一个.NET WebService接口,将此接口URL登记到A应用中,当有消息产生时,A应用通过此接口向B应用报告。WebService开发出来后联调发现,即使有消息产生,B应用接口也未能拿到任何数据,查看IIS日志却发现A应用是有在调用接口的。由于A系统已经是一个产品化的应用,所以只能是调整B应用去适应它。首先抓包,发现接口调用IIS直接报告HTTP 500错误,错误信息如下:
System.InvalidOperationException: 请求格式无效: text/xml; charset=utf-8。
  在 System.Web.Services.Protocols.HttpServerProtocol.ReadParameters()
  在 System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()客户端抓包数据如下:
?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:orderRelationUpdateNotify soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://soap.bossagent.vac.unicom.com"><orderRelationUpdateNotifyRequest href="#id0"/></ns1:orderRelationUpdateNotify><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:OrderRelationUpdateNotifyRequest" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://req.sync.soap.bossagent.vac.unicom.com">
<recordSequenceId xsi:type="soapenc:string">20100701</recordSequenceId>
<userIdType href="#id1"/>
<userId xsi:type="soapenc:string">8618602392936</userId>
<serviceType xsi:type="soapenc:string">31</serviceType>
<spId xsi:type="soapenc:string">55255</spId>
<productId xsi:type="soapenc:string">2344101</productId>
<updateType href="#id2"/>
<updateTime xsi:type="soapenc:string">20100701120241</updateTime>
<updateDesc xsi:type="soapenc:string"></updateDesc>
<linkId xsi:type="soapenc:string"></linkId><content xsi:type="soapenc:string">qb</content>
<effectiveDate xsi:type="soapenc:string">20100701111700</effectiveDate>
<expireDate xsi:type="soapenc:string">20100701120237</expireDate>
<time_stamp xsi:type="soapenc:string">0701120241</time_stamp>
<encodeStr xsi:type="soapenc:string"></encodeStr>
</multiRef><multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">2</multiRef><multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="soapenc:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">1</multiRef></soapenv:Body>
</soapenv:Envelope>.net开发的web service如下:
  [WebService(Namespace = "http://temp.com/")]
  [WebServiceBinding(ConformsTo = WsiProfiles.None)]
  [SoapDocumentService(RoutingStyle = SoapServiceRoutingStyle.RequestElement)]
  [System.ComponentModel.ToolboxItem(false)]
  public class OrderRelationSync : System.Web.Services.WebService
  {
  [SoapRpcMethodAttribute(Action = "", Use = SoapBindingUse.Encoded)]
  [WebMethod]
  public OrderRelationUpdateNotifyResponse AcceptOrder(
  string recordSequenceID,
  int userIdType,
  string userId,
  string serviceType,
  string spId,
  string productId,
  int updateType,
  string updateTime,
  string updateDesc,
  string linkID,
  string content,
  string effectiveDate,
  string expireDate,
  string time_Stamp,
  string encodeStr)
  {
  }
客户端的soap请求中userIdType变成了这种格式:<userIdType href="#id1"/>,服务端的userIdType变量值要从其后的id为id1的<multiRef>1<multiRef>中取到,但是由于请求端不能修改,我不知道该如何修改.net web service来适应客户端。请各位帮忙。分不够再加