Biztalk 2013中的响应错误形式sql适配器

时间:2014-04-17 19:26:34

标签: sql-server biztalk

我创建了一个sql适配器,使用biztalk 2013将数据插入sql server 2008.但是我一直收到这个错误。当我把带有我的记录的文件放到文件夹中时,它会插入到sql中,重复这个过程并且文件作为WIP文件保留在文件夹中并暂停。如果我重新启动biztalk服务,并检查sql server,我的记录就在那里。不确定是什么导致了这一点。

    Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'GMLSQLInsert_Final.Orchestration_1(53af03a7-0a27-d8cc-631f-8bbb55d960f3)'.
The service instance will remain suspended until administratively resumed or terminated. 
If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
InstanceId: 241a55bb-b5e4-499c-a495-477b973fad3f
Shape name: 
ShapeId: 
Exception thrown from: segment -1, progress -1
Inner exception: Received unexpected message type 'HTTP://InsertSQLData#MyResponse' does not match expected type 'http://InsertSQLData#MyResponse'.

Exception type: UnexpectedMessageTypeException
Source: Microsoft.XLANGs.Engine
Target Site: Void VerifyMessage(Microsoft.XLANGs.Core.Envelope, System.String, Microsoft.XLANGs.Core.Context, Microsoft.XLANGs.Core.OperationInfo)
The following is a stack trace that identifies the location where the exception occured

   at Microsoft.XLANGs.Core.PortBinding.VerifyM

这是XSD

<?xml version="1.0" encoding="utf-16" ?> 
- <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:tns="http://InsertSQLData" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://InsertSQLData" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <xs:element name="MyRequest">
- <xs:complexType>
- <xs:sequence>
- <xs:element xmlns:updategram="urn:schemas-microsoft-com:xml-updategram" updategram:Prefix="updg" minOccurs="1" maxOccurs="unbounded" name="sync">
- <xs:complexType>
- <xs:sequence>
- <xs:element updategram:Prefix="updg" minOccurs="0" maxOccurs="unbounded" name="after">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" maxOccurs="unbounded" name="testTable">
- <xs:complexType>
  <xs:attribute name="FirstName" type="xs:string" /> 
  <xs:attribute name="Lastname" type="xs:string" /> 
  <xs:attribute name="city" type="xs:string" /> 
  <xs:attribute name="address" type="xs:string" /> 
  <xs:attribute name="postalCode" type="xs:string" /> 
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:sequence>
  </xs:complexType>
  </xs:element>
- <xs:element name="MyResponse">
- <xs:complexType>
- <xs:sequence>
  <xs:element name="Success" type="xs:anyType" /> 
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>

回复中的消息

<ns:MyResponse xmlns:ns="HTTP://InsertSQLData"><ns:Success /></ns:MyResponse>

enter image description here

enter image description here

1 个答案:

答案 0 :(得分:1)

该错误不是来自WCF SQL Adapter。由Orchestration Engine引发该错误,因为收到的消息类型与端口上配置的消息类型不匹配。

您需要找出响应命名空间中HTTP为CAPS的原因。没有BizTalk组件,我知道会这样做。