cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Pablo Pizarro <juanpablo.piza...@gmail.com>
Subject Re: CXF invocation Timeout problem
Date Fri, 17 Dec 2010 22:08:19 GMT
Dan, I tried extending the timeouts.. but the same error.

Is the conduit name the {targetNamespace}+portName.http-condiut?

I changed that but it doesn't work.

Why the soapUI sent the POST as HTML/XML and CXF as TCP (wireshark protocol
column)?. I tried changing the contentType but no luck for me.





2010/12/17 Daniel Kulp <dkulp@apache.org>

>
>
> How long does the invoke take?   Our default timeout is 60 seconds but can
> be
> set via configuration.   See:
>
> http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html
>
> Dan
>
>
> On Friday 17 December 2010 4:52:06 pm Juan Pablo Pizarro wrote:
> > Hello, I'm working in a client to .net web service. I have this
> > client-beans.xml:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <beans xmlns="http://www.springframework.org/schema/beans"
> >     xmlns:jaxws="http://cxf.apache.org/jaxws"
> >     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >     xmlns:p="http://cxf.apache.org/policy"
> >     xmlns:cxf="http://cxf.apache.org/core"
> >     xmlns:wsa="http://cxf.apache.org/ws/addressing"
> >     xmlns:http="http://cxf.apache.org/transports/http/configuration"
> >     xsi:schemaLocation="
> >     http://www.springframework.org/schema/beans
> > http://www.springframework.org/schema/beans/spring-beans.xsd
> >     http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
> >     http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
> >     http://schemas.xmlsoap.org/ws/2005/02/rm/policy
> > http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
> >     http://cxf.apache.org/transports/http/configuration
> > http://cxf.apache.org/schemas/configuration/http-conf.xsd
> >        ">
> >
> >     <import resource="classpath:META-INF/cxf/cxf.xml" />
> >     <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> >     <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> >     <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
> >     <import
> > resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml" />
> >     <import resource="classpath:META-INF/cxf/cxf-extension-policy.xml" />
> >     <import
> resource="classpath:META-INF/cxf/cxf-extension-ws-security.xml"
> > />
> >
> >     <cxf:bus>
> >         <cxf:features>
> >             <p:policies />
> >             <cxf:logging />
> >             <wsa:addressing />
> >         </cxf:features>
> >     </cxf:bus>
> >
> >     <http:conduit name="{
> > http://wss.aduanas.gub.uy/LuciaWsSecurity/Stock.svc}Stock.http-conduit<http://wss.aduanas.gub.uy/LuciaWsSecurity/Stock.svc%7DStock.http-conduit>
> ">
> >         <http:client Connection="Keep-Alive" AllowChunking="false"/>
> >     </http:conduit>
> >
> >     <bean id="wsclient" class="org.tempuri.IStock"
> > factory-bean="wsFactory"    factory-method="create" />
> >
> >     <bean id="wsFactory"
> > class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean"> <property
> > name="serviceClass" value="org.tempuri.IStock" /> <property
> name="address"
> > value="
> > http://wss.aduanas.gub.uy/LuciaWsSecurity/Stock.svc" />
> >
> >         <property name="outInterceptors">
> >             <list>
> >                 <bean
> > class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor" />
> >                 <ref bean="wss4jOutInterceptor" />
> >             </list>
> >         </property>
> > <!--         <property name="bindingId" value="
> > http://apache.org/cxf/binding/http"/> -->
> >     </bean>
> >
> >     <bean id="wss4jOutInterceptor"
> > class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
> >         <constructor-arg>
> >             <map>
> >                 <entry key="action" value="Signature" />
> >                 <entry key="signaturePropFile"
> > value="Client_Sign.properties" />
> >                 <entry key="user" value="theUser" />
> >                 <entry key="passwordType" value="PasswordDigest" />
> >                 <entry key="mustUnderstand" value="false" />
> >                 <entry key="signatureKeyIdentifier"
> value="DirectReference"
> > />
> >
> >                 <entry key="passwordCallbackRef">
> >                     <ref bean="signaturePwdCallback" />
> >                 </entry>
> >                 <entry key="signatureParts" value="{Element}{
> >
> http://www.w3.org/2005/08/addressing}Action;{Element}{http://www.w3.org/200<http://www.w3.org/2005/08/addressing%7DAction;%7BElement%7D%7Bhttp://www.w3.org/200>
> > 5/08/addressing}ReplyTo;{Element}{
> http://www.w3.org/2005/08/addressing}To;{<http://www.w3.org/2005/08/addressing%7DTo;%7B>
> > Element}{http://www.w3.org/2005/08/addressing}MessageID<http://www.w3.org/2005/08/addressing%7DMessageID>"
> />
> >             </map>
> >         </constructor-arg>
> >     </bean>
> >
> >     <bean id="signaturePwdCallback"
> > class="org.jpp.ws.client.ClientCallback" />
> >
> > </beans>
> >
> > When I run the client I get:
> >
> > WARNING: Interceptor for {
> > http://tempuri.org/}IStockService#{http://tempuri.org/}MensajeStock<http://tempuri.org/%7DIStockService#%7Bhttp://tempuri.org/%7DMensajeStock>has
> > thrown exception, unwinding now
> > org.apache.cxf.interceptor.Fault: Could not send Message.
> >     at
> >
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
> > rceptor.handleMessage(MessageSenderInterceptor.java:64) at
> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
> > n.java:247) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) at
> > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at
> > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> >     at $Proxy48.mensajeStock(Unknown Source)
> >     at org.jpp.ws.client.Client.main(Client.java:74)
> > Caused by: java.net.SocketTimeoutException: SocketTimeoutException
> invoking
> > http://wss.aduanas.gub.uy/LuciaWsSecurity/Stock.svc: Read timed out
> >     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method) at
> >
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce
> > ssorImpl.java:39) at
> >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru
> > ctorAccessorImpl.java:27) at
> > java.lang.reflect.Constructor.newInstance(Constructor.java:513) at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(
> > HTTPConduit.java:1995) at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
> > duit.java:1980) at
> >
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputSt
> > ream.java:47) at
> > org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> >     at
> > org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> >     at
> > org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:662) at
> >
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
> > rceptor.handleMessage(MessageSenderInterceptor.java:62) ... 8 more
> > Caused by: java.net.SocketTimeoutException: Read timed out
> >     at java.net.SocketInputStream.socketRead0(Native Method)
> >     at java.net.SocketInputStream.read(SocketInputStream.java:129)
> >     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> >     at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
> >     at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
> >     at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
> >     at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
> >     at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:652)
> >     at
> >
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnectio
> > n.java:1072) at
> > java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
> >     at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
> > eInternal(HTTPConduit.java:2102) at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
> > e(HTTPConduit.java:2071) at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
> > duit.java:1925) ... 13 more
> > Exception in thread "main" javax.xml.ws.WebServiceException: Could not
> send
> > Message.
> >     at
> > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
> >     at $Proxy48.mensajeStock(Unknown Source)
> >     at org.jpp.ws.client.Client.main(Client.java:74)
> > Caused by: java.net.SocketTimeoutException: SocketTimeoutException
> invoking
> > http://wss.aduanas.gub.uy/LuciaWsSecurity/Stock.svc: Read timed out
> >     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method) at
> >
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce
> > ssorImpl.java:39) at
> >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru
> > ctorAccessorImpl.java:27) at
> > java.lang.reflect.Constructor.newInstance(Constructor.java:513) at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(
> > HTTPConduit.java:1995) at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
> > duit.java:1980) at
> >
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputSt
> > ream.java:47) at
> > org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> >     at
> > org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> >     at
> > org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:662) at
> >
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
> > rceptor.handleMessage(MessageSenderInterceptor.java:62) at
> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
> > n.java:247) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) at
> > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at
> > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> >     ... 2 more
> > Caused by: java.net.SocketTimeoutException: Read timed out
> >     at java.net.SocketInputStream.socketRead0(Native Method)
> >     at java.net.SocketInputStream.read(SocketInputStream.java:129)
> >     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> >     at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
> >     at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
> >     at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
> >     at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
> >     at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:652)
> >     at
> >
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnectio
> > n.java:1072) at
> > java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
> >     at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
> > eInternal(HTTPConduit.java:2102) at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
> > e(HTTPConduit.java:2071) at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
> > duit.java:1925) ... 13 more
> >
> > The client code:
> >
> >         IStock client = (IStock) context.getBean("wsclient");
> >         ... feel pojo invocation ...
> >         client.mensajeStock(stock);
> >
> >
> > Is the conduit well done?, the wsdl is in
> > http://wss.aduanas.gub.uy/LuciaWsSecurity/Stock.svc?wsdl.
> >
> > Some estrange thing is the I've a soapUI invocation and it works. The
> only
> > diference that I saw is:
> >
> > - In soapUI invocation the PROTOCOL COLUMN is HTTP/XML
> > - In cxf invocation the PROTOCOL COLUMN is TCP.
> >
> > Any ideas?
> >
> > Thanks!!
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message