none
WCF Adapter error. RRS feed

  • Question

  • Hello, i read about the error "An action mapping was defined but BTS.Operation was not found in the message context..."

    in this post:

    http://blogs.msdn.com/b/adapters/archive/2007/12/26/why-does-the-adapter-say-action-is-not-understood-even-though-i-am-using-the-binding-file-generated-by-the-consume-adapter-service-wizard.aspx

    I try to configure my orchestrator and action but i make a mistake and receive always the error above.

     

    I have this configuration on the WCF-SQL adapter send port(imported in Biztalk from an XML generated from the wizard of the adapter

    <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Operation Name="Delete1" Action="TableOp/Delete/dbo/table1" />
      <Operation Name="Insert1" Action="TableOp/Insert/dbo/table1" />
      <Operation Name="Select1" Action="TableOp/Select/dbo/table1" />
      <Operation Name="Update1" Action="TableOp/Update/dbo/table1" />
      <Operation Name="Delete2" Action="TableOp/Delete/dbo/table2" />
      <Operation Name="Insert2" Action="TableOp/Insert/dbo/table2" />
      <Operation Name="Select2" Action="TableOp/Select/dbo/table2" />
      <Operation Name="Update2" Action="TableOp/Update/dbo/table2" />
      <Operation Name="Delete3" Action="TableOp/Delete/dbo/table3" />
      <Operation Name="Insert3" Action="TableOp/Insert/dbo/table3" />
      <Operation Name="Select3" Action="TableOp/Select/dbo/table3" />
      <Operation Name="Update3" Action="TableOp/Update/dbo/table3" />
      <Operation Name="Delete4" Action="TableOp/Delete/dbo/table4" />
      <Operation Name="Insert4" Action="TableOp/Insert/dbo/table4" />
      <Operation Name="Select4" Action="TableOp/Select/dbo/table4" />
      <Operation Name="Update4" Action="TableOp/Update/dbo/table4" />
    </BtsActionMapping>

     

    I try to make a select on my db with this XML passed in the receive location of a port(i follow the example in Microsoft Biztalk Adapter per SQL Server Documentation section "Performing basic insert update delete and select operation".

     

    My XML for the select is:

    <?xml version="1.0" encoding="utf-8"?>
    <ns0:Select xmlns:ns0="http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/table4">
      <Columns>*</Columns>
      <Query>where columnname='P'</Query>
    </ns0:Select>

     

    In the orchestrator i renamed under port types(orchestration view) the identifier of my port "Select" for all the port i use.

     

    I don't understand the link between operation name and logical port name and i think this is the problem.

    In the article in the end:

    "In the above example, you should change the operation names on the logical ports in the orchestration to ‘ABC’ and ‘XYZ’ instead of the default ‘Operation_1’, ‘Operation_2’ etc."

    I change the identifier name in "Select" is correct?I also try to change the operation name in Select4, also change the configuration file (the other way) but with no correct result.

    Can you help me?

     

     

     


    Thursday, September 9, 2010 6:54 AM

All replies

  • Hi,

    Specify the SOAPAction HTTP header field for outgoing messages. This property can also be set through the message context property WCF.Action in a pipeline or orchestration. You can specify this value in two different ways: the single action format and the action mapping format. If you set this property in the single action format- for example, http://contoso.com/Svc/Op1- the SOAPAction header for outgoing messages is always set to the value specified in this property.

    If you set this property in the action mapping format, the outgoing SOAPAction header is determined by the BTS.Operation context property. For example, if this property is set to the following XML format and the BTS.Operation property is set to Op1, the WCF send adapter uses http://contoso.com/Svc/Op1 for the outgoing SOAPAction header.

    <BtsActionMapping>

    <Operation Name="Op1" Action="http://contoso.com/Svc/Op1" />

    <Operation Name="Op2" Action="http://contoso.com/Svc/Op2" />

    </BtsActionMapping>

    If outgoing messages come from an orchestration port, orchestration instances dynamically set the BTS.Operation property with the operation name of the port. If outgoing messages are routed with content-based routing, you can set the BTS.Operation property in pipeline components.

     

    greetings,

    Tomasso Groenendijk

    Thursday, September 9, 2010 12:40 PM
  •  

     

    Thank you for your reply.

    I have some more questions.

     

    Basically i can't run the example in the Section Performing basic insert update ...in the Microsoft biztalk adapter:

    http://msdn.microsoft.com/en-US/library/dd787894%28v=BTS.10%29.aspx

    I have an orchestration like the example.

    With the name in the example but , when i try to execute a select with a generated instance

    <?xml version="1.0" encoding="utf-8"?>
    <ns0:Select xmlns:ns0="http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/table4">
      <Columns>*</Columns>
      <Query>where columnname='P'</Query>
    </ns0:Select>

    I have some error.

    When i use this configuration

     

    <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Operation Name="Delete1" Action="TableOp/Delete/dbo/table1" />
      <Operation Name="Insert1" Action="TableOp/Insert/dbo/table1" />
      <Operation Name="Select1" Action="TableOp/Select/dbo/table1" />
      <Operation Name="Update1" Action="TableOp/Update/dbo/table1" />
      <Operation Name="Delete2" Action="TableOp/Delete/dbo/table2" />
      <Operation Name="Insert2" Action="TableOp/Insert/dbo/table2" />
      <Operation Name="Select2" Action="TableOp/Select/dbo/table2" />
      <Operation Name="Update2" Action="TableOp/Update/dbo/table2" />
      <Operation Name="Delete3" Action="TableOp/Delete/dbo/table3" />
      <Operation Name="Insert3" Action="TableOp/Insert/dbo/table3" />
      <Operation Name="Select3" Action="TableOp/Select/dbo/table3" />
      <Operation Name="Update3" Action="TableOp/Update/dbo/table3" />
      <Operation Name="Delete4" Action="TableOp/Delete/dbo/table4" />
      <Operation Name="Insert4" Action="TableOp/Insert/dbo/table4" />
      <Operation Name="Select4" Action="TableOp/Select/dbo/table4" />
      <Operation Name="Update4" Action="TableOp/Update/dbo/table4" />
    </BtsActionMapping>

     

    I have the error

    http://blogs.msdn.com/b/adapters/archive/2007/12/26/why-does-the-adapter-say-action-is-not-understood-even-though-i-am-using-the-binding-file-generated-by-the-consume-adapter-service-wizard.aspx

    But i don't understand in what i make the mistake, i change the name of the logical port under the port type of orchestration view to "Select" for all the three port, i change the name in all the field i can(i'm in total panic) but with no result.

    Then

    I change the operation in the send port wcf adapter from N to one single operationin the SOAP Action header i have:

    TableOp/Select/dbo/mytablename ans seem that i can go one step forward but always an error of "Routing failure ..." because there aren't no subscriber for this type of message....

    I make a big confusion but this sample for me is not so clear....there are some step omitted in my opinion.

     

    Do you have any ideas?

     

    Thank you for your collaboration.

     

     

     

     

     

    Thursday, September 9, 2010 1:42 PM
  • I can confirm that i move a step forward, now i see the Select response: i think that the first request (my select) has pushed in the db now the routing failure is for the select response my question is where is subscribe the select response?
    Thursday, September 9, 2010 2:22 PM
  • Ok now i move another step forward.

     

    I have this three port a receive port in which i put the select .Xml file a send response wcf-sql in which i haave a filter base on the name of the receive port above and in the end the last port in  (also a FILE adapter configured) in which i think to find the result of the query.

     

    In the last port i configured the filter as

    BTS.MessageType==http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/MyTable#SelectResponse


     

    And now i find with biztalk console a select response with my result but there is an error  about a conflict in the xml schema file.

    The description of the error is System.Xml.XmlException:

    "Start element "Select" from namespace http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/MyTable " expected.

    Found element "SelectResponse" from namespace

    http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/MyTable".

     

    From the XML point of view the message is perfectly clear but i don't understand in what i must change my configuration in Biztalk.

    I think the error is in the Filter expression in the last port, i change the http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/MyTable#SelectResponse

    in

    http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/MyTable#Select

    with no good result , i have an error routing in this case.

     

    I haven't perfectly clear the subscription part of biztalk , what i need to put in the filter to subscribe the message or other object....

    I can get my select result because in the Biztalk Administrator console i can view my XML Response and it is what i expect.

    What i can change to avoid this error?

     

    Any ideas?

     

    Thank you in advance for any suggestions.

     

    Friday, September 10, 2010 7:13 AM
  • Hi,

    If you want to do some table operations with BizTalk WCF-SQL Adapter, please read my post and I think a lot will become clear to you.

    HTH

    Regards,

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


    BizTalk
    Friday, September 10, 2010 10:20 PM
    Moderator
  • I read your post , it is very clear  i find a lot of useful information.

    I thisk my configuration is the same, i have a single select operation in my wcf-sql adapter to test all the process.

    My response is correct but i have the error that i describe above, "Start element Select from name space ...expected." Found element SelectResponse....i don't understand why this is an error when i submit a select i retrieve a SelectResponse it is the correct two way handshake i think.

     

    But i i can't correct this error i think i can't go ahead.

     

    My last goal is to select from a table a External Key and with this key in another table extract an XML file.

     

    It is possibile to create an operation  like this in a single request with this adapter?

    Now i select only in the first table and i remain blocked with the error above.

     

    Can you give me some suggestions?

     

    Thank you very much.

     

     

    Monday, September 13, 2010 6:07 AM