Hi Jeewantha, I created the PasswordCallbackHandler class and added above lines to the client. And added wss4j-1.6.4.jar to the class path also. Then I get following error
----------- Exception in thread "main" java.lang.NoSuchMethodError: org.apache.ws.security.WSPasswordCallback.getIdentifer()Ljava/lang/String; at samples.userguide.PWCallback.handle(PWCallback.java:144) at org.apache.rampart.builder.BindingBuilder.getSignatureBuilder( BindingBuilder.java:306) at org.apache.rampart.builder.BindingBuilder.getSignatureBuilder( BindingBuilder.java:252) ---------------- Thank you Dimuthu On Mon, Dec 9, 2013 at 10:47 AM, Jeewantha Dharmaparakrama < jeewan...@wso2.com> wrote: > > > > On Mon, Dec 9, 2013 at 10:40 AM, Samisa Abeysinghe <sam...@wso2.com>wrote: > >> OK, we need to create a doc Jira please. >> > created https://wso2.org/jira/browse/DOCUMENTATION-515 > >> >> Thanks, >> Samisa... >> >> >> Samisa Abeysinghe >> >> Vice President Training >> >> WSO2 Inc. >> http://wso2.com >> >> >> >> On Mon, Dec 9, 2013 at 10:38 AM, Jeewantha Dharmaparakrama < >> jeewan...@wso2.com> wrote: >> >>> Hi Dimuthu, >>> >>> Did you create the password callback handler add add that to your >>> clients classpath? After adding that to classpath you have to tell Rampart >>> what the password callback handler is like follows. >>> >>> Options options = client.getOptions(); >>> options.put(WSHandlerConstants.PW_CALLBACK_REF, new >>> PasswordCallbackHandler()); >>> >>> You will have to put username as well in which case I guess you could >>> use this [1]. >>> >>> Hi Samisa, >>> >>> I guess this is not documented properly except for this one [2] >>> >>> [1] >>> http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/handler/WSHandlerConstants.html#USER >>> [2] http://wso2.com/library/3733/ >>> >>> Jeewantha >>> >>> >>> >>> On Mon, Dec 9, 2013 at 10:27 AM, Dimuthu Upeksha <dimut...@wso2.com>wrote: >>> >>>> I did as in the article but still I'm getting the same exception. Then >>>> I added these libraries [1] to the classpath then new exception occurred >>>> [2]. >>>> >>>> [1] http://mavenhub.com/c/samples/userguide/pwcallback/jar >>>> [2] https://gist.github.com/DImuthuUpe/7867567 >>>> >>>> >>>> On Mon, Dec 9, 2013 at 10:16 AM, Jeewantha Dharmaparakrama < >>>> jeewan...@wso2.com> wrote: >>>> >>>>> You have to create that Implementing >>>>> "javax.security.auth.callback.CallbackHandler". See the example in the >>>>> article. When WSS Policy is enabled ( I believe you enabled Username Token >>>>> Policy at ESB proxy) , there has to be WSSecurity header in the SOAP >>>>> request with Username and password. Rampart needs a password callback >>>>> handler to get the password. >>>>> >>>>> Jeewantha >>>>> >>>>> >>>>> On Mon, Dec 9, 2013 at 10:07 AM, Dimuthu Upeksha <dimut...@wso2.com>wrote: >>>>> >>>>>> Hi Jeewantha, >>>>>> The class "PasswordCallbackHandler" can not be found in axis2 or >>>>>> rampart libs. What is the library that contains it? >>>>>> >>>>>> >>>>>> On Mon, Dec 9, 2013 at 10:00 AM, Jeewantha Dharmaparakrama < >>>>>> jeewan...@wso2.com> wrote: >>>>>> >>>>>>> Hi Dimuthu, >>>>>>> >>>>>>> You have to set the password callback handler at client side. Try >>>>>>> adding it to client's "options " [1] >>>>>>> >>>>>>> [1] http://wso2.com/library/3733/ >>>>>>> >>>>>>> Jeewantha >>>>>>> >>>>>>> >>>>>>> On Mon, Dec 9, 2013 at 9:43 AM, Dimuthu Upeksha >>>>>>> <dimut...@wso2.com>wrote: >>>>>>> >>>>>>>> Hi all, >>>>>>>> I am trying to implement a secure client to a secure proxy service >>>>>>>> in ESB. However I am getting an exception [2] at line [3]. I tried to >>>>>>>> capture packets going out from the client using tcpMon but I found >>>>>>>> nothing >>>>>>>> going out. It seems like a dependancy problem in the client but not >>>>>>>> sure. >>>>>>>> What could be the reason for that? >>>>>>>> >>>>>>>> Thank you >>>>>>>> >>>>>>>> [1] https://gist.github.com/DImuthuUpe/7867226 >>>>>>>> [2] https://gist.github.com/DImuthuUpe/7867246 >>>>>>>> [3] >>>>>>>> https://gist.github.com/DImuthuUpe/7867226#file-gistfile1-txt-L127 >>>>>>>> >>>>>>>> Dimuthu >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Dev mailing list >>>>>>>> Dev@wso2.org >>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Jeewantha Dharmaparakrama >>>>>>> Software Engineer; WSO2, Inc.; http://wso2.com/ >>>>>>> Phone : (+94) 774726790 >>>>>>> Skype : prasad.jeewantha >>>>>>> LinkedIn : http://www.linkedin.com/in/jeewanthad >>>>>>> Twitter: https://twitter.com/jeewamp >>>>>>> Blog: http://jeewanthad.blogspot.com/ >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Jeewantha Dharmaparakrama >>>>> Software Engineer; WSO2, Inc.; http://wso2.com/ >>>>> Phone : (+94) 774726790 >>>>> Skype : prasad.jeewantha >>>>> LinkedIn : http://www.linkedin.com/in/jeewanthad >>>>> Twitter: https://twitter.com/jeewamp >>>>> Blog: http://jeewanthad.blogspot.com/ >>>>> >>>> >>>> >>> >>> >>> -- >>> Jeewantha Dharmaparakrama >>> Software Engineer; WSO2, Inc.; http://wso2.com/ >>> Phone : (+94) 774726790 >>> Skype : prasad.jeewantha >>> LinkedIn : http://www.linkedin.com/in/jeewanthad >>> Twitter: https://twitter.com/jeewamp >>> Blog: http://jeewanthad.blogspot.com/ >>> >> >> > > > -- > Jeewantha Dharmaparakrama > Software Engineer; WSO2, Inc.; http://wso2.com/ > Phone : (+94) 774726790 > Skype : prasad.jeewantha > LinkedIn : http://www.linkedin.com/in/jeewanthad > Twitter: https://twitter.com/jeewamp > Blog: http://jeewanthad.blogspot.com/ >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev