You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Fred Dushin (JIRA)" <ji...@apache.org> on 2007/09/06 03:23:34 UTC
[jira] Updated: (CXF-955) Implicit dependency from jaxws:endpoint
on httpj:engine-factory is not encoded in Spring
[ https://issues.apache.org/jira/browse/CXF-955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fred Dushin updated CXF-955:
----------------------------
Attachment: cxf-955.patch
Adds support for the depends-on attribute in a jaxws:endpoint, and adds a system test for using this attribute to make a dependency on the HTTP Jetty server engine factory. This forces the Jetty factory to load first, before the jaxws endpoint, so that the port map is properly configured.
> Implicit dependency from jaxws:endpoint on httpj:engine-factory is not encoded in Spring
> ----------------------------------------------------------------------------------------
>
> Key: CXF-955
> URL: https://issues.apache.org/jira/browse/CXF-955
> Project: CXF
> Issue Type: Bug
> Reporter: Fred Dushin
> Attachments: cxf-955.patch
>
>
> Suppose an application spring-loads a jaxws:endpoint, as in:
> {{{
> <jaxws:endpoint
> id="HttpsEndpoint"
> implementor="org.apache.cxf.systest.https.GreeterImpl"
> address="https://localhost:9001/SoapContext/SoapPort"
> serviceName="s:SOAPService"
> endpointName="e:SoapPort"
> xmlns:e="http://apache.org/hello_world"
> xmlns:s="http://apache.org/hello_world"/>
> }}}
> (IMPORTANT: Note the https protocol)
> And suppose further the application tries to define the TLS parameters for servicing listing on the IP port 9001, as follows:
> {{{
> <httpj:engine-factory bus="cxf" id="foo">
> <!-- -->
> <!-- https://localhost:9001/... -->
> <!-- -->
> <httpj:engine port="9001">
> <httpj:tlsServerParameters>
> <sec:keyManagers keyPassword="password">
> <sec:keyStore type="jks" resource="keys/server.jks" password="password"/>
> </sec:keyManagers>
> <sec:trustManagers>
> <sec:keyStore type="jks" resource="keys/truststore.jks"/>
> </sec:trustManagers>
> <sec:clientAuthentication want="true" required="true"/>
> </httpj:tlsServerParameters>
> </httpj:engine>
> }}}
> What will happen is that jaxws:endpoint will get instantiated before the httpj:engine-factory (at least on the JVM I am using). This will cause the implicit endpoint.publish to fail, because at the time the publish occurs, there are no TLS settings established with the Bus for that physical port.
> The error you will typically see is:
> {{{
> Caused by: java.io.IOException: Protocol mismatch: engine's protocol is http, the url protocol is https
> }}}
> We need to define an implicit (or explicit) Spring dependency between these beans.
> A simple Spring "depends-on" would work, but both elements are custom XML spring beans, so schema needs to be modified, and the beans themselves need the DependsOn bean attribute, at a minimum. Additional work may be needed to inform Spring of the actual dependency, so that it Does the Right Thing (r), and instantiates the httpj:engine-factory before the jaxws:endpoint.
> I have a test case for this, which I will provide a patch for shortly (if I can't figure out how to fix the issue).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.