Problem solved. It is the http proxy problem.
Thanks.



On Tue, Dec 11, 2012 at 10:56 AM, Eric Chow <[email protected]> wrote:

> I tried to use Metro to generate the proxy stub and it worked fine and did
> not get the same exceptions.
>
>
>
> <?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="
> http://www.w3.org/2001/XMLSchema"; xmlns:wsdl="
> http://schemas.xmlsoap.org/wsdl/"; xmlns:tns="http://service.test/";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:ns1="
> http://schemas.xmlsoap.org/soap/http"; name="MyServiceService"
> targetNamespace="http://service.test/";>
>   <wsdl:types>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:tns="
> http://service.test/"; elementFormDefault="unqualified" targetNamespace="
> http://service.test/"; version="1.0">
> <xs:element name="echo" type="tns:echo"/>
> <xs:element name="echoResponse" type="tns:echoResponse"/>
> <xs:element name="find" type="tns:find"/>
> <xs:element name="findResponse" type="tns:findResponse"/>
> <xs:element name="user" type="tns:user"/>
> <xs:complexType name="find">
> <xs:sequence>
> <xs:element minOccurs="0" name="msg" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="findResponse">
> <xs:sequence>
> <xs:element minOccurs="0" name="return" type="tns:user"/>
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="user">
> <xs:sequence>
> <xs:element name="id" type="xs:int"/>
> <xs:element minOccurs="0" name="name" type="xs:string"/>
> <xs:element minOccurs="0" name="sex" type="xs:string"/>
> <xs:element minOccurs="0" name="photo" type="xs:base64Binary"/>
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="echo">
> <xs:sequence>
> <xs:element minOccurs="0" name="msg" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> <xs:complexType name="echoResponse">
> <xs:sequence>
> <xs:element minOccurs="0" name="return" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> </xs:schema>
>   </wsdl:types>
>   <wsdl:message name="find">
>     <wsdl:part element="tns:find" name="parameters">
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:message name="echoResponse">
>     <wsdl:part element="tns:echoResponse" name="parameters">
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:message name="echo">
>     <wsdl:part element="tns:echo" name="parameters">
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:message name="findResponse">
>     <wsdl:part element="tns:findResponse" name="parameters">
>     </wsdl:part>
>   </wsdl:message>
>   <wsdl:portType name="MyService">
>     <wsdl:operation name="find">
>       <wsdl:input message="tns:find" name="find">
>     </wsdl:input>
>       <wsdl:output message="tns:findResponse" name="findResponse">
>     </wsdl:output>
>     </wsdl:operation>
>     <wsdl:operation name="echo">
>       <wsdl:input message="tns:echo" name="echo">
>     </wsdl:input>
>       <wsdl:output message="tns:echoResponse" name="echoResponse">
>     </wsdl:output>
>     </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="MyServiceServiceSoapBinding" type="tns:MyService">
>     <soap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http"/>
>     <wsdl:operation name="find">
>       <soap:operation soapAction="" style="document"/>
>       <wsdl:input name="find">
>         <soap:body use="literal"/>
>       </wsdl:input>
>       <wsdl:output name="findResponse">
>         <soap:body use="literal"/>
>       </wsdl:output>
>     </wsdl:operation>
>     <wsdl:operation name="echo">
>       <soap:operation soapAction="" style="document"/>
>       <wsdl:input name="echo">
>         <soap:body use="literal"/>
>       </wsdl:input>
>       <wsdl:output name="echoResponse">
>         <soap:body use="literal"/>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="MyServiceService">
>     <wsdl:port binding="tns:MyServiceServiceSoapBinding"
> name="MyServicePort">
>       <soap:address location="http://localhost:8080/TestCXF/myservice"/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
>
>>
>>
>
>
>
>
>
>
> On Tue, Dec 11, 2012 at 10:14 AM, Willem jiang <[email protected]>wrote:
>
>> Can you try access the wsdl file with a browser?
>> In this way, we could check if there is something wrong on the server
>> side.
>>
>>
>> --
>> Willem Jiang
>>
>> Red Hat, Inc.
>> FuseSource is now part of Red Hat
>> Web: http://www.fusesource.com | http://www.redhat.com
>> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
>> (English)
>>           http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>>
>>
>>
>>
>>
>> On Tuesday, December 11, 2012 at 9:06 AM, Eric Chow wrote:
>>
>> > 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](mailto:
>> [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