[jbossws-issues] [JBoss JIRA] (JBWS-3777) wsp:Optional isn't adhered to for WS-RM policy in WSDL

Tadayoshi Sato (JIRA) issues at jboss.org
Tue Mar 25 03:29:12 EDT 2014


    [ https://issues.jboss.org/browse/JBWS-3777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12955894#comment-12955894 ] 

Tadayoshi Sato edited comment on JBWS-3777 at 3/25/14 3:28 AM:
---------------------------------------------------------------

Attached a reproducer project (ws-rm.zip). See {{README.md}} for how to run the project.

Note that whether adding {{@RespectBinding}} annotation to the endpoint impl class or not doesn't change the result. You can confirm that by this reproducer. It looks that CXF by default respects the WSDL bindings.
                
      was (Author: tadayosi):
    A reproducer project. See {{README.md}} for how to run the project.

Note that whether adding {{@RespectBinding}} annotation to the endpoint impl class or not doesn't change the result. You can confirm that by this reproducer. It looks that CXF by default respects the WSDL bindings.
                  
> wsp:Optional isn't adhered to for WS-RM policy in WSDL
> ------------------------------------------------------
>
>                 Key: JBWS-3777
>                 URL: https://issues.jboss.org/browse/JBWS-3777
>             Project: JBoss Web Services
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: jbossws-cxf
>    Affects Versions: jbossws-cxf-4.2.3
>         Environment: Red Hat JBoss EAP 6.2.0
>            Reporter: Tadayoshi Sato
>         Attachments: ws-rm.zip
>
>
> The {{wsp:Optional}} attribute doesn't work for WS-RM in JBoss WS CXF. As far as the specs tell both WS-Addressing 1.0 and WS-RM 1.1 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.
> Incidentally, I couldn't reproduce the same issue on a bare CXF runtime, so I believe this is purely a JBoss WS issue.
> What I did is as follows (see the attached reproducer for details):
> # Configured in WSDL ({{greeting.wsdl}}) an endpoint as optionally WS-RM enabled like the following:
> {code:xml}
>     <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>
>         ...
> {code}
> # Sent a WS-RM unaware (= no SOAP header) SOAP request from the client but got the following SOAP Fault:
> {code:xml}
> <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>
> {code}
> [1] In WS-RM Policy 1.1 p.8:
> {quote}
> /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.
> {quote}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbossws-issues mailing list