You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Wei Zhang <wz...@scs.fsu.edu> on 2006/08/22 00:13:23 UTC

problem with using rampart module

Hello,

I am newbie to Axis2. I just followed *Secure Web Services* with Apache 
*Rampart* 
<http://www.wso2.net/files/rampart-tute.pdf#search=%22securing%20web%20services%20using%20rampart%22> 
and downloaded rampart-tute.zip 
<http://www-lk.wso2.com/%7Eruchith/rampart-tute.zip>.

The first sample (sample01, with no security)seems running properly. 
Then I built sample02 using
ant service.02 and ant client.02 and copied sample02.aar to 
$CATALINA_HOME/webapps/axis2/WEB-INF/services directory.  But when I ran 
sample02.Client. I got the following error message.

hostname:~temp_client$java org.apache.rampart.samples.sample02.Client \
http://localhost:8080/axis2/services/sample02 
../client_repositories/sample02

Exception in thread "main" org.apache.axis2.AxisFault: Transport error 
500 . Err or Message is

*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._

*exception*

javax.servlet.ServletException: Servlet execution threw an exception

*root cause*

java.lang.NoClassDefFoundError: org/apache/ws/security/WSPasswordCallback
        org.apache.rampart.samples.sample02.PWCBHandler.handle(Unknown Source)
        org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:99)
        org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:49)
        org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:269)
        org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:191)
        org.apache.axis2.security.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:180)
        org.apache.axis2.security.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:82)
        org.apache.axis2.engine.Phase.invoke(Phase.java:381)
        org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:473)
        org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:445)
        org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
        org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Any input will be highly appreciated. Thank you.

- Wei Zhang



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: where to put encryptionPropFile when using rampart encryption

Posted by Ruchith Fernando <ru...@gmail.com>.
Hi Wei,

Client side : classpath

Serverside : Service archive (.aar file)

In the next release or Rampart we will be changing Rampart to look in
the META-INF directory of the service archive to find the keystore
file. As of now you can drop the file anywhere in the archive and
specify the appropriate path in the .properties file.

If you look in any of the generated service archives (e.g. sample05)
then you can see these files.

Thanks,
Ruchith

On 8/23/06, Wei Zhang <wz...@scs.fsu.edu> wrote:
>
>  Hello,
>
>  I am learning how to encrypt SOAP message using rampart. I followed the
> instructions of rampart tutorial (rampart-tute.zip). The sample01 and
> sample02 passed with Ruchith's help. Now I turned to sample05 for the
> encryption. The service container used is Tomcat. I was wondering where to
> put the encyptionPropFile (client.properties) and keystore file (client.jks)
> on both server and client sides? I mean how the server and the client can
> find the files at run time. Thank you!
>
>  - Wei
>


-- 
www.ruchith.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


where to put encryptionPropFile when using rampart encryption

Posted by Wei Zhang <wz...@scs.fsu.edu>.
Hello,

I am learning how to encrypt SOAP message using rampart. I followed the 
instructions of rampart tutorial (rampart-tute.zip 
<http://www-lk.wso2.com/%7Eruchith/rampart-tute.zip>). The sample01 and 
sample02 passed with Ruchith's help. Now I turned to sample05 for the 
encryption. The service container used is Tomcat. I was wondering where 
to put the encyptionPropFile (client.properties) and keystore file 
(client.jks) on both server and client sides? I mean how the server and 
the client can find the files at run time. Thank you!

- Wei

Re: problem with using rampart module

Posted by Wei Zhang <wz...@scs.fsu.edu>.
Thank you Ruchith. The problems were gone after having 
wss4j-SNAPSHOT.jar in the WEB-INF/lib.

- Wei



Ruchith Fernando wrote:
> I see you are trying this with Tomcat
>
> Please make sure you have the wss4j-SNAPSHOT.jar in the WEB-INF/lib
> directory of axis2. Basically you will have to have all jars available
> in the "lib" directory of the zip file in the WEB-INF/lib directory.
>
> Thanks,
> Ruchith
>
> p.s. you can try the samples (with the services hosted in
> SimpleHTTPServer) with the ant build script provided with the samples
> bundle.
>
> On 8/22/06, Wei Zhang <wz...@scs.fsu.edu> wrote:
>> Hello,
>>
>> I am newbie to Axis2. I just followed *Secure Web Services* with Apache
>> *Rampart*
>> <http://www.wso2.net/files/rampart-tute.pdf#search=%22securing%20web%20services%20using%20rampart%22> 
>>
>> and downloaded rampart-tute.zip
>> <http://www-lk.wso2.com/%7Eruchith/rampart-tute.zip>.
>>
>> The first sample (sample01, with no security)seems running properly.
>> Then I built sample02 using
>> ant service.02 and ant client.02 and copied sample02.aar to
>> $CATALINA_HOME/webapps/axis2/WEB-INF/services directory.  But when I ran
>> sample02.Client. I got the following error message.
>>
>> hostname:~temp_client$java org.apache.rampart.samples.sample02.Client \
>> http://localhost:8080/axis2/services/sample02
>> ../client_repositories/sample02
>>
>> Exception in thread "main" org.apache.axis2.AxisFault: Transport error
>> 500 . Err or Message is
>>
>> *type* Exception report
>>
>> *message*
>>
>> *description* _The server encountered an internal error () that
>> prevented it from fulfilling this request._
>>
>> *exception*
>>
>> javax.servlet.ServletException: Servlet execution threw an exception
>>
>> *root cause*
>>
>> java.lang.NoClassDefFoundError: 
>> org/apache/ws/security/WSPasswordCallback
>>         
>> org.apache.rampart.samples.sample02.PWCBHandler.handle(Unknown Source)
>>         
>> org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:99) 
>>
>>         
>> org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:49) 
>>
>>         
>> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:269) 
>>
>>         
>> org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:191) 
>>
>>         
>> org.apache.axis2.security.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:180) 
>>
>>         
>> org.apache.axis2.security.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:82) 
>>
>>         org.apache.axis2.engine.Phase.invoke(Phase.java:381)
>>         org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:473)
>>         org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:445)
>>         
>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284) 
>>
>>         
>> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
>>         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>>         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>>
>> Any input will be highly appreciated. Thank you.
>>
>> - Wei Zhang
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: problem with encryption/signature using rampart module

Posted by Ruchith Fernando <ru...@gmail.com>.
Hi,

Please add
<enableSignatureConfirmation>false</enableSignatureConfirmation>

in all server side and client side configurations (Both inflow and outflow).

Thanks,
ruchith

On 8/24/06, Wei Zhang <wz...@scs.fsu.edu> wrote:
>
>  Hello,
>
>  I am trying to set up a sample signature/encryption example using rampart.
> I am running Tomcat-5.5.17 and Axis2 under CentOS4. I downloaded
> rampart-tute.zip and passed the first three samples. Unfortunately, I got
> error message for the sample04 and sample05. Could somebody help me find out
> the problem? Thank you in advance.
>
>  Below is what I have when I ran the sample04 and sampe05:
>  wzhang@csloanr02:temp_client]$java
> org.apache.rampart.samples.sample04.Client
> http://localhost:8080/axis2/services/sample04
> ../client_repositories/sample04
>  Exception in thread "main" org.apache.axis2.AxisFault: WSHandler: Check
> Signature confirmation: got a SC element, but no stored SV; nested exception
> is:
>          org.apache.ws.security.WSSecurityException:
> WSHandler: Check Signature confirmation: got a SC element, but no stored SV
>          at
> org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:109)
>          at
> org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:75)
>          at
> org.apache.axis2.engine.Phase.invoke(Phase.java:381)
>          at
> org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:473)
>          at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:445)
>          at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:355)
>          at
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:279)
>          at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:457)
>          at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:399)
>          at
> org.apache.rampart.samples.sample05.Client.main(Unknown
> Source)
>  Caused by: org.apache.ws.security.WSSecurityException:
> WSHandler: Check Signature confirmation: got a SC element, but no stored SV
>          at
> org.apache.ws.security.handler.WSHandler.checkSignatureConfirmation(WSHandler.java:294)
>          at
> org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.java:291)
>          at
> org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:100)
>          ... 9 more
>
>
>  wzhang@csloanr02:temp_client]$java
> org.apache.rampart.samples.sample05.Client
> http://localhost:8080/axis2/services/sample05
> ../client_repositories/sample05
>  Exception in thread "main" org.apache.axis2.AxisFault: WSHandler: Check
> Signature confirmation: got a SC element, but no stored SV; nested exception
> is:
>          org.apache.ws.security.WSSecurityException:
> WSHandler: Check Signature confirmation: got a SC element, but no stored SV
>          at
> org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:109)
>          at
> org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:75)
>          at
> org.apache.axis2.engine.Phase.invoke(Phase.java:381)
>          at
> org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:473)
>          at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:445)
>          at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:355)
>          at
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:279)
>          at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:457)
>          at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:399)
>          at
> org.apache.rampart.samples.sample05.Client.main(Unknown
> Source)
>  Caused by: org.apache.ws.security.WSSecurityException:
> WSHandler: Check Signature confirmation: got a SC element, but no stored SV
>          at
> org.apache.ws.security.handler.WSHandler.checkSignatureConfirmation(WSHandler.java:294)
>          at
> org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.java:291)
>          at
> org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:100)
>          ... 9 more
>  wzhang@csloanr02:temp_client]$java
> org.apache.rampart.samples.sample05.Client
> http://localhost:8080/axis2/services/sample05
> ../client_repositories/sample05
>
>
>  - We i Zhang
>
>


-- 
www.ruchith.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


problem with encryption/signature using rampart module

Posted by Wei Zhang <wz...@scs.fsu.edu>.
Hello,

I am trying to set up a sample signature/encryption example using 
rampart. I am running Tomcat-5.5.17 and Axis2 under CentOS4. I 
downloaded rampart-tute.zip 
<http://www-lk.wso2.com/%7Eruchith/rampart-tute.zip%3E> and passed the 
first three samples. Unfortunately, I got error message for the sample04 
and sample05. Could somebody help me find out the problem? Thank you in 
advance.

Below is what I have when I ran the sample04 and sampe05:
*wzhang@csloanr02:temp_client]$java 
org.apache.rampart.samples.sample04.Client 
http://localhost:8080/axis2/services/sample04 
../client_repositories/sample04*
Exception in thread "main" org.apache.axis2.AxisFault: WSHandler: Check 
Signature confirmation: got a SC element, but no stored SV; nested 
exception is:
        org.apache.ws.security.WSSecurityException: WSHandler: Check 
Signature confirmation: got a SC element, but no stored SV
        at 
org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:109)
        at 
org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:75)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:381)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:473)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:445)
        at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:355)
        at 
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:279)
        at 
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:457)
        at 
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:399)
        at org.apache.rampart.samples.sample05.Client.main(Unknown Source)
Caused by: org.apache.ws.security.WSSecurityException: WSHandler: Check 
Signature confirmation: got a SC element, but no stored SV
        at 
org.apache.ws.security.handler.WSHandler.checkSignatureConfirmation(WSHandler.java:294)
        at 
org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.java:291)
        at 
org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:100)
        ... 9 more


*wzhang@csloanr02:temp_client]$java 
org.apache.rampart.samples.sample05.Client 
http://localhost:8080/axis2/services/sample05 
../client_repositories/sample05*
Exception in thread "main" org.apache.axis2.AxisFault: WSHandler: Check 
Signature confirmation: got a SC element, but no stored SV; nested 
exception is:
        org.apache.ws.security.WSSecurityException: WSHandler: Check 
Signature confirmation: got a SC element, but no stored SV
        at 
org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:109)
        at 
org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:75)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:381)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:473)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:445)
        at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:355)
        at 
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:279)
        at 
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:457)
        at 
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:399)
        at org.apache.rampart.samples.sample05.Client.main(Unknown Source)
Caused by: org.apache.ws.security.WSSecurityException: WSHandler: Check 
Signature confirmation: got a SC element, but no stored SV
        at 
org.apache.ws.security.handler.WSHandler.checkSignatureConfirmation(WSHandler.java:294)
        at 
org.apache.rampart.handler.WSDoAllReceiver.processBasic(WSDoAllReceiver.java:291)
        at 
org.apache.rampart.handler.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:100)
        ... 9 more
wzhang@csloanr02:temp_client]$java 
org.apache.rampart.samples.sample05.Client 
http://localhost:8080/axis2/services/sample05 
../client_repositories/sample05


- We i Zhang


Re: problem with using rampart module

Posted by Ruchith Fernando <ru...@gmail.com>.
I see you are trying this with Tomcat

Please make sure you have the wss4j-SNAPSHOT.jar in the WEB-INF/lib
directory of axis2. Basically you will have to have all jars available
in the "lib" directory of the zip file in the WEB-INF/lib directory.

Thanks,
Ruchith

p.s. you can try the samples (with the services hosted in
SimpleHTTPServer) with the ant build script provided with the samples
bundle.

On 8/22/06, Wei Zhang <wz...@scs.fsu.edu> wrote:
> Hello,
>
> I am newbie to Axis2. I just followed *Secure Web Services* with Apache
> *Rampart*
> <http://www.wso2.net/files/rampart-tute.pdf#search=%22securing%20web%20services%20using%20rampart%22>
> and downloaded rampart-tute.zip
> <http://www-lk.wso2.com/%7Eruchith/rampart-tute.zip>.
>
> The first sample (sample01, with no security)seems running properly.
> Then I built sample02 using
> ant service.02 and ant client.02 and copied sample02.aar to
> $CATALINA_HOME/webapps/axis2/WEB-INF/services directory.  But when I ran
> sample02.Client. I got the following error message.
>
> hostname:~temp_client$java org.apache.rampart.samples.sample02.Client \
> http://localhost:8080/axis2/services/sample02
> ../client_repositories/sample02
>
> Exception in thread "main" org.apache.axis2.AxisFault: Transport error
> 500 . Err or Message is
>
> *type* Exception report
>
> *message*
>
> *description* _The server encountered an internal error () that
> prevented it from fulfilling this request._
>
> *exception*
>
> javax.servlet.ServletException: Servlet execution threw an exception
>
> *root cause*
>
> java.lang.NoClassDefFoundError: org/apache/ws/security/WSPasswordCallback
>         org.apache.rampart.samples.sample02.PWCBHandler.handle(Unknown Source)
>         org.apache.ws.security.processor.UsernameTokenProcessor.handleUsernameToken(UsernameTokenProcessor.java:99)
>         org.apache.ws.security.processor.UsernameTokenProcessor.handleToken(UsernameTokenProcessor.java:49)
>         org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:269)
>         org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:191)
>         org.apache.axis2.security.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:180)
>         org.apache.axis2.security.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:82)
>         org.apache.axis2.engine.Phase.invoke(Phase.java:381)
>         org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:473)
>         org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:445)
>         org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
>         org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> Any input will be highly appreciated. Thank you.
>
> - Wei Zhang
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
www.ruchith.org

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org