Guys,

if anyone gets in the same trouble, I was able to fix it.

For some reason, when http-conduit was created the second time it was using
a different provider for the keystore.

The solution was to add the 'provider' attribute to the keystore, as below:

 <sec:keyStore ... *provider="SunJSSE"* ... />


cheers


2012/2/16 Márcio Dantas <[email protected]>

> Dan,
>
> I changed my service to be instantiated through a factory, like below:
>
>   <bean id="proxyFactory"
>     class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>
>
>     <property name="serviceClass" value="demo.spring.HelloWorld"/>
>     <property name="address" value="http://localhost:9002/HelloWorld"/>
>
>
>   </bean>
>
>   <bean id="client" class="demo.spring.HelloWorld" *scope="prototype"*
>
>     factory-bean="proxyFactory" factory-method="create"/>
>
>
> I got over that error, but am facing another one now.
> At the second test I get the following message:
>
> Error creating bean with name '*.http-conduit': Cannot create inner bean
> '(inner bean)' of type
> [org.apache.cxf.configuration.jsse.spring.TLSClientParametersConfig] while
> setting bean property 'tlsClientParameters'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name '(inner bean)': Instantiation of bean failed; nested
> exception is
> org.springframework.beans.factory.BeanDefinitionStoreException: Factory
> method [public static java.lang.Object
> org.apache.cxf.configuration.jsse.spring.TLSClientParametersConfig.createTLSClientParameters(java.lang.String)]
> threw exception; nested exception is java.lang.RuntimeException:
> java.io.IOException: exception decrypting data -
> java.security.InvalidKeyException: Illegal key size
>
>
> Seems that the http conduit should be a prototype too.
> Does anyone know what's going one?
>
> thx,
> Márcio Dantas
>
>
> 2012/2/15 Daniel Kulp <[email protected]>
>
>> On Tuesday, February 14, 2012 12:12:48 PM Márcio Dantas wrote:
>> > Hi ladies and gentlemen,
>> >
>> > I'm writing some functional tests to a webservice we have.
>> > For now I just got three tests. My problem is that one test is affecting
>> > the others.
>> >
>> > In the first test I expect an exception "Soap Fault - Message A" from
>> the
>> > client and in the second test I expect exception "Soap Fault - Message
>> B".
>> > Running one test by time, they pass. But when running them together, the
>> > second test fails, because the client throws the same exception as the
>> > first test ("Soap Fault - Message A").
>> >
>> > Is this behaviour expected? Do I have to do some clean up when a client
>> > method throws an exception?
>>
>> Definitely not expected unless the test service is holding some sort of
>> state.
>> The services are normally singletons and thus could be affected by that.
>>
>> Dan
>>
>>
>> >
>> > cxf.xml:
>> >
>> > ...
>> > <jaxws:client name="myServicePort"
>> >    serviceClass="package.IMyServicePort"
>> >    address="http://address/"; />
>> > ...
>> >
>> >
>> > Cheers,
>> > Márcio Dantas
>> --
>> Daniel Kulp
>> [email protected] - http://dankulp.com/blog
>> Talend Community Coder - http://coders.talend.com
>>
>
>
>

Reply via email to