Hi Willem,
I tried my code with Camel 1.5 and cxf 2.13 and the problem staying alive.
I'm still working on that problem
Mta38


willem.jiang wrote:
> 
> Hi
> 
> It's looks like a CXF HTTPConduit bug, which version of CXF and Camel
> are you using?
> Can you invoke the service with a normal CXF client ?
> 
> Willem
> 
> mta38 wrote:
>> Hi all,
>> I have some trouble with Camel rout to cxf endpoint.
>> I have implemented a web service and publish it using cxf api. The
>> following
>> snipset is my code to start web service:
>> 
>> JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();  
>> sf.setServiceBean(new ClientFixeImpl());
>> address = props.getProperty("http://localhost:8000/service/client";);
>> sf.setAddress(address);
>> service = sf.create();
>> 
>> The service is published; I can invoke it in an internet Browser. But
>> when I
>> try to send a message to that web service using a camel route :
>> 
>> <camel:camelContext id="camelContext">
>>      <camel:route>
>>              <camel:from uri="direct:start"/>
>>              <camel:to uri="cxf:bean:endpointFixeProvider"/>
>>              </camel:route>
>> </camel:camelContext>
>> 
>> Where " endpointFixeProvider" is defined like that :
>> 
>> 
>> <cxf:cxfEndpoint id="endpointFixeProvider"
>>              serviceClass="org.example.clientfixe.ClientFixe"
>>              address="http://localhost:8001/ClientFixeSOAP";
>>              wsdlURL="wsdl/ClientFixe-1.0.wsdl" 
>> endpointName="s:ClientFixeSOAP"
>>              serviceName="s:ClientFixe"
>>              xmlns:s="http://www.example.org/ClientFixe/";>
>>              <cxf:properties>
>>                       <entry key="dataFormat" value="MESSAGE"></entry>
>>              </cxf:properties>
>>              
>>      </cxf:cxfEndpoint>
>> 
>> 
>> I have the following error:
>> INFO: Interceptor has thrown exception, unwinding now
>> java.lang.IllegalStateException: Already connected
>>      at
>> java.net.HttpURLConnection.setFixedLengthStreamingMode(HttpURLConnection.java:100)
>>      at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.thresholdNotReached(HTTPConduit.java:1774)
>>      at
>> org.apache.cxf.io.AbstractThresholdOutputStream.close(AbstractThresholdOutputStream.java:99)
>>      at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1859)
>>      at
>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>      at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:593)
>>      at
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>      at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
>>      at
>> org.apache.camel.component.cxf.invoker.CxfClient.invokeWithMessageStream(CxfClient.java:132)
>>      at
>> org.apache.camel.component.cxf.invoker.CxfClient.dispatch(CxfClient.java:75)
>>      at
>> org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:251)
>>      at
>> org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:176)
>>      at
>> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
>>      at
>> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
>>      at
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
>>      at
>> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:155)
>>      at
>> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:91)
>>      at
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
>>      at
>> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:39)
>>      at
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
>>      at
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
>>      at
>> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:47)
>>      at
>> org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:149)
>>      at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:86)
>>      at
>> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:84)
>>      at
>> org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:143)
>>      at
>> org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:139)
>>      at
>> adapter.camel.CamelServiceAdapter.sendSync(CamelServiceAdapter.java:147)
>>      at org.example.client.ClientImpl.soldeClient(ClientImpl.java:91)
>> 
>> 
>> Is someone have an idea? :confused:
>> Thanks in Advance,
>> Mta38
>> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%22Already-Connected%22-message-when-try-to-route-to-cxf-web-service-tp21028941s22882p21033714.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to