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 cbr600 <ph...@innovation.gov.au> on 2009/07/16 04:02:40 UTC

Axis 2 Rampart sample 06 not working: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p

Hi,

I am a newbie to Axis 2 and Rampart. I am trying to run sample 06 downloaded
from this link:
Version 1.5: http://ws.apache.org/axis2/1_5/installationguide.html

The service and the STS works fine after fixing few things in the build.xml
(please see below):

---------------------------------------------------------------------------------
property name="addressing.mar" value="addressing-1.5.mar"
property name="rampart.mar" value="rampart-1.4.mar"
property name="rahas.mar" value="rahas-1.4.mar"
---------------------------------------------------------------------------------

But when I run the client, the program threw exception as following:

---------------------------------------------------------------------------------
C:\Documents and
Settings\pvu\Desktop\Software\rampart-dist-1.4-bin\rampart-1.4\
samples\policy>"C:\Documents and
Settings\pvu\Desktop\Software\apache-ant-1.7.1-
bin\apache-ant-1.7.1\bin\ant" client.06
Buildfile: build.xml

check.dependency:

client.06:
[copy] Copying 1 file to C:\Documents and Settings\pvu\Desktop\Software\ram
part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
modules
[copy] Copying 1 file to C:\Documents and Settings\pvu\Desktop\Software\ram
part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
modules
[copy] Copying 1 file to C:\Documents and Settings\pvu\Desktop\Software\ram
part-dist-1.4-bin\rampart-1.4\samples\policy\build\temp_client
[copy] Copying 1 file to C:\Documents and Settings\pvu\Desktop\Software\ram
part-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 in crea
ting an encrypted key
[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(Ou
tInAxisOperation.java:402)
[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:539)
[java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie
nt.java:520)
[java] at org.apache.rampart.samples.policy.sample06.Client.main(Unknow
n Source)
[java] Caused by: org.apache.rampart.RampartException: Error in creating an
encrypted key
[java] at org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuil
der(BindingBuilder.java:228)
[java] at org.apache.rampart.builder.SymmetricBindingBuilder.setupEncry
ptedKey(SymmetricBindingBuilder.java:697)
[java] at org.apache.rampart.builder.SymmetricBindingBuilder.doSignBefo
reEncrypt(SymmetricBindingBuilder.java:422)
[java] at org.apache.rampart.builder.SymmetricBindingBuilder.build(Symm
etricBindingBuilder.java:90)
[java] at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:1
44)
[java] at org.apache.rampart.handler.RampartSender.invoke(RampartSender
.java:64)
[java] ... 9 more
[java] Caused by: org.apache.ws.security.WSSecurityException: An unsupporte
d signature or encryption algorithm was used (unsupported key transport
encrypti
on algorithm: No such algorithm:
http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p
)
[java] at org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(
WSSecurityUtil.java:689)
[java] at org.apache.ws.security.message.WSSecEncryptedKey.prepareInter
nal(WSSecEncryptedKey.java:195)
[java] at org.apache.ws.security.message.WSSecEncryptedKey.prepare(WSSe
cEncryptedKey.java:173)
[java] at org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuil
der(BindingBuilder.java:224)
[java] ... 14 more
[java] Java Result: 1

BUILD SUCCESSFUL
Total time: 3 seconds
-----------------------------------------------------------------------------------

I "google" the error and found the following links:

1)
https://wso2.org/jira/browse/CARBON715;jsessionid=BD22C5780277D0AD4EACAE6B9276420D?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel
2) https://wso2.org/jira/browse/CARBON-3709

It seems to me that the problem has been fixed by the Axis team but where
can I find a new version of the sample?
OR is this another bug?

Any help or suggestion would be greatly appreciated.

Regards,
Phillip
-- 
View this message in context: http://www.nabble.com/Axis-2-Rampart-sample-06-not-working%3A-No-such-algorithm%3A-http%3A--www.w3.org-2001-04-xmlenc-rsa-oaep-mgf1p-tp24508879p24508879.html
Sent from the Axis - User mailing list archive at Nabble.com.


Re: Axis 2 Rampart sample 06 not working: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p

Posted by Nandana Mihindukulasooriya <na...@gmail.com>.
Hi Phillip,
        Can you try with Rampart SNAPSHOT which can be found here [1].

thanks,
Nandana

[1] -
http://builder.wso2.org/browse/RAMPART-NIGHTLY-584/artifact/rampart-binary/rampart-dist-SNAPSHOT-bin.zip

On Thu, Jul 16, 2009 at 9:25 AM, cbr600 <ph...@innovation.gov.au>wrote:

>
> Hi Nan,
>
> I copied the bcprov-jdk16-143.jar to AXIS_HOME/lib but then the client gave
> me this error
>
>     [java] Caused by: java.lang.ClassNotFoundException:
> edu.emory.mathcs.backport.java.util.concurrent.locks.ReadWriteLock
>
> I googled and found this link:
>
> http://javacio.us/search?q=edu%2Femory%2Fmathcs%2Fbackport%2Fjava%2Futil%2Fconcurrent%2Flocks%2FReadWriteLock+more%3Ajar_files&inline=true
>
> It could be a silly questions but which jar should I add this time?
>
> Any help or suggestions would be greatly appreciated.
>
> Regards,
> Phillip
>
>
> cbr600 wrote:
> >
> > Hi,
> >
> > I am a newbie to Axis 2 and Rampart. I am trying to run sample 06
> > downloaded from this link:
> > Version 1.5: http://ws.apache.org/axis2/1_5/installationguide.html
> >
> > The service and the STS works fine after fixing few things in the
> > build.xml (please see below):
> >
> >
> ---------------------------------------------------------------------------------
> > property name="addressing.mar" value="addressing-1.5.mar"
> > property name="rampart.mar" value="rampart-1.4.mar"
> > property name="rahas.mar" value="rahas-1.4.mar"
> >
> ---------------------------------------------------------------------------------
> >
> > But when I run the client, the program threw exception as following:
> >
> >
> ---------------------------------------------------------------------------------
> > C:\Documents and
> > Settings\pvu\Desktop\Software\rampart-dist-1.4-bin\rampart-1.4\
> > samples\policy>"C:\Documents and
> > Settings\pvu\Desktop\Software\apache-ant-1.7.1-
> > bin\apache-ant-1.7.1\bin\ant" client.06
> > Buildfile: build.xml
> >
> > check.dependency:
> >
> > client.06:
> > [copy] Copying 1 file to C:\Documents and
> > Settings\pvu\Desktop\Software\ram
> >
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
> > modules
> > [copy] Copying 1 file to C:\Documents and
> > Settings\pvu\Desktop\Software\ram
> >
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
> > modules
> > [copy] Copying 1 file to C:\Documents and
> > Settings\pvu\Desktop\Software\ram
> > part-dist-1.4-bin\rampart-1.4\samples\policy\build\temp_client
> > [copy] Copying 1 file to C:\Documents and
> > Settings\pvu\Desktop\Software\ram
> > part-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 in
> > crea
> > ting an encrypted key
> > [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(Ou
> > tInAxisOperation.java:402)
> > [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:539)
> > [java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie
> > nt.java:520)
> > [java] at org.apache.rampart.samples.policy.sample06.Client.main(Unknow
> > n Source)
> > [java] Caused by: org.apache.rampart.RampartException: Error in creating
> > an
> > encrypted key
> > [java] at org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuil
> > der(BindingBuilder.java:228)
> > [java] at org.apache.rampart.builder.SymmetricBindingBuilder.setupEncry
> > ptedKey(SymmetricBindingBuilder.java:697)
> > [java] at org.apache.rampart.builder.SymmetricBindingBuilder.doSignBefo
> > reEncrypt(SymmetricBindingBuilder.java:422)
> > [java] at org.apache.rampart.builder.SymmetricBindingBuilder.build(Symm
> > etricBindingBuilder.java:90)
> > [java] at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:1
> > 44)
> > [java] at org.apache.rampart.handler.RampartSender.invoke(RampartSender
> > .java:64)
> > [java] ... 9 more
> > [java] Caused by: org.apache.ws.security.WSSecurityException: An
> > unsupporte
> > d signature or encryption algorithm was used (unsupported key transport
> > encrypti
> > on algorithm: No such algorithm:
> > http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p
> > )
> > [java] at org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(
> > WSSecurityUtil.java:689)
> > [java] at org.apache.ws.security.message.WSSecEncryptedKey.prepareInter
> > nal(WSSecEncryptedKey.java:195)
> > [java] at org.apache.ws.security.message.WSSecEncryptedKey.prepare(WSSe
> > cEncryptedKey.java:173)
> > [java] at org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuil
> > der(BindingBuilder.java:224)
> > [java] ... 14 more
> > [java] Java Result: 1
> >
> > BUILD SUCCESSFUL
> > Total time: 3 seconds
> >
> -----------------------------------------------------------------------------------
> >
> > I "google" the error and found the following links:
> >
> > 1)
> >
> https://wso2.org/jira/browse/CARBON715;jsessionid=BD22C5780277D0AD4EACAE6B9276420D?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel
> > 2) https://wso2.org/jira/browse/CARBON-3709
> >
> > It seems to me that the problem has been fixed by the Axis team. I just
> > wonder where I can find a new version of the sample?
> > OR is this another bug?
> >
> > Any help or suggestion would be greatly appreciated.
> >
> > Regards,
> > Phillip
> >
>
> --
> View this message in context:
> http://www.nabble.com/Axis-2-Rampart-sample-06-not-working%3A-No-such-algorithm%3A-http%3A--www.w3.org-2001-04-xmlenc-rsa-oaep-mgf1p-tp24508879p24509723.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Nandana Mihindukulasooriya
WSO2 inc.

http://nandana83.blogspot.com/
http://www.wso2.org

Re: Axis 2 Rampart sample 06 not working: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p

Posted by cbr600 <ph...@innovation.gov.au>.
Hi Nan,

I copied the bcprov-jdk16-143.jar to AXIS_HOME/lib but then the client gave
me this error

     [java] Caused by: java.lang.ClassNotFoundException:
edu.emory.mathcs.backport.java.util.concurrent.locks.ReadWriteLock

I googled and found this link:
http://javacio.us/search?q=edu%2Femory%2Fmathcs%2Fbackport%2Fjava%2Futil%2Fconcurrent%2Flocks%2FReadWriteLock+more%3Ajar_files&inline=true

It could be a silly questions but which jar should I add this time?

Any help or suggestions would be greatly appreciated.

Regards,
Phillip


cbr600 wrote:
> 
> Hi,
> 
> I am a newbie to Axis 2 and Rampart. I am trying to run sample 06
> downloaded from this link:
> Version 1.5: http://ws.apache.org/axis2/1_5/installationguide.html
> 
> The service and the STS works fine after fixing few things in the
> build.xml (please see below):
> 
> ---------------------------------------------------------------------------------
> property name="addressing.mar" value="addressing-1.5.mar"
> property name="rampart.mar" value="rampart-1.4.mar"
> property name="rahas.mar" value="rahas-1.4.mar"
> ---------------------------------------------------------------------------------
> 
> But when I run the client, the program threw exception as following:
> 
> ---------------------------------------------------------------------------------
> C:\Documents and
> Settings\pvu\Desktop\Software\rampart-dist-1.4-bin\rampart-1.4\
> samples\policy>"C:\Documents and
> Settings\pvu\Desktop\Software\apache-ant-1.7.1-
> bin\apache-ant-1.7.1\bin\ant" client.06
> Buildfile: build.xml
> 
> check.dependency:
> 
> client.06:
> [copy] Copying 1 file to C:\Documents and
> Settings\pvu\Desktop\Software\ram
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
> modules
> [copy] Copying 1 file to C:\Documents and
> Settings\pvu\Desktop\Software\ram
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
> modules
> [copy] Copying 1 file to C:\Documents and
> Settings\pvu\Desktop\Software\ram
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\temp_client
> [copy] Copying 1 file to C:\Documents and
> Settings\pvu\Desktop\Software\ram
> part-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 in
> crea
> ting an encrypted key
> [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(Ou
> tInAxisOperation.java:402)
> [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:539)
> [java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie
> nt.java:520)
> [java] at org.apache.rampart.samples.policy.sample06.Client.main(Unknow
> n Source)
> [java] Caused by: org.apache.rampart.RampartException: Error in creating
> an
> encrypted key
> [java] at org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuil
> der(BindingBuilder.java:228)
> [java] at org.apache.rampart.builder.SymmetricBindingBuilder.setupEncry
> ptedKey(SymmetricBindingBuilder.java:697)
> [java] at org.apache.rampart.builder.SymmetricBindingBuilder.doSignBefo
> reEncrypt(SymmetricBindingBuilder.java:422)
> [java] at org.apache.rampart.builder.SymmetricBindingBuilder.build(Symm
> etricBindingBuilder.java:90)
> [java] at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:1
> 44)
> [java] at org.apache.rampart.handler.RampartSender.invoke(RampartSender
> .java:64)
> [java] ... 9 more
> [java] Caused by: org.apache.ws.security.WSSecurityException: An
> unsupporte
> d signature or encryption algorithm was used (unsupported key transport
> encrypti
> on algorithm: No such algorithm:
> http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p
> )
> [java] at org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(
> WSSecurityUtil.java:689)
> [java] at org.apache.ws.security.message.WSSecEncryptedKey.prepareInter
> nal(WSSecEncryptedKey.java:195)
> [java] at org.apache.ws.security.message.WSSecEncryptedKey.prepare(WSSe
> cEncryptedKey.java:173)
> [java] at org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuil
> der(BindingBuilder.java:224)
> [java] ... 14 more
> [java] Java Result: 1
> 
> BUILD SUCCESSFUL
> Total time: 3 seconds
> -----------------------------------------------------------------------------------
> 
> I "google" the error and found the following links:
> 
> 1)
> https://wso2.org/jira/browse/CARBON715;jsessionid=BD22C5780277D0AD4EACAE6B9276420D?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel
> 2) https://wso2.org/jira/browse/CARBON-3709
> 
> It seems to me that the problem has been fixed by the Axis team. I just
> wonder where I can find a new version of the sample?
> OR is this another bug?
> 
> Any help or suggestion would be greatly appreciated.
> 
> Regards,
> Phillip
> 

-- 
View this message in context: http://www.nabble.com/Axis-2-Rampart-sample-06-not-working%3A-No-such-algorithm%3A-http%3A--www.w3.org-2001-04-xmlenc-rsa-oaep-mgf1p-tp24508879p24509723.html
Sent from the Axis - User mailing list archive at Nabble.com.


Re: Axis 2 Rampart sample 06 not working: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p

Posted by Nandana Mihindukulasooriya <na...@gmail.com>.
Hi Phillip,
      Can you check bouncycastle jar is in your classpath ? We didn't ship
bouncycastle due a patent issue. README file in the rampart distribution has
more information.

regards,
Nandana

On Thu, Jul 16, 2009 at 7:32 AM, cbr600 <ph...@innovation.gov.au>wrote:

>
> Hi,
>
> I am a newbie to Axis 2 and Rampart. I am trying to run sample 06
> downloaded
> from this link:
> Version 1.5: http://ws.apache.org/axis2/1_5/installationguide.html
>
> The service and the STS works fine after fixing few things in the build.xml
> (please see below):
>
>
> ---------------------------------------------------------------------------------
> property name="addressing.mar" value="addressing-1.5.mar"
> property name="rampart.mar" value="rampart-1.4.mar"
> property name="rahas.mar" value="rahas-1.4.mar"
>
> ---------------------------------------------------------------------------------
>
> But when I run the client, the program threw exception as following:
>
>
> ---------------------------------------------------------------------------------
> C:\Documents and
> Settings\pvu\Desktop\Software\rampart-dist-1.4-bin\rampart-1.4\
> samples\policy>"C:\Documents and
> Settings\pvu\Desktop\Software\apache-ant-1.7.1-
> bin\apache-ant-1.7.1\bin\ant" client.06
> Buildfile: build.xml
>
> check.dependency:
>
> client.06:
> [copy] Copying 1 file to C:\Documents and Settings\pvu\Desktop\Software\ram
>
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
> modules
> [copy] Copying 1 file to C:\Documents and Settings\pvu\Desktop\Software\ram
>
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
> modules
> [copy] Copying 1 file to C:\Documents and Settings\pvu\Desktop\Software\ram
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\temp_client
> [copy] Copying 1 file to C:\Documents and Settings\pvu\Desktop\Software\ram
> part-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 in crea
> ting an encrypted key
> [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(Ou
> tInAxisOperation.java:402)
> [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:539)
> [java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie
> nt.java:520)
> [java] at org.apache.rampart.samples.policy.sample06.Client.main(Unknow
> n Source)
> [java] Caused by: org.apache.rampart.RampartException: Error in creating an
> encrypted key
> [java] at org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuil
> der(BindingBuilder.java:228)
> [java] at org.apache.rampart.builder.SymmetricBindingBuilder.setupEncry
> ptedKey(SymmetricBindingBuilder.java:697)
> [java] at org.apache.rampart.builder.SymmetricBindingBuilder.doSignBefo
> reEncrypt(SymmetricBindingBuilder.java:422)
> [java] at org.apache.rampart.builder.SymmetricBindingBuilder.build(Symm
> etricBindingBuilder.java:90)
> [java] at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:1
> 44)
> [java] at org.apache.rampart.handler.RampartSender.invoke(RampartSender
> .java:64)
> [java] ... 9 more
> [java] Caused by: org.apache.ws.security.WSSecurityException: An unsupporte
> d signature or encryption algorithm was used (unsupported key transport
> encrypti
> on algorithm: No such algorithm:
> http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p
> )
> [java] at org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(
> WSSecurityUtil.java:689)
> [java] at org.apache.ws.security.message.WSSecEncryptedKey.prepareInter
> nal(WSSecEncryptedKey.java:195)
> [java] at org.apache.ws.security.message.WSSecEncryptedKey.prepare(WSSe
> cEncryptedKey.java:173)
> [java] at org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuil
> der(BindingBuilder.java:224)
> [java] ... 14 more
> [java] Java Result: 1
>
> BUILD SUCCESSFUL
> Total time: 3 seconds
>
> -----------------------------------------------------------------------------------
>
> I "google" the error and found the following links:
>
> 1)
>
> https://wso2.org/jira/browse/CARBON715;jsessionid=BD22C5780277D0AD4EACAE6B9276420D?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel
> 2) https://wso2.org/jira/browse/CARBON-3709
>
> It seems to me that the problem has been fixed by the Axis team but where
> can I find a new version of the sample?
> OR is this another bug?
>
> Any help or suggestion would be greatly appreciated.
>
> Regards,
> Phillip
> --
> View this message in context:
> http://www.nabble.com/Axis-2-Rampart-sample-06-not-working%3A-No-such-algorithm%3A-http%3A--www.w3.org-2001-04-xmlenc-rsa-oaep-mgf1p-tp24508879p24508879.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>


-- 
Nandana Mihindukulasooriya
WSO2 inc.

http://nandana83.blogspot.com/
http://www.wso2.org

Re: Axis 2 Rampart sample 06 not working: No such algorithm: http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p

Posted by cbr600 <ph...@innovation.gov.au>.
Hi Nan,

Sample 06 is working :-), thank you very much.

I have a question about the mex web service. According to
WS-MetadataExchange specification
http://specs.xmlsoap.org/ws/2004/09/mex/WS-MetadataExchange.pdf , there are
two ways to get the metadata:

Option 1) A simple way using POST as described in Section 1 of the spec.
Option 2) Retrieving metadata via a web service as described in Section 4 of
the spec. Sample 06 implements this solution.

The STS which I am consuming, only supports 'option 1' at the moment. I am
just wondering if Rampart can support WS-MetadataExchange with 'option 1'?
If Rampart can support 'option 1', would it be possible to provide us an
example please?

Any help or suggestion would be greatly appreciated.

Regards,
Phillip

cbr600 wrote:
> 
> Hi,
> 
> I am a newbie to Axis 2 and Rampart. I am trying to run sample 06
> downloaded from this link:
> Version 1.5: http://ws.apache.org/axis2/1_5/installationguide.html
> 
> The service and the STS works fine after fixing few things in the
> build.xml (please see below):
> 
> ---------------------------------------------------------------------------------
> property name="addressing.mar" value="addressing-1.5.mar"
> property name="rampart.mar" value="rampart-1.4.mar"
> property name="rahas.mar" value="rahas-1.4.mar"
> ---------------------------------------------------------------------------------
> 
> But when I run the client, the program threw exception as following:
> 
> ---------------------------------------------------------------------------------
> C:\Documents and
> Settings\pvu\Desktop\Software\rampart-dist-1.4-bin\rampart-1.4\
> samples\policy>"C:\Documents and
> Settings\pvu\Desktop\Software\apache-ant-1.7.1-
> bin\apache-ant-1.7.1\bin\ant" client.06
> Buildfile: build.xml
> 
> check.dependency:
> 
> client.06:
> [copy] Copying 1 file to C:\Documents and
> Settings\pvu\Desktop\Software\ram
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
> modules
> [copy] Copying 1 file to C:\Documents and
> Settings\pvu\Desktop\Software\ram
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\client_repositories\sample06\
> modules
> [copy] Copying 1 file to C:\Documents and
> Settings\pvu\Desktop\Software\ram
> part-dist-1.4-bin\rampart-1.4\samples\policy\build\temp_client
> [copy] Copying 1 file to C:\Documents and
> Settings\pvu\Desktop\Software\ram
> part-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 in
> crea
> ting an encrypted key
> [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(Ou
> tInAxisOperation.java:402)
> [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:539)
> [java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie
> nt.java:520)
> [java] at org.apache.rampart.samples.policy.sample06.Client.main(Unknow
> n Source)
> [java] Caused by: org.apache.rampart.RampartException: Error in creating
> an
> encrypted key
> [java] at org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuil
> der(BindingBuilder.java:228)
> [java] at org.apache.rampart.builder.SymmetricBindingBuilder.setupEncry
> ptedKey(SymmetricBindingBuilder.java:697)
> [java] at org.apache.rampart.builder.SymmetricBindingBuilder.doSignBefo
> reEncrypt(SymmetricBindingBuilder.java:422)
> [java] at org.apache.rampart.builder.SymmetricBindingBuilder.build(Symm
> etricBindingBuilder.java:90)
> [java] at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:1
> 44)
> [java] at org.apache.rampart.handler.RampartSender.invoke(RampartSender
> .java:64)
> [java] ... 9 more
> [java] Caused by: org.apache.ws.security.WSSecurityException: An
> unsupporte
> d signature or encryption algorithm was used (unsupported key transport
> encrypti
> on algorithm: No such algorithm:
> http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p
> )
> [java] at org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(
> WSSecurityUtil.java:689)
> [java] at org.apache.ws.security.message.WSSecEncryptedKey.prepareInter
> nal(WSSecEncryptedKey.java:195)
> [java] at org.apache.ws.security.message.WSSecEncryptedKey.prepare(WSSe
> cEncryptedKey.java:173)
> [java] at org.apache.rampart.builder.BindingBuilder.getEncryptedKeyBuil
> der(BindingBuilder.java:224)
> [java] ... 14 more
> [java] Java Result: 1
> 
> BUILD SUCCESSFUL
> Total time: 3 seconds
> -----------------------------------------------------------------------------------
> 
> I "google" the error and found the following links:
> 
> 1)
> https://wso2.org/jira/browse/CARBON715;jsessionid=BD22C5780277D0AD4EACAE6B9276420D?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel
> 2) https://wso2.org/jira/browse/CARBON-3709
> 
> It seems to me that the problem has been fixed by the Axis team. I just
> wonder where I can find a new version of the sample?
> OR is this another bug?
> 
> Any help or suggestion would be greatly appreciated.
> 
> Regards,
> Phillip
> 

-- 
View this message in context: http://www.nabble.com/Axis-2-Rampart-sample-06-not-working%3A-No-such-algorithm%3A-http%3A--www.w3.org-2001-04-xmlenc-rsa-oaep-mgf1p-tp24508879p24526897.html
Sent from the Axis - User mailing list archive at Nabble.com.