You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by ssigabudeen <ss...@qatarairways.com.qa> on 2012/04/04 16:55:33 UTC

getting Timeout,WCF - CXF WS Reliable Messaging

Hi,

When i tried communicate with WCF webservice using CXF Reliable messages, i
get SocketTimeout Exception follweed by, kindly someone provide me a sample,
if someone comeacross.. 

WARNING: Interceptor for
{http://tempuri.org/}wsBindingSessionServiceImp#{http://tempuri.org/}IncrementBy10
has thrown exception, unwinding now
*org.apache.cxf.interceptor.Fault: Failed to send RM protocol message
{http://schemas.xmlsoap.org/ws/2005/02/rm}CreateSequence.*	at
org.apache.cxf.ws.rm.AbstractRMInterceptor.handleMessage(AbstractRMInterceptor.java:103)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:533)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
	at $Proxy38.incrementBy10(Unknown Source)
	at com.qr.test.Client.main(Client.java:53)
*Caused by: org.apache.cxf.ws.rm.RMException: Failed to send RM protocol
message {http://schemas.xmlsoap.org/ws/2005/02/rm}CreateSequence.*	at
org.apache.cxf.ws.rm.Proxy.invoke(Proxy.java:287)
	at org.apache.cxf.ws.rm.Proxy.createSequence(Proxy.java:175)
	at org.apache.cxf.ws.rm.RMManager.getSequence(RMManager.java:453)
	at org.apache.cxf.ws.rm.RMOutInterceptor.handle(RMOutInterceptor.java:131)
	at
org.apache.cxf.ws.rm.AbstractRMInterceptor.handleMessage(AbstractRMInterceptor.java:83)
	... 9 more
Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
	at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:533)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:375)
	at org.apache.cxf.ws.rm.Proxy.invoke(Proxy.java:277)
	... 13 more
Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking
http://172.27.14.24/WcfService_Normal/wsBindingSessionServiceImp.svc?wsdl:
Read timed out

*Attached the code used *

SpringBusFactory busFactory = new SpringBusFactory();
URL cxfConfig = new File("ws-rm.xml").toURL();
Bus bus = busFactory.createBus(cxfConfig);
busFactory.setDefaultBus(bus);


String addresses =
"http://172.27.14.24/WcfService_Normal/wsBindingSessionServiceImp.svc?wsdl";
URL urlAddress = new URL(addresses);
WsBindingSessionServiceImp service = new WsBindingSessionServiceImp(
		urlAddress);
IwsBindingSessionServiceImp iService = service
		.getWSSecurityBinding1(/*new AddressingFeature()*/);
BindingProvider bp = (BindingProvider) iService;
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
		addresses);
iService.incrementBy10()

Thanks & Regards
Jawahar

--
View this message in context: http://cxf.547215.n5.nabble.com/getting-Timeout-WCF-CXF-WS-Reliable-Messaging-tp5618000p5618000.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: getting Timeout,WCF - CXF WS Reliable Messaging

Posted by Aki Yoshida <el...@googlemail.com>.
Hi,
as Dan pointed it out, your addresses variable ends with "?wsdl" and
that is the URL for getting the WSDL and not for sending the messages.

And You are sending the messages to this wrong address by explicitly
overwriting the endpoint address given in the WSDL with the line:

bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
               addresses);

If the WSDL has the correct service address, you don't need this
endpoint overwriting.

If it does not, you can use the above line to set the different
address. But in any case, the address must be the correct one.

If the address is correct and the service is running, it should work.

regards, aki


2012/4/5 ssigabudeen <ss...@qatarairways.com.qa>:
> Dan,
>
> I verified the address its correct.  Only the create sequce gets failed,
> Will be the issue with WS-RM1.0/WS-RM1.1.  I am not sure. I attached the
> payload for your verification.   Will the Addressing namespace differ from
> WCF Service ??  Any suggestion.
>
> <soap:Envelope
> xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><Action
> xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</Action><MessageID
> xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:uuid:f7c3d5b8-b02d-4800-a6e7-a38264517f08</MessageID><To
> xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://172.27.14.24/WcfService_Normal/wsBindingSessionServiceImp.svc?wsdl</To><ReplyTo
> xmlns=&quot;&lt;b>http://schemas.xmlsoap.org/ws/2004/08/addressing*"><Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</Address></ReplyTo></soap:Header><soap:Body><CreateSequence
> xmlns=&quot;&lt;b>http://schemas.xmlsoap.org/ws/2005/02/rm"
> xmlns:ns2="http://schemas.xmlsoap.org/ws/2004/08/addressing*"><AcksTo><ns2:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</ns2:Address></AcksTo><Expires>PT0S</Expires><Offer><Identifier>urn:uuid:e678bf06-d562-42e6-9f2a-677e21ed8f88</Identifier><Expires>PT0S</Expires></Offer></CreateSequence></soap:Body></soap:Envelope>
>
> Thanks & Regards
> Jawahar
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/getting-Timeout-WCF-CXF-WS-Reliable-Messaging-tp5618000p5619853.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Re: getting Timeout,WCF - CXF WS Reliable Messaging

Posted by ssigabudeen <ss...@qatarairways.com.qa>.
Dan,

I verified the address its correct.  Only the create sequce gets failed,
Will be the issue with WS-RM1.0/WS-RM1.1.  I am not sure. I attached the
payload for your verification.   Will the Addressing namespace differ from
WCF Service ??  Any suggestion.

<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><Action
xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</Action><MessageID
xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:uuid:f7c3d5b8-b02d-4800-a6e7-a38264517f08</MessageID><To
xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://172.27.14.24/WcfService_Normal/wsBindingSessionServiceImp.svc?wsdl</To><ReplyTo
xmlns=&quot;&lt;b>http://schemas.xmlsoap.org/ws/2004/08/addressing*"><Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</Address></ReplyTo></soap:Header><soap:Body><CreateSequence
xmlns=&quot;&lt;b>http://schemas.xmlsoap.org/ws/2005/02/rm"
xmlns:ns2="http://schemas.xmlsoap.org/ws/2004/08/addressing*"><AcksTo><ns2:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</ns2:Address></AcksTo><Expires>PT0S</Expires><Offer><Identifier>urn:uuid:e678bf06-d562-42e6-9f2a-677e21ed8f88</Identifier><Expires>PT0S</Expires></Offer></CreateSequence></soap:Body></soap:Envelope>

Thanks & Regards
Jawahar

--
View this message in context: http://cxf.547215.n5.nabble.com/getting-Timeout-WCF-CXF-WS-Reliable-Messaging-tp5618000p5619853.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: getting Timeout,WCF - CXF WS Reliable Messaging

Posted by Daniel Kulp <dk...@apache.org>.
I think you have the wrong address.    You are using:

http://172.27.14.24/WcfService_Normal/wsBindingSessionServiceImp.svc?wsdl

as the address for both the wsdl and the endpoint.   Most likely, you'll 
need to pull the ?wsdl off for the endpoint address.   If that doesn't help, 
definitely check the server side for any issues in the logs there.



Dan


On Wednesday, April 04, 2012 07:55:33 AM ssigabudeen wrote:
> Hi,
> 
> When i tried communicate with WCF webservice using CXF Reliable messages,
> i get SocketTimeout Exception follweed by, kindly someone provide me a
> sample, if someone comeacross..
> 
> WARNING: Interceptor for
> {http://tempuri.org/}wsBindingSessionServiceImp#{http://tempuri.org/}Incre
> mentBy10 has thrown exception, unwinding now
> *org.apache.cxf.interceptor.Fault: Failed to send RM protocol message
> {http://schemas.xmlsoap.org/ws/2005/02/rm}CreateSequence.*	at
> org.apache.cxf.ws.rm.AbstractRMInterceptor.handleMessage(AbstractRMInterce
> ptor.java:103) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCha
> in.java:263) at
> org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:533) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) at
> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88) at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
> at $Proxy38.incrementBy10(Unknown Source)
> 	at com.qr.test.Client.main(Client.java:53)
> *Caused by: org.apache.cxf.ws.rm.RMException: Failed to send RM protocol
> message {http://schemas.xmlsoap.org/ws/2005/02/rm}CreateSequence.*	at
> org.apache.cxf.ws.rm.Proxy.invoke(Proxy.java:287)
> 	at org.apache.cxf.ws.rm.Proxy.createSequence(Proxy.java:175)
> 	at org.apache.cxf.ws.rm.RMManager.getSequence(RMManager.java:453)
> 	at
> org.apache.cxf.ws.rm.RMOutInterceptor.handle(RMOutInterceptor.java:131)
> at
> org.apache.cxf.ws.rm.AbstractRMInterceptor.handleMessage(AbstractRMInterce
> ptor.java:83) ... 9 more
> Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
> 	at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInt
> erceptor.handleMessage(MessageSenderInterceptor.java:64) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCha
> in.java:263) at
> org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:533) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463) at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:375) at
> org.apache.cxf.ws.rm.Proxy.invoke(Proxy.java:277)
> 	... 13 more
> Caused by: java.net.SocketTimeoutException: SocketTimeoutException
> invoking
> http://172.27.14.24/WcfService_Normal/wsBindingSessionServiceImp.svc?wsdl
> : Read timed out
> 
> *Attached the code used *
> 
> SpringBusFactory busFactory = new SpringBusFactory();
> URL cxfConfig = new File("ws-rm.xml").toURL();
> Bus bus = busFactory.createBus(cxfConfig);
> busFactory.setDefaultBus(bus);
> 
> 
> String addresses =
> "http://172.27.14.24/WcfService_Normal/wsBindingSessionServiceImp.svc?wsdl
> "; URL urlAddress = new URL(addresses);
> WsBindingSessionServiceImp service = new WsBindingSessionServiceImp(
> 		urlAddress);
> IwsBindingSessionServiceImp iService = service
> 		.getWSSecurityBinding1(/*new AddressingFeature()*/);
> BindingProvider bp = (BindingProvider) iService;
> bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
> 		addresses);
> iService.incrementBy10()
> 
> Thanks & Regards
> Jawahar
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/getting-Timeout-WCF-CXF-WS-Reliable-Messa
> ging-tp5618000p5618000.html Sent from the cxf-user mailing list archive at
> Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com