cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin" <sergey.beryoz...@iona.com>
Subject Re: SSL Server configuration
Date Fri, 24 Nov 2006 11:33:40 GMT
Hi Jervis

Thanks for your comments. We have no WSDL, it's raw XML over HTTP...
We have a provider instance and we register it like this :
EndpointImpl ep = (EndpointImpl)Endpoint.publish(publishUrl + getWebResourceContext(), this);

I've experimented a bit, with/without a reversed package name to qualify the provider bean,
with/without the 'Port' suffix, no luck 
so far...Note that publishURL starts with "https" but it has no difference, as no sslServer
config has been processed...

I guess I'll have to look into the code too :-) Any advice will be appreciated too...

Apologies if it's a question to the user group, but I'll keep this thread here...

Cheers, Sergey

<beans xmlns="http://www.springframework.org/schema/beans"

xmlns:sec="http://cxf.apache.org/configuration/security">

<!-- alternative 1-->


<bean name="{http://providers.bar.com}ModelProvider.http-destination"

abstract="true">

<property name="sslServer"/>


</bean>

<!-- alternative 2-->


<bean name="{http://providers.bar.com}ModelProviderPort.http-destination"

abstract="true">

<property name="sslServer"/>


</bean>

</beans>




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