Overlapping policies in WSDL create errors
------------------------------------------
Key: RAMPART-235
URL: https://issues.apache.org/jira/browse/RAMPART-235
Project: Rampart
Issue Type: Bug
Components: rampart-policy
Affects Versions: 1.5
Reporter: Dennis Sosnoski
Assignee: Ruchith Udayanga Fernando
I tried attaching a WS-SecurityPolicy (for UsernameToken) at the
binding/operation level in a WSDL, then another one (for signing) at the input
message level. This create an error:
[java] Exception in thread "main" org.apache.axis2.AxisFault: Encryption
user not specified (The context is created by the initiating party)
[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
com.sosnoski.ws.library.adb.LibraryGranularStub.addBook(LibraryGranularStub.java:456)
[java] at
com.sosnoski.ws.library.adb.WebServiceClient.main(WebServiceClient.java:94)
[java] Caused by: org.apache.rampart.RampartException: Encryption user not
specified (The context is created by the initiating party)
[java] at
org.apache.rampart.util.RampartUtil.setEncryptionUser(RampartUtil.java:1146)
[java] at
org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBindingBuilder.java:507)
[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] ... 8 more
[java] Java Result: 1
No encryption is being used in the WS-SecurityPolicy.
To duplicate, edit the build.properties in the attached project and set the
Axis2 home directory (with Rampart installed). First try it without the
overlapping policies - use "ant" to build the project, then upload the AAR to
your server and use "ant run" to test. Next edit the library.wsdl file and
uncomment the UsernameToken policy reference in <wsdl:operation
name="addBook">. Again use "ant" to build, upload the AAR, and again run with
"ant run".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.