You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by bimjoeipa <jo...@ipaustralia.gov.au> on 2014/03/31 08:33:50 UTC
Java First WS-Policy duplicate PolicyReferences when using
annotations and no separate Java Interface
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>
Anecdotal evidence suggests that CXF 2.6.x doesn't have this problem,
because JBoss EAP 6.1.0 doesn't have this problem (based on 2.6.6), but
JBoss EAP 6.2.0 does (based on 2.7.7)
I have found that
org.apache.cxf.jaxws.ws.PolicyAnnotationTest.testAnnotationsInterfaceAsClass()
actually shows this problem if you enable the
"org.apache.cxf.helpers.XMLUtils.printDOM(wsdl);" line, you can see it in
the output. The test could probably be extended to found the number of
PolicyReference elements output easily enough.
--
View this message in context: http://cxf.547215.n5.nabble.com/Java-First-WS-Policy-duplicate-PolicyReferences-when-using-annotations-and-no-separate-Java-Interface-tp5742132.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Java First WS-Policy duplicate PolicyReferences when using
annotations and no separate Java Interface
Posted by bimjoeipa <jo...@ipaustralia.gov.au>.
Ok sure, I have created the Jira:
https://issues.apache.org/jira/browse/CXF-5665
<https://issues.apache.org/jira/browse/CXF-5665>
--
View this message in context: http://cxf.547215.n5.nabble.com/Java-First-WS-Policy-duplicate-PolicyReferences-when-using-annotations-and-no-separate-Java-Interface-tp5742132p5742265.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Java First WS-Policy duplicate PolicyReferences when using
annotations and no separate Java Interface
Posted by Colm O hEigeartaigh <co...@apache.org>.
Could you create a JIRA with the test-case + someone will look into it?
Colm.
On Tue, Apr 1, 2014 at 1:01 AM, bimjoeipa
<jo...@ipaustralia.gov.au>wrote:
> I have written a patch
> <
> http://cxf.547215.n5.nabble.com/file/n5742179/duplicate-policyreference-test.patch
> >
> to
>
> rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ws/PolicyAnnotationTest.java
> that shows this bug.
>
> I ran the patch against 2.6.x-fixes and it passed, but failed against
> 2.7.x-fixes and master. So I'm guessing the bug must have been introduced
> in
> the 2.7 series at some point.
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Java-First-WS-Policy-duplicate-PolicyReferences-when-using-annotations-and-no-separate-Java-Interface-tp5742132p5742179.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com
Re: Java First WS-Policy duplicate PolicyReferences when using
annotations and no separate Java Interface
Posted by bimjoeipa <jo...@ipaustralia.gov.au>.
I have written a patch
<http://cxf.547215.n5.nabble.com/file/n5742179/duplicate-policyreference-test.patch>
to
rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/ws/PolicyAnnotationTest.java
that shows this bug.
I ran the patch against 2.6.x-fixes and it passed, but failed against
2.7.x-fixes and master. So I'm guessing the bug must have been introduced in
the 2.7 series at some point.
--
View this message in context: http://cxf.547215.n5.nabble.com/Java-First-WS-Policy-duplicate-PolicyReferences-when-using-annotations-and-no-separate-Java-Interface-tp5742132p5742179.html
Sent from the cxf-user mailing list archive at Nabble.com.