locked
WorkflowControlEndpoint for configuration-less XAMLX service RRS feed

  • Question

  • I have a set of XAMLX workflow services running under under IIS, with basicHttpBinding.

    It's important to be able to add new xamlx files without changing the web.config, so all these services are using default contract endpoints.

    When I'm trying to use WorklfowControlEndpoint, I'm getting the protocol mismatch message:

    <!-- [if gte mso 10]> <mce:style>

    The message with Action 'http://schemas.datacontract.org/2008/10/WorkflowServices/IWorkflowInstanceManagement/Suspend' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

     

    Here's the client code:

    var bind = new BasicHttpBinding();

    var address = new EndpointAddress(new Uri("http://localhost/MySite/MyService.xamlx"));

    WorkflowControlClient client = new WorkflowControlClient(bind, address);

    client.Suspend(myInstanceId, "");


    When I'm trying to use wsHttpBinding for the workflowControlClient, I'm getting another error:

    Content Type application/soap+xml; charset=utf-8 was not supported by service http://localhost/MySite/MyWorfkflow1.xamlx. The client and service bindings may be mismatched.

    Switching all XAMLX services from basicHttpBinding to wsHttpBinding is not an option.

    Is there any way to create a custom generic workflowControlEndpoint in my web.config with basicHttpBinding, one for all xamlx services?

    I tried to override the standardEndpoints in web.config:

      <standardEndpoints>
          <workflowControlEndpoint>
            <standardEndpoint binding="basicHttpBinding" />
          </workflowControlEndpoint>
        </standardEndpoints>

    but still getting one of the above errors.

    What am I missing?


    Thanks,

    Igor

     

    Wednesday, June 30, 2010 4:08 PM

Answers

  • Resolved by adding the following endpoint to web.config:

     

          <service name="MyService" behaviorConfiguration="MyServiceBehavior">


            <endpoint contract="System.ServiceModel.Activities.IWorkflowInstanceManagement" binding="basicHttpBinding" bindingConfiguration="httpSecurityOff" kind="workflowControlEndpoint" />


            <endpoint contract="IMyInterface" binding="basicHttpBinding" bindingConfiguration="httpSecurityOff" />

     

    Igor

    Wednesday, June 30, 2010 5:15 PM