Monday, April 21, 2008

Known Issues with SQL Adapter in BizTalk Server 2006

UnexpectedMessageTypeException
Problem:

Microsoft.XLANGs.Core.UnexpectedMessageTypeException: Received unexpected message type '' does not match expected type '[MESSAGE TYPE]'.
at Microsoft.XLANGs.Core.PortBinding.VerifyMessage(Envelope env, String typeName, Context cxt, OperationInfo op)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBinding.VerifyMessage(Envelope env, String typeName, Context cxt, OperationInfo op)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXLogicalPortBinding.VerifyMessage(Envelope env, String typeName, Context cxt, OperationInfo op)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.VerifyTransport(Envelope env, Int32 operationId, Context ctx)
at Microsoft.XLANGs.Core.Subscription.Receive(Segment s, Context ctx, Envelope& env, Boolean topOnly)
at Microsoft.XLANGs.Core.PortBase.GetMessageId(Subscription subscription, Segment currentSegment, Context cxt, Envelope& env, CachedObject location)
at [ORCHESTRATION NAME] (StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)

Solution:
Make sure that the XML send/receive pipelines have been configured for the physical port.


Passing DateTime value as input parameter to stored procedure
Problem:

The adapter "SQL" raised an error message. Details "HRESULT="0x80040e07" Description="Error converting data type nvarchar to datetime "".

Solution:
Change the data type of the input parameter to string.
If you create the schema for the concerned stored procedure using Add Generated Items wizard, it will create the input parameter with data type as string. Don't change the data type to datetime.

Refer the following link for further information:
http://msdn2.microsoft.com/en-us/library/aa578440.aspx

Refer the following link for
Best Practices for the SQL Adapter

No comments: