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

Tip: Looking for answers? Try searching our database.

Changing addressing information from a custom filter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Savas Parastatidis - 02 Nov 2004 05:39 GMT
Hey all,

I am having difficulties changing the addressing information of a
SoapEnvelope from within a custom output filter. What i want to do is
effectively change the destination of the SoapEnvelope. I've tried accessing
env.Context.Addressing and changing the (To, Destination, and Via) headers
but they don't seem to have an effect. The EPR used to create the SoapSender
is the one used for the delivery of the message.

I tried getting a new SoapOutputChannel for the EPR of the new destination
and assign it to SoapContext.Current.Channel but that didn't do the trick
either.

I am stuck. Any help appreciated.

Regards,
.savas.
Savas Parastatidis - 03 Nov 2004 01:50 GMT
I've figured it out with some help from John Bristowe (thanks John).

So, it seems that the WS-Addressing headers in a SOAP Envelope are not the
ones used by the SoapSender to create a channel. Also, it seems that the
channel is created before the pipeline of the filters is processed. So, even
if you change the envelope, the initial endpoint used to create the
SoapSender is the one used for the channel.

So, if you want to change the addressing-specific information of the
transport from within a custom filter, you could try the following...

SoapOutputChannel channel = SoapContext.Current.Channel as
SoapOutputChannel;
channel.RemoteEndpoint.Address = epr.Address;

Once you are there, you can change all aspects of the addressing headers,
even change their namespace :-) but as John pointed out to me, you'll have
to do something at the other side too.

Regards,
.savas.

The first one changes the SoapContext addressing information
> Hey all,
>
[quoted text clipped - 13 lines]
> Regards,
> .savas.

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.