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

Tip: Looking for answers? Try searching our database.

WSE 2.0 Policy is tied to specfic endpoint

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pranav - 19 Aug 2004 07:21 GMT
Policies seem to be tied to either one endpoint
("soap.tcp://machine:6000/Service") or to the <default endpoint> (all
endpoints)

1. My problem is that i have a dynamic endpoint:
I allow the user to enter machine name and the port number. Then i create
the endpoint from this info.
At this point, in the code, i need a way to pick a policy, say Policy1, and
apply it to this endpoint. Can I do this? Basically i am looking for a way to
programmatically apply a policy to an endpoint.
Sidd - 20 Aug 2004 01:17 GMT
Hi Pranav,

    You cannot currently dynamically select a policy based on an endpoint.
However, I would still like to understand your scenario a bit. Say a user
enters soap.tcp://machine:6000/Service1, and another user enters
soap.tcp://machine:7000/Service1, I am assuming that there will be two
separate policies in the policy cache file. The way WSE works is that when
an outoging message passes through the output pipeline, the WSE policy
filter first checks to see if the message satisfies the policy, and if not,
it tries to enforce the policy. The policy filter automatically maps the
"To" of a message to find the appropriate policy in the policy cache.

   In cases where you using the TCP transport, you can have a logical name
mapped to a physical name. So, for an endpoint with physical address
soap.tcp://machine:6000/Service, you can have it mapped to a logical name of
MyLogicalEndpoint. This way, you can have your messages with the To field as
MyLogicalEndpoint and physical address to be
soap.tcp://machine:6000/Service. The advantage is that if MyLogicalEndpoint
moves from machine to machine, your policy file does not have to change,
because now it is bound to something logical, rather than a physical
address. You can look at the TcpSyncStockService example for an example of
how to do this. However, I am not sure this solves your problem.

Let me know.

Thanks,

Sidd [MSFT]

> Policies seem to be tied to either one endpoint
> ("soap.tcp://machine:6000/Service") or to the <default endpoint> (all
[quoted text clipped - 6 lines]
> apply it to this endpoint. Can I do this? Basically i am looking for a way to
> programmatically apply a policy to an endpoint.
Softwaremaker - 20 Aug 2004 09:55 GMT
Hi Sidd,

I understand the Via provides the physical mapping to the Logical To
element. Let me side-track you guys for a minute and submerge yourself in
the Real-world (as stated in my post
news:OpTyEA$bEHA.1048@tk2msftngp13.phx.gbl...), most messages flying around
today doesnt have WS-* headers. While it may change in the future with
WS-Addressing being submitted to W3C (together with SUN), according to
documentation, if WSE2.0 doesnt find any Addressing headers in a message, it
will map the RequestURL to the SOAPActor attribute of the service (which
typically states the well-known logical name)...

So I am out there exposing my WSE-aware service and if I am going to sell
interoperability, I should be able to AT LEAST recognize a plain old vanilla
SOAP Message with no WS-* headers, however, my WSE-Aware service will thrown
an exception saying that it cannot match the SOAPActor with the RequestURL.
What this is effectively encouraging is asking the service implementors to
put a Physical address as the SOAPActor (I mean the actual physical address
of the service endpoint here, even an intermediary Router address cannot
work as the Router will still be forwarding the message to the service) So,
we actually go back to square one where a service is tightly bound to an
endpoint address thru the SOAPActor attribute.

Have you guys got any thoughts about this ? Please tell me if my
understanding or implementation of this is all wrong.

Signature

Thank you very much

Warmest Regards,
Softwaremaker
Architect | Evangelist | Consultant

+++++++++++++++++++++++++++++++++

> Hi Pranav,
>
[quoted text clipped - 37 lines]
> to
> > programmatically apply a policy to an endpoint.

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.