cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liu, Jervis" <j...@iona.com>
Subject RE: SSL Server configuration
Date Fri, 24 Nov 2006 04:07:33 GMT
Hi Sergey,

Andrea has an email that explains abstract="true" very well, so just search for email titled
with "Re: How can I setup the configuration for management", in your case, you need to use
abstract="true".  Also do you use a namespace in your wsdl? For example, if you target namespace
is sth like "http://soapinterop.org/cxf", you shall have a config file like below:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
       xsi:schemaLocation="http://www.springframework.org/schema/beans 
       http://www.springframework.org/schema/beans/spring-beans.xsd">
    
    <bean name="{http://soapinterop.org/cxf}ModelProviderPort.http-destination" abstract="true">
        <property name="sslServer">
            <value>
                <sec:sslServer>
                    <sec:Keystore>src/demo/hw_https/resources/celtix.p12</sec:Keystore>
                    <!-- more settings here -->
                <sec:sslServer>
            </value>
        </property>
    </bean>

</beans>

Let me know if this still does not work for you, in that case, we will need to dig into code
further.

Cheers,
Jervis

> -----Original Message-----
> From: Sergey Beryozkin [mailto:sergey.beryozkin@iona.com]
> Sent: Thursday, November 23, 2006 7:34 PM
> To: cxf-dev@incubator.apache.org
> Subject: SSL Server configuration
> 
> 
> Hi there
> 
> In our CXF-based server we want to configure SSL props and 
> I'm trying to do it like this (this fragmnet is incomplete, 
> 'sec' prefix 
> is declared earlier, 
> xmlns:sec="http://cxf.apache.org/configuration/security") :
> 
> <bean id="ModelProviderPort.http-destination" 
> class="org.apache.cxf.transport.http.destination.HTTPDestinati
> onConfigBean">
> 
> <property name="sslServer">
> 
> <value>
> 
> <sec:sslServer>
> 
> <sec:Keystore>src/demo/hw_https/resources/celtix.p12</sec:Keystore>
> 
> <!-- more settings here -->
> 
> <sec:sslServer>
> 
> </bean>
> 
> And I get the error message (please see below). Now if I 
> change the above bean setting to this one :
> <bean id="ModelProviderPort.http-destination" 
> abstract="true"> then the server starts ok, but it appears 
> that the sslServer config 
> is not picked up as I can successfully access our server 
> using plain http...
> 
> Any advice on how we can make the CXF notice that sslServer 
> is in teh config will be appreciated...Should we use 
> abstract="true" or 
> not ? Is it a matter of adding of updating our server's pom 
> to bring some extra CXF jar dependency ? Can it be that due sslServer 
> settings are ignored with abstract="true" because at the 
> moment these settings in our case are simply not correct yet, 
> for ex, a 
> keystore location can not be resolved ?
> 
> Thanks, Sergey
> 
> 
> 
> WARNING: Failed to create application context.
> 
> org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 
> 'ModelProviderPort.http-destination' defined 
> in class path resource [cxf.xml]: Error setting property 
> values; nested exception is 
> org.springframework.beans.PropertyBatchUpdateException; 
> nested PropertyAccessExceptions (1) are:
> 
> PropertyAccessException 1: 
> org.springframework.beans.TypeMismatchException: Failed to 
> convert property value of type 
> [org.apache.xerces.dom.DeferredElementNSImpl] to required 
> type [org.apache.cxf.configuration.security.SSLServerPolicy] 
> for property 
> 'sslServer'; nested exception is 
> java.lang.IllegalArgumentException: No matching editors or 
> conversion strategy found
> 
> Caused by: 
> org.springframework.beans.PropertyBatchUpdateException; 
> nested PropertyAccessException details (1) are:
> 
> PropertyAccessException 1:
> 
> org.springframework.beans.TypeMismatchException: Failed to 
> convert property value of type 
> [org.apache.xerces.dom.DeferredElementNSImpl] to required 
> type [org.apache.cxf.configuration.security.SSLServerPolicy] 
> for property 
> 'sslServer'; nested exception is 
> java.lang.IllegalArgumentException: No matching editors or 
> conversion strategy found
> 
> Caused by: java.lang.IllegalArgumentException: No matching 
> editors or conversion strategy found
> 
> at 
> org.springframework.beans.TypeConverterDelegate.convertIfNeces
> sary(TypeConverterDelegate.java:212)
> 
> P.S. Is it really a user question so that we should send 
> questions like this to a users group ? 
> 
> 

Mime
View raw message