all groups > dotnet web services enhancements > january 2005 >
You're in the

dotnet web services enhancements

group:

Getting the Synchronous Response from SoapInputChannel / SoapOutputChannel



Getting the Synchronous Response from SoapInputChannel / SoapOutputChannel Softwaremaker
1/30/2005 10:09:27 AM
dotnet web services enhancements: Fellas,

In a bit of a bind here, would appreciate any help / pointers I can get.

I am in the midst of writing up some demo utility to send a Soap Message to
a listening TCP Client. I am not using the higher level abstractions such as
a SoapClient. Instead I am *punishing myself* by using the SoapIOChannel and
SoapTcpTransport.

I have managed to send a SoapMessage to the listener. The listener is
processing and returning a corresponding Soap Message response. Now, AFAIK,
the Send method on the GetOutputChannel just sends the message to the
channel. How do I listen for the response ? I understand there is a
GetInputChannel as well BUT somehow I cannot figure out how to hook both of
them together.

Take note that the TCP Service is returning a response synchronously. This
is something similar to the SoapClient.SendRequestResponse method. The
difference is that I am manually sending a Soap Message across the wire
without any need for serialization.

Can anyone here give me some pointers ? Thank you.

--
Thank you.

Regards,
William T
==================================

Re: Getting the Synchronous Response from SoapInputChannel / SoapOutputChannel Roman Kiss [MVP]
1/30/2005 10:59:55 AM
William,

have a look at SoapClientAsyncResult internal class of the SoapClient. This
class handles a SendOneWay and waiting for its response message. Based on
this implementation you can implement your Sender using the BeginSend
method. All hooks are done based on the OnSendComplete and OnReceiveComplete
callbacks.

Note that OnSendComplete is calling the method channel.BeginReceive with the
properly OnReceiveComplete callback.

HTH

Roman Kiss



[quoted text, click to view]

Re: Getting the Synchronous Response from SoapInputChannel / SoapOutputChannel Roman Kiss [MVP]
1/30/2005 3:17:40 PM
William,

That's correct. You have to build your Sender with the properly callbacks
such as OnSendComplete and OnReceiveComplete.


Roman


[quoted text, click to view]

Re: Getting the Synchronous Response from SoapInputChannel / SoapOutputChannel Softwaremaker
1/31/2005 6:43:57 AM
Hi Roman,

I actually caught sight of the SoapClientAsyncResult via Reflector. I was
just wondering if there is a faster way to do it. I do not want to use the
SoapClient as it does its own serialization by adding the addressing headers
and such. I already have a ready message to send, with all complete headers
and all.

Looks like I have to roll up my sleeves and do some deep plumbing :)

--
Thank you.

Regards,
William T (Softwaremaker)
==================================

[quoted text, click to view]

AddThis Social Bookmark Button