I have defined the beans.xml as following, but no log output.



>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xmlns:jaxws="http://cxf.apache.org/jaxws";
    xmlns:cxf="http://cxf.apache.org/core";
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/util
        http://www.springframework.org/schema/util/spring-util-2.0.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";>

  <import resource="classpath:META-INF/cxf/cxf.xml" />
  <import resource="classpath*:META-INF/cxf/cxf-extension-*.xml" />
  <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />


  <cxf:bus>
        <cxf:features>
            <cxf:logging/>
        </cxf:features>
    </cxf:bus>


  <jaxws:endpoint id="data"
                  implementor="test.service.MyService"
                  address="/myservice">

        <jaxws:features>
            <bean class="org.apache.cxf.feature.LoggingFeature"/>
        </jaxws:features>
   </jaxws:endpoint>
</beans>


>


















On Wed, Dec 5, 2012 at 6:25 PM, Sergey Beryozkin <[email protected]>wrote:

> On 05/12/12 07:49, Eric Chow wrote:
>
>> Furthermore, I tried to use Metro's WSDL2JAVA to generate the client stub,
>> everything is fine.
>> Is there any bug on the WSDL2Java(Apache CXF-2.7.0) ?
>>
>>  I recall a user reporting a similar issue before. Last time it was to do
> with HttpConduit detecting a redirection request to the address having the
> same base URI as in the original address.
>
> Can you please register a cxf log feature and check what is returned to
> the client ?
>
> Sergey
>
>
>  Eric
>>
>>
>> On Wed, Dec 5, 2012 at 3:12 PM, Eric Chow<[email protected]>  wrote:
>>
>>  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<http://service.test/%7DMyServiceService#%7Bhttp://service.test/%7Decho>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<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<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