Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5645

wsp:Optional isn't adhered to for WS-RM policy in WSDL

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-milestone2, 2.7.10
    • 2.7.11, 2.6.14, 3.0
    • WS-* Components
    • None
    • Unknown

    Description

      The wsp:Optional attribute doesn't work for WS-RM. As far as the specs tell both WS-Addressing and WS-RM should support wsp:Optional, that is, if wsp:Optional is set to true on a WS-RM policy the WS-RM policy should become optional – the endpoint should allow both messages with and without WS-RM [1]. However, my experimentation showed that it actually doesn't.

      What I did is as follows (see the attached reproducer for details):

      1. Configured in WSDL (greeting.wsdl) an endpoint as optionally WS-RM enabled like the following:
            <wsdl:binding name="GreetingServiceSoapBinding" type="tns:GreetingService">
                <wsp:Policy xmlns:wsp="http://www.w3.org/2006/07/ws-policy">
                    <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata"
                        wsp:Optional="true" />
                    <wsrmp:RMAssertion xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
                        wsp:Optional="true" />
                </wsp:Policy>
                ...
        
      2. Sent a WS-RM unaware (= no SOAP header) SOAP request from the client but got the following SOAP Fault:
        <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
          <soap:Body>
            <soap:Fault>
              <faultcode>soap:Server</faultcode>
              <faultstring>WS-Addressing is required by this endpoint.</faultstring>
            </soap:Fault>
          </soap:Body>
        </soap:Envelope>
        

      [1] In WS-RM Policy 1.1 p.8:

      /wsrmp:RMAssertion/@wsp:Optional="true"
      Per WS-Policy, this is compact notation for two policy alternatives, one with and one without the assertion. The intuition is that the behavior indicated by the assertion is optional, or in this case, that WS-ReliableMessaging MAY be used.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ema Jim Ma
            tadayosi Tadayoshi Sato
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment