axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonah <liu.jo...@gmail.com>
Subject Re: error when running rampart-1.4 samples in axis2-1.5.1
Date Tue, 17 Nov 2009 09:24:14 GMT
Hi,Prabath
   thanks for your reply -:)

   I tested sample03 successfuly under tomcat-6.0.20.

   I am encountering a new problem that if there are many service client
with it's own cer file,how to config server side rampart policy?By reading
rampart config,it seems that client alias must be defined in rampart
config.But client alias must be unique in server.jks,If I has to cliet alias
named client1,client2 in server.jks,how to config rampart?

2009/11/13 Prabath Siriwardena <prabath@wso2.com>

> Hope this [1] will help...
>
> Thanks & regards.
> -Prabath
>
> [1]:
> http://blog.rampartfaq.com/2009/08/orgapachewssecuritywssecurityexception.html
>
> jonah wrote:
>
>> Hi Isuru ,
>> *I runed all sample,but none of them was successful.*
>> *The error message of ant client.02 was just like ant client.01*
>> *The error message of ant client.03 was like following:*
>> *
>> *
>> *
>> *
>> *
>> client.03:
>>     [copy] Copying 1 file to
>> D:\rampart-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample03\modules
>>     [copy] Copying 1 file to
>> D:\rampart-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample03\modules
>>     [copy] Copying 1 file to
>> D:\rampart-dist-1.4-bin\rampart-1.4\samples\policy\build\temp_client
>>     [copy] Copying 1 file to
>> D:\rampart-dist-1.4-bin\rampart-1.4\samples\policy\build\temp_client
>>     [java] log4j:WARN No appenders could be found for logger
>> (org.apache.axis2.deployment.FileSystemConfigurator).
>>     [java] log4j:WARN Please initialize the log4j system properly.
>>     [java] Exception in thread "main" org.apache.axis2.AxisFault: Error
>> during encryption
>>     [java]     at
>> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)
>>     [java]     at org.apache.axis2.engine.Phase.invoke(Phase.java:318)
>>     [java]     at
>> org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:251)
>>     [java]     at
>> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:416)
>>     [java]     at
>> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
>>     [java]     at
>> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
>>     [java]     at
>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>>     [java]     at
>> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:539)
>>     [java]     at
>> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520)
>>     [java]     at
>> org.apache.rampart.samples.policy.sample03.Client.main(Unknown Source)
>>     [java] Caused by: org.apache.rampart.RampartException: Error during
>> encryption
>>     [java]     at
>> org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBindingBuilder.java:544)
>>     [java]     at
>> org.apache.rampart.builder.AsymmetricBindingBuilder.build(AsymmetricBindingBuilder.java:93)
>>     [java]     at
>> org.apache.rampart.MessageBuilder.build(MessageBuilder.java:147)
>>     [java]     at
>> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
>>     [java]     ... 9 more
>>     [java] Caused by: org.apache.ws.security.WSSecurityException: An
>> unsupported signature or encryption algorithm was used (unsupported key
>> transport encrypti
>> on algorithm: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-1_5
>> )
>>     [java]     at
>> org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(WSSecurityUtil.java:689)
>>     [java]     at
>> org.apache.ws.security.message.WSSecEncryptedKey.prepareInternal(WSSecEncryptedKey.java:195)
>>     [java]     at
>> org.apache.ws.security.message.WSSecEncrypt.prepare(WSSecEncrypt.java:260)
>>     [java]     at
>> org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBindingBuilder.java:510)
>>     [java]     ... 12 more
>>     [java] Java Result: 1
>>
>> BUILD SUCCESSFUL
>> Total time: 17 seconds
>>
>>
>>
>> What should I do?
>> Thanks.
>>
>>
>> *
>> *
>> *
>> 2009/11/13 Isuru Suriarachchi <isurues@gmail.com <mailto:
>> isurues@gmail.com>>
>>
>>
>>    Hi Jonah,
>>
>>    I think this doesn't work because this first sample is a Username
>>    Token scenario and it doesn't work with HTTP transport. These
>>    samples use the simple Axis2 server and it only supports HTTP. But
>>    UT needs HTTPS.
>>
>>    This transport check at the Rampart server side was added recently
>>    and it seems like the sample is not updated yet. This is a bug.
>>    Try running other samples 2,3 etc.. Those should work I think..
>>
>>    Thanks,
>>    ~Isuru
>>
>>
>>    On Thu, Nov 12, 2009 at 8:18 PM, jonah <liu.jonah@gmail.com
>>    <mailto:liu.jonah@gmail.com>> wrote:
>>
>>        Hi,I am using rampart-1.4 in axis2-1.5.1.
>>                I installed rampart-1.4 according to Rampart Quick Start
>> Guide
>>        document.
>>                I started service by using >ant service.01
>>        When I caledl client by using ant client.01
>>        I got the output like following:
>>                *D:\webService\rampart-1.4\samples\policy>ant client.01
>>        Buildfile: build.xml*
>>        *check.dependency:*
>>        *client.01:
>>            [mkdir] Created dir:
>>        D:\webService\rampart-1.4\samples\policy\build\client_r
>>        epositories\sample01
>>            [mkdir] Created dir:
>>        D:\webService\rampart-1.4\samples\policy\build\client_r
>>        epositories\sample01\conf
>>            [mkdir] Created dir:
>>        D:\webService\rampart-1.4\samples\policy\build\client_r
>>        epositories\sample01\modules
>>             [copy] Copying 1 file to
>>        D:\webService\rampart-1.4\samples\policy\build\cli
>>        ent_repositories\sample01\modules
>>             [copy] Copying 1 file to
>>        D:\webService\rampart-1.4\samples\policy\build\cli
>>        ent_repositories\sample01\modules
>>            [javac] Compiling 2 source files to
>>        D:\webService\rampart-1.4\samples\policy
>>        \build\temp_client
>>             [copy] Copying 1 file to
>>        D:\webService\rampart-1.4\samples\policy\build\tem
>>        p_client
>>             [copy] Copying 1 file to
>>        D:\webService\rampart-1.4\samples\policy\build\tem
>>        p_client
>>             [java] log4j:WARN No appenders could be found for logger
>>        (org.apache.axis2.
>>        deployment.FileSystemConfigurator).
>>             [java] log4j:WARN Please initialize the log4j system
>>        properly.
>>             [java] Exception in thread "main"
>>        org.apache.axis2.AxisFault: Missing wsse:
>>        Security header in request
>>             [java]     at
>>        org.apache.rampart.handler.RampartReceiver.setFaultCodeAndThr
>>        owAxisFault(RampartReceiver.java:166)
>>             [java]     at
>>        org.apache.rampart.handler.RampartReceiver.invoke(RampartRece
>>        iver.java:99)
>>             [java]     at
>>        org.apache.axis2.engine.Phase.invoke(Phase.java:318)
>>             [java]     at
>>        org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:251
>>        )
>>             [java]     at
>>        org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:16
>>        0)
>>             [java]     at
>>        org.apache.axis2.description.OutInAxisOperationClient.handleR
>>        esponse(OutInAxisOperation.java:364)
>>             [java]     at
>>        org.apache.axis2.description.OutInAxisOperationClient.send(Ou
>>        tInAxisOperation.java:417)
>>             [java]     at
>>        org.apache.axis2.description.OutInAxisOperationClient.execute
>>        Impl(OutInAxisOperation.java:229)
>>             [java]     at
>>        org.apache.axis2.client.OperationClient.execute(OperationClie
>>        nt.java:165)
>>             [java]     at
>>        org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie
>>        nt.java:540)
>>             [java]     at
>>        org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie
>>        nt.java:521)
>>             [java]     at
>>        org.apache.rampart.samples.policy.sample01.Client.main(Unknow
>>        n Source)
>>             [java] Caused by: org.apache.rampart.RampartException:
>>        Missing wsse:Securit
>>        y header in request
>>             [java]     at
>>        org.apache.rampart.RampartEngine.process(RampartEngine.java:1
>>        17)
>>             [java]     at
>>        org.apache.rampart.handler.RampartReceiver.invoke(RampartRece
>>        iver.java:92)
>>             [java]     ... 10 more
>>             [java] Java Result: 1*
>>        *BUILD SUCCESSFUL
>>        Total time: 5 seconds*
>>        *D:\webService\rampart-1.4\samples\policy>*
>>                        *And ,the  webservice server side had no output.*
>>                        *What should I do to correct the problem.*
>>                *Thanks a lot.*
>>
>>
>>
>>
>>    --    Senior Software Engineer,
>>    WSO2 Inc. http://wso2.org/
>>    Blog : http://isurues.wordpress.com/
>>
>>
>>
>

Mime
View raw message