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 / September 2004

Tip: Looking for answers? Try searching our database.

content based router

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Trebor - 24 Sep 2004 13:47 GMT
I wrote a WS router which routes the SOAP requests to a different web
services, regarding their header info.

The code is the modified example of  QuoteRouter2.0 project from the
ContentBasedRouter solution(WSE 2.0 examples).

protected override Uri ProcessRequestMessage(SoapEnvelope message)

{

XmlNodeList headersMatched =
message.Header.GetElementsByTagName("headerSender");

string myHeaderSender = headersMatched[0].InnerXml;

if  (headersMatched.Count != 0)

     return MyRoutingLogic (myHeaderSender.ToLower());

else

    return base.ProcessRequestMessage(message);

}

The router service generally works OK.

But I wan't to achieve the following:

- If the header is unknown (the else part of the above procedure),  the
user should receive a message like "Unknown header".

 I don't want default processing to be performed. (     return
base.ProcessRequestMessage(message);  )

How can this be achieved ? ( ProcessRequestMessage expects URI as a return
value )

Any help?

Thanks
Hervey Wilson [MSFT] - 30 Sep 2004 04:53 GMT
> I wrote a WS router which routes the SOAP requests to a different web
> services, regarding their header info.
>
> The code is the modified example of  QuoteRouter2.0 project from the
> ContentBasedRouter solution(WSE 2.0 examples).

SNIP

>  - If the header is unknown (the else part of the above procedure),  the
> user should receive a message like "Unknown header".
[quoted text clipped - 4 lines]
>  How can this be achieved ? ( ProcessRequestMessage expects URI as a return
> value )

I don't recall the code path exactly inside the HttpSoapRouter so cannot
be certain right now, but did you try throwing an exception for your
error case?

Signature

This posting is provided "AS IS", with no warranties, and confers no rights.


Rate this thread:







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.