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, 2013 at 11:48 AM, Jeewantha Dharmaparakrama 
jeewan...@wso2.com wrote:

 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.comwrote:

 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.comwrote:

 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.comwrote:

 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.comwrote:

 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) 

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 [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




-- 

Thanks  regards,
Nirmal

Senior Software Engineer- Platform Technologies Team, WSO2 Inc.
Mobile: +94715779733
Blog: http://nirmalfdo.blogspot.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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 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




 --

 Thanks  regards,
 Nirmal

 Senior Software Engineer- Platform Technologies Team, WSO2 Inc.
 Mobile: +94715779733
 Blog: http://nirmalfdo.blogspot.com/


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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 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/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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 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.comwrote:

 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/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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 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.comwrote:

 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.comwrote:

 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/

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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, 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.comwrote:

 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.comwrote:

 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/

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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 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.comwrote:

 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.comwrote:

 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/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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 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.comwrote:

 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.comwrote:

 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.comwrote:

 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/

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


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 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.comwrote:

 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.comwrote:

 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.comwrote:

 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


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:
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.comwrote:

 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.comwrote:

 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.comwrote:

 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.comwrote:

 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


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 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.comwrote:

 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.comwrote:

 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.comwrote:

 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.comwrote:

 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: