Consuming WCF service in Orchestration – action is invalid or unrecognized

Home Page Forums BizTalk 2004 – BizTalk 2010 Consuming WCF service in Orchestration – action is invalid or unrecognized

Viewing 1 reply thread
  • Author
    Posts
    • #20999

      I am consuming a WCF service in an Orchestration (BT2006R2). I added the service reference using “add generated items”. I then added a port to my orchestrstion using the service reference and linked everything up.

      Deployed the orchestration and configured the port. Fairly standard configuration – WSHttp binding, I left the action section of the WCF configuration blank because I’m not sure what needs to go here (I believe it’s got to do with direct binding).

      I started everything up and dropped a message, but the orchesrtation dehydrates on the send shape for the WCF service. In the event log I get the following (the action is blank as it is here – I have not change anything in this error):

      Details:”System.ServiceModel.Security.MessageSecurityException: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail. —> System.ServiceModel.FaultException: The message could not be processed because the action ” is invalid or unrecognized.
         — End of inner exception stack trace —

    • #21001

      Wait, you need the action!  That action is a SOAP header that the WCF service will use to determine what to do with the message.  By default, it is named the same as the OperationContract.  The “add generated items” wizard should have generated a binding file that will configure everything for you, including the action.  Keep in mind that this binding file uses XML to specify the action.  The action can be specified using XML if you need to use multiple actions (call multiple OperationContracts) on a single send port.  I usually just import the binding file and delete the action XML and type in the name of the action directly.

      • #21003

        Sorry, but you’ve lost me. When I generated the end point it did create two xml binding files (BindingInfo and Custom.BindgingInfo) I check both of these and the action is specified (in decoded XML form). I tried playing with this, but it seems to have no effect.

        What exactly do you mean by “import the binding file”? Import into BizTalk Management Console? Where?

        I think that I do need to call multiple actions on the same port – I want to be able to call all the methods exposed on the WCF service – not sure if that’s what you mean.

        Thanks for the speedy response though.

         

        • #21012

          You’re right I was missing the action mappings in the configuration for the WCF Port.

          If anyone else struggles with this then go to the send port properties, click on the configure button next to the protocol drop down and enter the operation mappings in the SOAP action box. There is an example there, but you can get the actual mappings for your service from the binding XML file that was generated by the Add WCF service function. The xml will be encoded in one of the XML files generated by VS.

          • #22471

            Hi,

            I was banging my head aginst the stuff untill I read your post. Thanx a Lot.

          • #25306

            Or, instead – you just can import binding file to your application and it creates all stuff you need (transport type, actions, definitions automatically)

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.