Re: [Dev] [ESB] Having problem with creating a secure client

2013-12-09 Thread Dimuthu Upeksha
Hi all, Managed to fix it. It was an issue with the conflicts of libraries (jars with different versions). I removed all of them from the project build path and added only libraries mentioned in ESB sample axis2Client build file. Then client ran without error. Thank you Dimuthu On Mon, Dec 9,

Re: [Dev] [ESB] Having problem with creating a secure client

2013-12-08 Thread Nirmal Fernando
Is this in client side? Caused by: java.lang.ClassNotFoundException: samples.userguide.PWCallback 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

Re: [Dev] [ESB] Having problem with creating a secure client

2013-12-08 Thread Dimuthu Upeksha
yes. Seems like I missed a library but I don't know correct one to import. On Mon, Dec 9, 2013 at 9:53 AM, Nirmal Fernando nir...@wso2.com wrote: Is this in client side? Caused by: java.lang.ClassNotFoundException: samples.userguide.PWCallback On Mon, Dec 9, 2013 at 9:43 AM, Dimuthu

Re: [Dev] [ESB] Having problem with creating a secure client

2013-12-08 Thread Jeewantha Dharmaparakrama
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

Re: [Dev] [ESB] Having problem with creating a secure client

2013-12-08 Thread Dimuthu Upeksha
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

Re: [Dev] [ESB] Having problem with creating a secure client

2013-12-08 Thread Jeewantha Dharmaparakrama
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

Re: [Dev] [ESB] Having problem with creating a secure client

2013-12-08 Thread Samisa Abeysinghe
Don't we have a doc on this? Thanks, Samisa... Samisa Abeysinghe Vice President Training WSO2 Inc. http://wso2.com 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

Re: [Dev] [ESB] Having problem with creating a secure client

2013-12-08 Thread Dimuthu Upeksha
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,

Re: [Dev] [ESB] Having problem with creating a secure client

2013-12-08 Thread Jeewantha Dharmaparakrama
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

Re: [Dev] [ESB] Having problem with creating a secure client

2013-12-08 Thread Samisa Abeysinghe
OK, we need to create a doc Jira please. 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

Re: [Dev] [ESB] Having problem with creating a secure client

2013-12-08 Thread Jeewantha Dharmaparakrama
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

Re: [Dev] [ESB] Having problem with creating a secure client

2013-12-08 Thread Dimuthu Upeksha
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:

Re: [Dev] [ESB] Having problem with creating a secure client

2013-12-08 Thread Jeewantha Dharmaparakrama
might be an issue with the version. WSS4J 1.6.13 should have that method. [1] http://ws.apache.org/wss4j/apidocs/org/apache/ws/security/WSPasswordCallback.html#getIdentifier%28%29 Jeewantha On Mon, Dec 9, 2013 at 11:31 AM, Dimuthu Upeksha dimut...@wso2.com wrote: Hi Jeewantha, I created the