Uploaded image for project: 'Rampart'
  1. Rampart
  2. RAMPART-235

Overlapping policies in WSDL create errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.5
    • None
    • rampart-policy
    • None

    Description

      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".

      Attachments

        1. jws07bug.zip
          27 kB
          Dennis M. Sosnoski

        Activity

          People

            ruchith Ruchith B. Gunaratne
            dsosnoski Dennis M. Sosnoski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: