locked
XLANG/s Exception RRS feed

  • Question

  • Hi All,

    I am trying to orchestrate a sql database (wcf-custom sql) into CRM 4.0 (Crm Adapter) and getting an exception in BTS 2009. The exception message is below. Any help would be appreciated very much.

    Thanks

    RY5555

    Event Type: Error
    Event Source: XLANG/s
    Event Category: None
    Event ID: 10033
    Date:  09/07/2010
    Time:  12:03:35
    User:  N/A
    Computer: XXXXXXXXX
    Description:
    xlang/s engine event log entry: Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'Module_1.ClientToAccount(d8858aa8-ba3b-7ad0-3de7-b3af6222aa1d)'.
    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: 1c8e7eaf-3749-47e1-addc-2923193d3420
    Shape name: Receive_1
    ShapeId: af13c4ea-5641-44ca-8334-dc1e5566e722
    Exception thrown from: segment 1, progress 3
    Inner exception: Received unexpected message type 'TmCrm1.TypedPolling_InboundIdClient+TypedPolling, TmCrm1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bee90272eee05751' does not match expected type 'TmCrm1.TypedPolling_InboundIdClient+TypedPollingResultSet0, TmCrm1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=bee90272eee05751'.
           
    Exception type: UnexpectedMessageTypeException
    Source: Microsoft.XLANGs.Engine
    Target Site: Void _verifyPublisherSchema()
    The following is a stack trace that identifies the location where the exception occured

       at Microsoft.XLANGs.Core.XMessage._verifyPublisherSchema()
       at Microsoft.XLANGs.Core.XMessage.FetchProperties()
       at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.ReceiveMessage(Int32 iOperation, Envelope env, XLANGMessage msg, Correlation[] initCorrelations, Context cxt, Segment s)
       at Module_1.ClientToAccount.segment1(StopConditions stopOn)
       at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)

           

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

     

    Friday, July 9, 2010 12:17 PM

Answers

  • Hi,

    By looking into the stack trace of your exception I see that you gets a message of type TypedPooling but the orchestration waits for a TypedPoolingResultSet0.

    I think that the message coming from the external system (SQL Server probably ?), is not of the right type. If it comes from SQL Server, I suppose that the data coming from SQL Server have to be debatched by using a XMLReceive pipeline and an Envelope XSD schema. You can read this post about SQL Server debatching : http://seroter.wordpress.com/2010/04/08/debatching-inbound-messages-from-biztalk-wcf-sql-adapter/

    David GROSPELIER
    NOVELI
    MVP BizTalk 2010
    dgr@noveli.fr
    blog.noveli.fr

     


    David GROSPELIER NOVELI MVP BizTalk 2010 dgr@noveli.fr blog.noveli.fr
    Friday, July 9, 2010 1:03 PM
  • The schema generated by the adapter has multiple root nodes: TypedPolling, TypedPollingResultSet0, ArrayOfTypedPollingResultSet0
    This schema will validate any one of these 3 messages.
    When you use the Generate Instance function Visual Studio will generate a message based on the first root node, in this case TypedPollingResultSet0.

    As Abdul mentions above it would appear that the message configured on the receive shape is incorrect. It should be the TypedPolling message. Is it possible that the running code does not match your source. Have you tried redeploying and restarting all host instances.

    Tuesday, July 13, 2010 10:53 PM
    Answerer

All replies

  • Hi,

    By looking into the stack trace of your exception I see that you gets a message of type TypedPooling but the orchestration waits for a TypedPoolingResultSet0.

    I think that the message coming from the external system (SQL Server probably ?), is not of the right type. If it comes from SQL Server, I suppose that the data coming from SQL Server have to be debatched by using a XMLReceive pipeline and an Envelope XSD schema. You can read this post about SQL Server debatching : http://seroter.wordpress.com/2010/04/08/debatching-inbound-messages-from-biztalk-wcf-sql-adapter/

    David GROSPELIER
    NOVELI
    MVP BizTalk 2010
    dgr@noveli.fr
    blog.noveli.fr

     


    David GROSPELIER NOVELI MVP BizTalk 2010 dgr@noveli.fr blog.noveli.fr
    Friday, July 9, 2010 1:03 PM
  • Hi,

    You have to focus on inner exception. It points towards a message being received that is not of the correct type (belonging to a schema). You need to check if the message belongs to schema's that has been deployed (probably message belonging to what is being polled from SQL Server database). Compare message with generated instance of schema's you have (or validate the message with schema).

    HTH


    Regards,

    Steef-Jan Wiggers
    MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    Friday, July 9, 2010 1:03 PM
    Moderator
  • It looks like the message sent to the port is the request type and the one it is expecting is the response one. I would check your orchestration and the send shape and change the message being sent to the response one.

    The resultset0 is the element that is generated for the WCF-SQL response schemas.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Saturday, July 10, 2010 4:33 PM
    Moderator
  • You have configured the wrong schema type to the response message which comes from the port. Please reconfigure the response message to the response type schema which is auto generated by the WCF Adapter wizard.
    Abdul Rafay - MVP & MCTS BizTalk Server
    blog: http://abdulrafaysbiztalk.wordpress.com/
    Please mark this as answer if it helps.
    Sunday, July 11, 2010 6:25 AM
  • Hi,

    I think I need to clear the issue a bit more:

    Adapter:WCF-Custom Adapter sqlbinding

    Receive Message Type: AccountSync.TypedPolling_InboundIdClient.TypedPolling

    Schema: TypedPolling.InboundIdClient.xsd

    Validate Schema Instance:

    - <TypedPolling xmlns="http://schemas.microsoft.com/Sql/2008/05/TypedPolling/InboundIdClient">
    - <TypedPollingResultSet0>
    - <TypedPollingResultSet0>
     <ClientName>ACCOUNT1</ClientName> 
     </TypedPollingResultSet0>
     </TypedPollingResultSet0>
     </TypedPolling>
    Generate Schema Instance:
    - <ns0:TypedPollingResultSet0 xmlns:ns0="http://schemas.microsoft.com/Sql/2008/05/TypedPolling/InboundIdClient">
     <ns0:ClientName>ClientName_0</ns0:ClientName> 
     </ns0:TypedPollingResultSet0>

    The received message by the receive shape is (coming from sql server by WCf-Custom sql binding, TypedPolling Inbound op.):

    <TypedPolling xmlns="http://schemas.microsoft.com/Sql/2008/05/TypedPolling/InboundIdClient"><TypedPollingResultSet0><TypedPollingResultSet0><ClientName>ACCOUNT1</ClientName></TypedPollingResultSet0></TypedPollingResultSet0></TypedPolling>

    This message is validated against the Schema. So, my questions are:

    1. The error message says that incoming expected Message Type  is TypedPolling_InboundIdClient+TypedPollingResultSet0; however if we look at to the Message type in Receive Shape, it is of the type: TypedPolling_InboundIdClient.TypedPolling Is there any contradiction here.

    2. The received message is validated against the Schema. Why it says the type is different?

    3. If I put the Generated Schema Instance as an incoming file it works without any error. Why the Validated Schema Instance and Generated Schema Instance are different?

    Thanks very much to all answerers again.

    RY5555

     

    Tuesday, July 13, 2010 5:19 PM
  • The schema generated by the adapter has multiple root nodes: TypedPolling, TypedPollingResultSet0, ArrayOfTypedPollingResultSet0
    This schema will validate any one of these 3 messages.
    When you use the Generate Instance function Visual Studio will generate a message based on the first root node, in this case TypedPollingResultSet0.

    As Abdul mentions above it would appear that the message configured on the receive shape is incorrect. It should be the TypedPolling message. Is it possible that the running code does not match your source. Have you tried redeploying and restarting all host instances.

    Tuesday, July 13, 2010 10:53 PM
    Answerer
  • Thanks very much for the answers. The incoming message type is definitely TypedPolling type. It was Multi part message type and the part type was TypedPolling. But, I've changed the mesage to the single message and selected the TypedPolling type from the three of the types.

    But, unfortunately I am getting the same error code.

    Any more help will be appeciated very much.

    Kind Regards

    RY5555

    Wednesday, July 14, 2010 8:42 AM