Here is the client exception stack trace:
Furthermore, I did not add any http conduit.





>
package test.service;

import java.net.URL;

import javax.xml.namespace.QName;

import my.test.service.MyService;
import my.test.service.MyServiceService;

/**
 * @author Eric Chow (hkc)
 *
 */
public class TestWS {

    private static final QName SERVICE_NAME = new QName("
http://service.test/";, "MyServiceService");
    private static final String SERVICE_URL = "
http://localhost:8080/TestCXF/myservice?WSDL";;

    /**
     *
     *
     *
     * @param args
     */
    public static void main(String[] args) {
        try {



            MyServiceService port = new MyServiceService(new URL("
http://localhost:8080/TestCXF/myservice?wsdl";));
            MyService service = port.getMyServicePort();
            /*
            MyServiceService port = new MyServiceService(new
URL(SERVICE_URL), SERVICE_NAME);
            MyService service = port.getMyServicePort();
            */
            System.out.println(service.echo("OK"));

            System.out.println(service.echo("OK again"));

        } catch(Exception e) {
            e.printStackTrace();
        }

    }

}


>





>
2012/12/11 上午 09:04:25
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
Info: Creating Service {http://service.test/}MyServiceService from WSDL:
http://localhost:8080/TestCXF/myservice?wsdl
Server: OK
2012/12/11 上午 09:04:27 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:41)
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:41)
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



>





On Fri, Dec 7, 2012 at 6:41 PM, Sergey Beryozkin <[email protected]>wrote:

> Can you actually post the client-side logs ?
> Also - do you specifically configure HttpConduit and if yes then how ?
>
> Thanks, Sergey
>
>
> On 07/12/12 08:04, Eric Chow wrote:
>
>>
>>>
>>>
>>> 2012-12-07 15:59:13 INFO
>>>
>> org.apache.cxf.interceptor.**AbstractLoggingInterceptor:**log,234 -
>> Inbound
>> Message
>> ----------------------------
>> ID: 1
>> Address: 
>> http://localhost:8080/TestCXF/**myservice?WSDL<http://localhost:8080/TestCXF/myservice?WSDL>
>> Http-Method: GET
>> Content-Type:
>> Headers: {Accept=[text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2],
>> cache-control=[no-cache], connection=[keep-alive], Content-Type=[null],
>> host=[localhost:8080], pragma=[no-cache], user-agent=[Java/1.6.0_33]}
>> ------------------------------**--------
>> 2012-12-07 15:59:14 INFO
>> org.apache.cxf.interceptor.**AbstractLoggingInterceptor:**log,234 -
>> Inbound
>> Message
>> ----------------------------
>> ID: 2
>> Address: 
>> http://localhost:8080/TestCXF/**myservice<http://localhost:8080/TestCXF/myservice>
>> Encoding: UTF-8
>> Http-Method: POST
>> Content-Type: text/xml; charset=UTF-8
>> Headers: {Accept=[*/*], cache-control=[no-cache], connection=[keep-alive],
>> Content-Length=[176], content-type=[text/xml; charset=UTF-8],
>> host=[localhost:8080], pragma=[no-cache], SOAPAction=[""],
>> user-agent=[Apache CXF 2.7.0]}
>> Payload:<soap:Envelope xmlns:soap="
>> http://schemas.xmlsoap.org/**soap/envelope/<http://schemas.xmlsoap.org/soap/envelope/>
>> "><soap:Body><**ns2:echo xmlns:ns2="
>> http://service.test/";><msg>OK<**/msg></ns2:echo></soap:Body></**
>> soap:Envelope>
>> ------------------------------**--------
>> 2012-12-07 15:59:14 INFO
>> org.apache.cxf.interceptor.**AbstractLoggingInterceptor:**log,234 -
>> Outbound
>> Message
>> ---------------------------
>> ID: 2
>> Encoding: UTF-8
>> Content-Type: text/xml
>> Headers: {}
>> Payload:<soap:Envelope xmlns:soap="
>> http://schemas.xmlsoap.org/**soap/envelope/<http://schemas.xmlsoap.org/soap/envelope/>
>> "><soap:Body><**ns2:echoResponse
>> xmlns:ns2="http://service.**test/ <http://service.test/>"><return>Server:
>> OK</return></ns2:echoResponse>**</soap:Body></soap:Envelope>
>> ------------------------------**--------
>>
>>
>>
>>
>>>

Reply via email to