locked
How to consume an asynchronous web service that requires wsa:MesssageId, wsa:ReplyTo wsa:address, and ws:To in the header RRS feed

  • Question

  • User-853589349 posted

    I have an application that needs to consume an asynchronous web service that requires wsa:MesssageId, wsa:ReplyTo wsa:address, and ws:To in the header. While wsa:MessageId and wsa:To are quite straightforward, I am stump on wsa:ReplyTo. I understand that ReplyTo address is where the async web service will send the response to but how does my application get notify of the response and retrieve it? Do I need host a httplisterner or a web service to listen on the address and port I specify in wsa:ReplyTo address? I have already added code to BeforeSendRequest(...) to add the wsa:messageId, wsa:replyto, and wsa:to to the header but I don't know what address to put into the ReplyTo address. Please advise. Thanks.


    Sam

    Wednesday, October 16, 2013 12:02 PM

Answers

All replies

  • User-837620913 posted

    The ReplyTo needs to be to a URI that your service is listening on.

    Aren't you just using a WCF binding that supports WS-Addressing, like WSHttpBinding? http://msdn.microsoft.com/en-us/library/system.servicemodel.wshttpbinding.aspx

    That should take care of this for you. 

    Another option if the service you are consuming permits it is to use WSDualHttpBinding where the channel is kept open for a response. http://msdn.microsoft.com/en-us/library/system.servicemodel.wsdualhttpbinding.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 18, 2013 6:02 AM
  • User-853589349 posted

    The OSB web service is using SOAP11 with ws-addressing so my client uses basichttpbinding with added ws-addressing which works. I also created a listener using HttpListener to capture the callback response which should work. What is the proper or "right" way to create the callback handler, I doubt the way I did it is standard practice. Note: the OSB web service requires the replyto address to be a specific URL (not anonymous).

    Thanks.

    Thursday, October 24, 2013 1:17 PM