One option is to define two endpoints, one with security and another without security as explained here.
http://blog.rampartfaq.com/2009/08/how-to-add-secured-and-non-secured-end.html But in this case, you will have to control access to the non-secured service so that it is not accessible by the unintended service consumers. Thanks, Thilina On Tue, Oct 11, 2011 at 7:14 PM, Sriram Vaidyanathan < sriram.vaidyanat...@copart.com> wrote: > Yes , i have done this in the client side. > > I was looking for if it was possible to do this from the server side. > > Thanks > > On Oct 11, 2011, at 5:29 AM, "Okken,Brett" <bok...@cerner.com> wrote: > > From the client or server perspective?**** > > ** ** > > From the client this can be as easy as calling > serviceClient.engageModule(“rampart”) when you want to use WS-Security and > not calling that when you do not want to use it.**** > > ** ** > > I am not sure what a solution would be on the server side. For a given > server we either use WS-Security all the time or not at all.**** > > ** ** > > Brett Okken | MMF Archive | Lead Architect | 816.201.6112 | www.cerner.com| > bok...@cerner.com**** > > ** ** > > *From:* Sriram Vaidyanathan [mailto:sriram.vaidyanat...@copart.com] > *Sent:* Monday, October 10, 2011 11:28 PM > *To:* <java-user@axis.apache.org>java-user@axis.apache.org > *Subject:* Optionally engage WS-Security in the service code**** > > ** ** > > Hello Axis community,**** > > I am trying to see what options are there to optionally engage WS-Security > to the service code, where based on the business partner we can turn > on/off the WS-Security module.**** > > Please let me know if this is possible programmatically.**** > > Thanks**** > > > Sriram Vaidyanathan > Software Engineering Manager > Copart > 4665 Business Center Drive > Fairfield, CA 94534 > (707) 639-5428 Office**** > > **** > ------------------------------ > CONFIDENTIALITY NOTICE This message and any included attachments are from > Cerner Corporation and are intended only for the addressee. The information > contained in this message is confidential and may constitute inside or > non-public information under international, federal, or state securities > laws. Unauthorized forwarding, printing, copying, distribution, or use of > such information is strictly prohibited and may be unlawful. If you are not > the addressee, please promptly delete this message and notify the sender of > the delivery error by e-mail or you may call Cerner's corporate offices in > Kansas City, Missouri, U.S.A at (+1) (816)221-1024. > > -- Thilina Mahesh Buddhika http://blog.thilinamb.com