Hello,

It's my first time to use ApachCXF-2.7.0.

I got some strange exception "HTTP response '400: Multi-Hop Cycle
Detected'" but I don't know why I got this?



> 2012/12/5 下午 03:07:03 org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
Warn: Interceptor for {
http://service.test/}MyServiceService#{http://service.test/}echo has thrown
exception, unwinding now
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:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:464)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:367)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:320)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:89)
    at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
    at $Proxy28.echo(Unknown Source)
    at test.service.TestWS.main(TestWS.java:37)
Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '400:
Multi-Hop Cycle Detected' when communicating with
http://localhost:8080/TestCXF/myservice
    at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1529)
    at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1489)
    at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1308)
    at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:623)
    at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    ... 9 more
javax.xml.ws.WebServiceException: Could not send Message.
    at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145)
    at $Proxy28.echo(Unknown Source)
    at test.service.TestWS.main(TestWS.java:37)
Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '400:
Multi-Hop Cycle Detected' when communicating with
http://localhost:8080/TestCXF/myservice
    at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1529)
    at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1489)
    at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1308)
    at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:623)
    at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
    at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:464)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:367)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:320)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:89)
    at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
    ... 2 more


>





The following is my code.





>
MyServiceService port = new MyServiceService(new URL(SERVICE_URL),
SERVICE_NAME);
MyService service = port.getMyServicePort();


service.echo("Hello World");

service.echo("Hello World again");



>


I found that if I use the service to call more than one time, it will raise
that exception. I mean if I only call the "service.echo(....)" once. No
exception at all.

What's wrong with it? I tried Metro and Axis2 before, it allows call multi
times with one port.
Any idea on it? Or I need to add some special configurations for that?
Please help!!!


Best regards,
Eric

Reply via email to