Hi, You can actually configure rampart withing the client code.
You can use org.apache.axis2.security.handler.config.InflowConfiguration and org.apache.axis2.security.handler.config.OutflowConfiguration classes to do this. You will have to create instances of these two classes and then then you use the the setter methods available in them to set your configuration values. For an example usage, please have a look at the getOutflowConfiguration() and getInflowConfiguration() of this [1]. The you can call getProperty() from each of the *flowConfiguration instances and set that in the options object using the following keys : WSSHandlerConstants.OUTFLOW_SECURITY WSSHandlerConstants.INFLOW_SECURITY Example: please see invokeWithGivenConfig method in this [2]. IMPORTANT: Please note that the org.apache.axis2.security.* will be moved to org.apache.rampart.* from the next release of Apache Rampart Axis2 module. Thanks, Ruchith [1] http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/Scenario4Test.java?revision=399688 [2] http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/interop/org/apache/axis2/security/InteropScenarioClient.java?revision=399688 On 5/17/06, Raghbir Singh <[EMAIL PROTECTED]> wrote:
Thanks Ali, But I am looking for a way to do that inside the Java Program itself. I found that there are classes to add WS-Security extensions in WSS4J but they all expect w3c.Document object and Axis2 works with Axiom model. So the basic problem is to do it inside the program itself. Anyways, thanks so much for replying. Raghbir Singh Ali Sadik Kumlali said the following on 05/16/06 15:24: > Hi Raghbir, > > I hope following steps would help: > - WSDL2Java can also generate test client. You may use them. > - You should create a client_repo folder similar to the security sample > found under ...\axis2\samples\security\ > - When running your test client, you need to pass > "-Daxis2.repo=client_repo" parameter. > > Regards, > > Ali Sadik Kumlali > > --- Raghbir Singh <[EMAIL PROTECTED]> wrote: > > >> Hello, >> >>> I was trying to find ways I could secure the Code Generated Stub >>> >>> classes. I search through all Rampart tutorials but could not find >>> >> any >> >>> information how I can sign the outgoing message programmatically. >>> I shall be thankful for any information on using Rampart >>> programmatically with Code Generated (WSDL2Java generated) Axis2 >>> Client Stubs. >>> Thanks a lot, >>> Raghbir Singh >>> >>> > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com >