2

I am trying to use a web service (https/ssl/basicHttpBinding). I add service reference without issues and call it asynchronously. I pass the instance of the client to the CallBack. I get this error when trying to get the result from the service at the CallBack:

Header http://schemas.xmlsoap.org/ws/2004/08/addressing:Action for ultimate recipient is required but not present in the message.

var Result = client.BeginTheServiceOperation(header, CallBack, client);

private static void CallBack(IAsyncResult ar)
{
   var client = ar.AsyncState as MyServiceSoapClient;
   var result = client.EndTheServiceOperation(ar); // ERROR OCCURS HERE
   Console.WriteLine(result);
}

What am I missing?

Thanks

3
  • Can you post the code where you call the service?
    – cadrell0
    Jun 13, 2011 at 14:57
  • I've updated the question with the call to BeginTheServiceOperation. Thanks Jun 13, 2011 at 16:55
  • Please post the entire method that calls BeingTheServiceOperation
    – cadrell0
    Jun 14, 2011 at 18:55

2 Answers 2

3

It turns out that the service was expecting SOAP 1.1 and by default WCF uses SOAP 1.2. I needed to create a new custom binding, passing that configuration in and it all worked ok. This pointed me in the right direction: http://social.msdn.microsoft.com/Forums/en/wcf/thread/f3707303-4f35-4079-ac0b-eba4717cada8

1
  • You can mark this self-answer as the answer. As the FAQ says, "It’s also perfectly fine to [...] answer your own question". Jun 15, 2011 at 5:01
1

This is an indication that you have not applied the the proper message configuration options to your binding. The service is expecting a SOAP message with WS-Addressing headers, but apparently your client is not passing them. Since the default binding would pass them, I have to assume you've changed your binding in some way that would prevent them from being passed.

If more assistance is required, please also add your binding configuration code/config XML to the original post.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.