Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2005

Tip: Looking for answers? Try searching our database.

SoapReceiver as both router and destination ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cam - 01 Mar 2005 21:27 GMT
Okay, this one is giving me some grief: I've had no luck this far in creating
a SoapReceiver that acts as both a router and destination for messages.
Switching the IsIntermediary isn't something I can do without looking at the
soapenvelope object ...

Has anyone else attempted this and found a solution? Creating another soap
receiver instance to handle local destination messages seems like overkill.

Thoughts?
Softwaremaker - 07 Mar 2005 22:15 GMT
How do you determine which message is intended for processing and which for
routing ? Thru the SOAPActor attribute ? or Do you do a Content-Based
approach ? Is this a TCP Router you are implementing as well ?

Signature

Thank you.

Regards,
William T (Softwaremaker)
http://www.softwaremaker.net/blog
=========================================

> Okay, this one is giving me some grief: I've had no luck this far in creating
> a SoapReceiver that acts as both a router and destination for messages.
[quoted text clipped - 5 lines]
>
> Thoughts?
Softwaremaker - 07 Mar 2005 23:31 GMT
Cam,

I think you have to share more on what and how you are trying to do this. In
physical terms, is your SOAP-Router/Receiver actually deployed as a router
or a receiver ?

I have got this feeling that you have deployed this as a receiver (hence
SOAPReceiver ;)) and you inspect the content --- and see if you need to
route it somewhere else. Is this right ? Then I would say it is more of a
gateway approach and not a pure router play. A Gateway approach is very
useful and it could be done as
an extended form of the WSE router (i.e. an IHttpHandler). Going with this
approach means that the gateway doesn't have to support only a single final
endpoint, it can support many since it doesn't have to be message schema
aware.

hth.
Signature

Thank you.

Regards,
William T (Softwaremaker)
http://www.softwaremaker.net/blog
=========================================

> How do you determine which message is intended for processing and which for
> routing ? Thru the SOAPActor attribute ? or Do you do a Content-Based
[quoted text clipped - 12 lines]
> >
> > Thoughts?
Cam - 07 Mar 2005 23:35 GMT
The end destination is determined by the 'destination' element -- the process
is as follows: if local, then process it, otherwise look up the route (in the
referral cache object, or something else) and assign this to the Via element.

Content-based determination would require decrypting the envelope along the
route, which is a security issue I want to avoid (and one of the benefits of
WS-Addressing standard).

Yes, this is TCP-based.

Thanks for any assistance/direction you can provide.
- Cam

> How do you determine which message is intended for processing and which for
> routing ? Thru the SOAPActor attribute ? or Do you do a Content-Based
[quoted text clipped - 12 lines]
> >
> > Thoughts?
Softwaremaker - 08 Mar 2005 14:31 GMT
I think there are a few ways of doing this. This is what I did before:

   If message.Context.Addressing.Action.Value =
"http://soapaction.softwaremaker.net/ProcessThisMessage" Then
     Console.WriteLine("I am a SOAP Receiver. The BUCK stops here !")
   Else
     Console.WriteLine("I am a SOAP Router...Forwarding...")

     Dim viaUri As New Uri("soap.tcp://" + System.Net.Dns.GetHostName() +
":2088/soapreceiver")
     Dim toUri As New Uri("soap://softwaremaker.net/soapreceiver")

     message.Context.Addressing.Destination = New EndpointReference(toUri,
viaUri)

     Dim channel As ISoapOutputChannel
     channel =
SoapTransport.StaticGetOutputChannel(message.Context.Addressing.Destination)
     channel.Send(message)
     channel.Close()

As you can see from the above, I route the message based on the SOAPAction.
You can use your own method as preferred. Since this is a SOAP Receiver, the
routed endpoint can also respond with another SOAP Response
real-asynchronous duplex-style.

HTH.

Signature

Thank you.

Regards,
William T (Softwaremaker)
http://www.softwaremaker.net/blog

Independent Microsoft Regional Director | Microsoft MVP - Solutions
Architect
======================================================

> The end destination is determined by the 'destination' element -- the process
> is as follows: if local, then process it, otherwise look up the route (in the
[quoted text clipped - 25 lines]
> > >
> > > Thoughts?
Sidd - 25 Mar 2005 08:02 GMT
Cam,

    Implementing a TCP based router is pretty tricky and unfortunately
there needs to be a lot of thought when you build a router of this sort. If
you're still interested, I can share some insight into how you may go about
doing this. Basically you would have to go one level below
SoapClient/SoapService and deal with the raw channels themselves.

Let me know if you're still interested

Sidd [MSFT]

> The end destination is determined by the 'destination' element -- the process
> is as follows: if local, then process it, otherwise look up the route (in the
[quoted text clipped - 25 lines]
> > >
> > > Thoughts?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.