[
https://issues.apache.org/jira/browse/CXF-4876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Freeman Fang resolved CXF-4876.
-------------------------------
Resolution: Fixed
Fix Version/s: 2.5.10
2.6.7
2.7.4
2.8.0
apply patch on behalf of Alan Yang with thanks
http://svn.apache.org/r1456402 for trunk
http://svn.apache.org/r1456405 for 2.7.x branch
http://svn.apache.org/r1456416 for 2.6.x branch
http://svn.apache.org/r1456419 for 2.5.x branch
> CXF RespectBinding feature does not support the customized binding info under
> operation and its sub element.
> ------------------------------------------------------------------------------------------------------------
>
> Key: CXF-4876
> URL: https://issues.apache.org/jira/browse/CXF-4876
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.6.2
> Reporter: Alan Yang
> Assignee: Freeman Fang
> Labels: JAXWS-2.2, RespectBinding,
> Fix For: 2.8.0, 2.7.4, 2.6.7, 2.5.10
>
> Attachments: CXF-4876-checkstyle.patch, cxf-4876.patch,
> JaxWsEndpointImpl.java.patch
>
>
> The RespectBinding description in the JAXWS 2.2 spec is:
> 6.5.3 javax.xml.ws.RespectBindingFeature
> The RespectBindingFeature is used to control whether a JAX-WS implementation
> MUST respect/honor the contents of the wsdl:binding associated with an
> endpoint. It has a corresponding RespectBinding annotation described in
> section 7.14.3.
> ♦ Conformance (javax.xml.ws.RespectBindingFeature): When the
> javax.xml.ws.RespectBindingFeature is enabled, a JAX-WS implementation MUST
> inspect the wsdl:binding at runtime to determine result and parameter
> bindings as well as any wsdl:extensions that have the required=true
> attribute. All required wsdl:extensions MUST be supported and honored by a
> JAX-WS implementation unless a specific wsdl:extension has be explicitly
> disabled via a WebServiceFeature.
> But when we test our application that enabled the RespectBinding feature, we
> found an issue in cxf-2.6.2. The issue is if we add an invalid binding under
> wsdl:binding element as you can see in below, a WebServiceException will be
> throw out when accessing the endpoint first time, and the endpoint will not
> be accessed, this is behavior is correct.
> <binding name="EchoPortBinding" type="tns:Echo">
> <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="document"/>
> <tns:badBinding wsdl:required="true" uri="http://bad/bad"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" />
> <operation name="echo">
> <soap:operation soapAction=""/>
> <input>
> <soap:body use="literal"/>
> </input>
> <output>
> <soap:body use="literal"/>
> </output>
> <fault name="Exception">
> <soap:fault name="Exception" use="literal"/>
> </fault>
> </operation>
> </binding>
> But if we add the invalid binding under operation or its sub element (input,
> output or fault), like the example in below, then cxf will not check it, and
> the endpoint would be access after deployment, although the wsdl4j has
> deserialize it as an unkown element.
> <binding name="EchoPortBinding" type="tns:Echo">
> <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="document"/>
> <operation name="echo">
> <soap:operation soapAction=""/>
> <tns:badBinding wsdl:required="true" uri="http://bad/bad"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" />
> <input>
> <soap:body use="literal"/>
> </input>
> <output>
> <soap:body use="literal"/>
> </output>
> <fault name="Exception">
> <soap:fault name="Exception" use="literal"/>
> </fault>
> </operation>
> </binding>
--
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