我使用向导“添加生成的项目 - >使用 WCF 服务”在 Biztalk 中使用WCF 服务
我遇到的问题是服务返回无法解析的响应: 原因:解析传入文档时出错:“有多个根元素。第 1 行,位置 296。”
这很令人惊讶,因为我使用的是自动生成的模式
但不是错误消息,因为服务进行了预期的操作,我认为问题与 multiRef 标签有关
回复:
<ns1:sendSmsSubmissionResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://mobicomp.com/smsexpress/webservice/server/message">
<sendSmsSubmissionReturn href="#id0" />
</ns1:sendSmsSubmissionResponse>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:SubmissionStatus" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://mobicomp.com/smsexpress/webservice/server/message">
<id xsi:type="soapenc:string">4336723</id>
<message xsi:type="soapenc:string">Submissão enviada para processamento.</message>
<status href="#id1" />
</multiRef>
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">0</multiRef>
架构
<xs:schema xmlns:tns="http://mobicomp.com/smsexpress/webservice/server/message" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="http://mobicomp.com/smsexpress/webservice/server/message" id="sendSmsSubmissionResponse" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation=".\SubmissionManagerService_mobicomp_com_smsexpress_webservice_server_message.xsd" />
<xs:annotation>
<xs:appinfo>
<schemaInfo root_reference="sendSmsSubmissionResponse" xmlns="http://schemas.microsoft.com/BizTalk/2003" />
<b:references>
<b:reference targetNamespace="http://common.server.webservice.smsexpress.mobicomp.com" />
<b:reference targetNamespace="http://mobicomp.com/smsexpress/webservice/server/message" />
<b:reference targetNamespace="http://schemas.xmlsoap.org/soap/encoding/" />
</b:references>
</xs:appinfo>
</xs:annotation>
<xs:element name="sendSmsSubmissionResponse">
<xs:annotation>
<xs:documentation>Wrapper element for message "sendSmsSubmissionResponse" of RPC operation "sendSmsSubmission".</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="sendSmsSubmissionReturn" type="tns:SubmissionStatus" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
为了不出现此错误,我该怎么做?
谢谢!
编辑:
在架构中将根引用指定为“sendSmsSubmissionResponse”并没有解决问题