axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Jayasekara (JIRA)" <>
Subject [jira] Commented: (RAMPART-324) Caused by: General security error (WSEncryptBody/WSSignE nvelope: Element to encrypt/sign not found: {}args0)
Date Mon, 07 Mar 2011 02:26:59 GMT


Amila Jayasekara commented on RAMPART-324:

Hi Thilina, Abhinav,

I also faced a similar issue when running some rampart samples. Therefore I tried to reproduce
this issue in the trunk. So here are my findings,

It seems rampart does not take into account the namespaces specified in the policy for EncryptedElements.
So if you add following assertion to policy

<sp:EncryptedElements xmlns:sp="" 


rampart would not recognize prefix “ serns”.

But if you add following assertion,
<sp:EncryptedElements xmlns:sp="" 


rampart will not complain about the namespace. In other words inorder to work this you must
have namespace prefix “ns1”. The reason for “ns1” to work is that it is the default
namespace prefix given when message generation. Here I am pasting a part of a message which
is generated before encrypting elements,


As you can see ns1 is the default namespace given when message generation. But even you are
able to get through with namespace issue, rampart will not sign nor encrypt the message elements
you specified in the policy. This is in return a result of not reading elements from the policy
(I think).

We will further investigate on this and will work on a patch.


> Caused by: General security error (WSEncryptBody/WSSignE
nvelope: Element to encrypt/sign not found: {}args0)
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>                 Key: RAMPART-324
>                 URL:
>             Project: Rampart
>          Issue Type: Question
>          Components: rampart-core, rampart-policy
>    Affects Versions: 1.4
>         Environment: Windows XP, Rampart 1.4,JDK1.5_06,Axis2 1.5
>            Reporter: Abhinav Mishra
>            Assignee: Thilina Buddhika
>            Priority: Blocker
>              Labels: security
>         Attachments:,,,,,, client.jks, service.jks, services.xml
>   Original Estimate: 504h
>  Remaining Estimate: 504h
> Here I am trying to run a multiplication service in which I pass 2 parameters. In these
two parameters I am trying to encrypt and sign only single element. For this I am using <SignedElements>
and <EncryptedElements> assertions. I am calling the service using Client stub in which
the namaspace generated  is xmlns:ns1="". I amt trying to use Xpath
for that element as <sp:XPath>/soapenv:Envelope/soapenv:Body/ns1:mul/ns1:args0</sp:XPath>
where soapenv is xmlns:soapenv="">.
> When this got error i changed Xpath to:
> <sp:XPath>descendant::ns1:args0</sp:XPath>
>  But i am getting an error which is 
> Caused by: General security error (WSEncryptBody/WSSignE
nvelope: Element to encrypt/sign not found: {}args0)
> Abhinav
> Abhinav Mishra
> Exception in thread "main" org.apache.axis2.AxisFault: Error during encryption
>         at org.apache.rampart.handler.RampartSender.invoke(
>         at org.apache.axis2.engine.Phase.invoke(
>         at org.apache.axis2.engine.AxisEngine.invoke(
>         at org.apache.axis2.engine.AxisEngine.send(
>         at org.apache.axis2.description.OutInAxisOperationClient.send(
>         at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> :229)
>         at org.apache.axis2.client.OperationClient.execute(
>         at
>         at
> Caused by: org.apache.rampart.RampartException: Error during encryption
>         at org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBinding
>         at
> 3)
>         at
>         at org.apache.rampart.handler.RampartSender.invoke(
>         ... 8 more
> Caused by: General security error (WSEncryptBody/WSSignE
> nvelope: Element to encrypt/sign not found: {}args0)
>         at
>         at
>         at
>         at org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBinding
>         ... 11 more
> So,please help me to solve this issue.
> Here i am attaching my code and services.xml file.
> Thanks in advance!!!

This message is automatically generated by JIRA.
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message