Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1103847 - [GSS] (6.3.x) CXF-5665, CXF-5841 - CXF duplicates PolicyReferences in generated WSDL under certain circumstances
[GSS] (6.3.x) CXF-5665, CXF-5841 - CXF duplicates PolicyReferences in generat...
Status: VERIFIED
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Services (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity unspecified
: CR1
: EAP 6.3.2
Assigned To: baranowb
Rostislav Svoboda
: Triaged
Depends On: 1083770
Blocks: 1115216 eap632-blockers/eap632-payload 1144103 1087653
  Show dependency treegraph
 
Reported: 2014-06-02 13:55 EDT by Kyle Lape
Modified: 2018-03-06 15:37 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
A bug in the CXF component shipped with JBoss EAP 6 causes `PolicyReferences` to be duplicated when using Java First WS-Policy Annotations (such as @Policies). The resulting WSDL generates multiple 'PolicyReference' elements when there is no separate Java interface. This issue is expected to be resolved in a future release of the product.
Story Points: ---
Clone Of: 1083770
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Apache JIRA CXF-5665 None None None Never
Apache JIRA CXF-5841 None None None Never

  None (edit)
Description Kyle Lape 2014-06-02 13:55:32 EDT
+++ This bug was initially created as a clone of Bug #1083770 +++

[Copied problem description from CXF Jira]

In CXF 2.7.10 when using Java First WS-Policy Annotations such as:
@Policies({ 
	@Policy(uri = "annotationpolicies/TestOperationPolicy.xml"), 
	@Policy(uri = "annotationpolicies/TestOperationInputPolicy.xml", 
			placement = Policy.Placement.BINDING_OPERATION_INPUT), 
	@Policy(uri = "annotationpolicies/TestOperationOutputPolicy.xml", 
			placement = Policy.Placement.BINDING_OPERATION_OUTPUT), 
	@Policy(uri = "annotationpolicies/TestOperationPTPolicy.xml", 
			placement = Policy.Placement.PORT_TYPE_OPERATION), 
	@Policy(uri = "annotationpolicies/TestOperationPTInputPolicy.xml", 
			placement = Policy.Placement.PORT_TYPE_OPERATION_INPUT), 
	@Policy(uri = "annotationpolicies/TestOperationPTOutputPolicy.xml", 
			placement = Policy.Placement.PORT_TYPE_OPERATION_OUTPUT) 
})

The resulting WSDL ends up generating multiple PolicyReference elements when there is no separate Java Interface for example:

<wsdl:operation name="echoInt">
		<soap:operation soapAction="" style="document"/>
		<wsp:PolicyReference URI="#echoIntBindingOpPolicy"/>
		<wsp:PolicyReference URI="#echoIntBindingOpPolicy"/>
		<wsdl:input name="echoInt">
				<soap:body use="literal"/>
				<wsp:PolicyReference URI="#echoIntBindingOpInputPolicy"/>
				<wsp:PolicyReference URI="#echoIntBindingOpInputPolicy"/>
		</wsdl:input>
		<wsdl:output name="echoIntResponse">
				<soap:body use="literal"/>
				<wsp:PolicyReference URI="#echoIntBindingOpOutputPolicy"/>
				<wsp:PolicyReference URI="#echoIntBindingOpOutputPolicy"/>
		</wsdl:output>
</wsdl:operation>

--- Additional comment from Scott Mumford on 2014-04-22 21:43:21 EDT ---

Flagged as Known Issue as ticket unresolved at the time of writing the release note.

--- Additional comment from Nichola Moore on 2014-05-13 22:00:56 EDT ---

Now set to bug fix as requested in bug 1096876. 
A resolution needs to be added to the doc text, however.

--- Additional comment from Nichola Moore on 2014-05-14 00:57:11 EDT ---

Set back to known issue. Flag reset in error.

--- Additional comment from Kyle Lape on 2014-05-30 12:35:23 EDT ---

This should already be included in 6.3.0 since this fix was included in CXF 2.7.11:

klape@localhost cxf$ git tag --contains eb5ac69120bc7799997740ff6817864039b55518
cxf-2.7.11
Comment 1 baranowb 2014-06-03 03:08:15 EDT
Fix is in: http://git.app.eng.bos.redhat.com/git/apache/cxf.git/commit/?h=cxf-2.7.11-redhat&id=eb5ac69120bc7799997740ff6817864039b55518 , if CXF is bumped to 2.7.11-redhatX this issue can be closed.
Comment 3 Jan Blizňák 2014-06-19 10:32:45 EDT
I still see reported issue in 6.2.4.CP.CR1:

Defining webservice with no interface like this:

@WebService(
      serviceName = "HelloWorldServiceNoInterface",
      portName = "HelloWorld1", 
      name = "HelloWorld1", 
      targetNamespace = "http://www.jboss.org/jbossas/quickstarts/wshelloworld/HelloWorld1"
)
@Policy(uri = "ws-policy/x509SecurityPolicy.xml", placement = Policy.Placement.BINDING)
public class HelloWorldServiceNoInterface {

    @WebMethod
    @Policies({
        @Policy(uri = "ws-policy/inputPolicy.xml", placement = Policy.Placement.PORT_TYPE_OPERATION_INPUT),
        @Policy(uri = "ws-policy/outputPolicy.xml", placement = Policy.Placement.PORT_TYPE_OPERATION_OUTPUT)
    })
    public String sayHello() {
        return "Hello World!";
    }
}

still results in multiple PolicyReference elements in wsdl:

<wsdl:portType name="HelloWorld1">
  <wsdl:operation name="sayHello2">
    <wsdl:input message="tns:sayHello2" name="sayHello2">
      <wsp:PolicyReference URI="#Input_Security_Policy"/>
      <wsp:PolicyReference URI="#Input_Security_Policy"/>
    </wsdl:input>
    <wsdl:output message="tns:sayHello2Response" name="sayHello2Response">
      <wsp:PolicyReference URI="#Output_Security_Policy"/>
      <wsp:PolicyReference URI="#Output_Security_Policy"/>
    </wsdl:output>
  </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloWorldServiceNoInterfaceSoapBinding" type="tns:HelloWorld1">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  <wsp:PolicyReference URI="#X509SecurityPolicy"/>
  <wsp:PolicyReference URI="#X509SecurityPolicy"/>
  <wsdl:operation name="sayHello2">
    <soap:operation soapAction="" style="document"/>
    <wsdl:input name="sayHello2">
      <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output name="sayHello2Response">
    <soap:body use="literal"/>
    </wsdl:output>
  </wsdl:operation>
</wsdl:binding>
Comment 4 Scott Mumford 2014-06-22 21:56:13 EDT
Converted release note to Known Issue as failed QA
Comment 12 baranowb 2014-07-08 06:34:42 EDT
Shifting to 6.3.1 - this require new spin of CXF (2.7.12 iirc)
Comment 14 Jan Blizňák 2014-10-16 05:35:47 EDT
Verified on 6.3.2.CP.CR1

Note You need to log in before you can comment on or make changes to this bug.