You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by mule1 <ua...@yahoo.com> on 2007/09/26 23:14:17 UTC
having problem with cxf 2.0.2 using client webservice
Hello,
I am learning to use cxf (migrated from xfire) and in previous cxf 2.0
release, I had no problem running the following client creating by using
some of the sample code for cxf with spring.
JaxWsProxyFactoryBean jf = new JaxWsProxyFactoryBean();
jf.setAddress("http://localhost:8080/comp/cxf-services/serviceurl");
jf.setServiceClass(MyCxfWebService.class);
MyCxfWebService service1 = (MyCxfWebService) jf.create();
service1.showData("This is a test");
I have the application server deployed with the server service configured
for http://localhost:8080/comp/cxf-services/serviceurl
Now with cxf 2.0.1, it was giving me error for missing jar for
org.apache.geronimo.mail.util. So, I upgraded to cxf 2.0.2 - and I keep
getting the following error. I am really not sure where the issue is.
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:187)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:1)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:395)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1943)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1790)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:576)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
at $Proxy44.findData(Unknown Source)
at com.comp.TestCxfWebService.test1(TestCxfWebService.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:85)
... 34 more
Please help.
--
View this message in context: http://www.nabble.com/having-problem-with-cxf-2.0.2-using-client-webservice-tf4524946.html#a12910018
Sent from the cxf-user mailing list archive at Nabble.com.
Re: having problem with cxf 2.0.2 using client webservice
Posted by mule1 <ua...@yahoo.com>.
Sorry - Please read HelloWorldNew as HelloWorld in my configuration/code in
my previous post - To test, I had created two interfaces - one HelloWorld
and other HelloWorldNew
--
View this message in context: http://www.nabble.com/having-problem-with-cxf-2.0.2-using-client-webservice-tf4524946.html#a12939616
Sent from the cxf-user mailing list archive at Nabble.com.
Re: having problem with cxf 2.0.2 using client webservice
Posted by mule1 <ua...@yahoo.com>.
Hello Willem,
Yes that worked. Thanks so much for pointing that out. I should have first
tried to find out how to reference spring bean before simply using it as
reference bean in my cxf.xml.
--
View this message in context: http://www.nabble.com/having-problem-with-cxf-2.0.2-using-client-webservice-tf4524946.html#a12961225
Sent from the cxf-user mailing list archive at Nabble.com.
Re: having problem with cxf 2.0.2 using client webservice
Posted by Willem Jiang <ni...@iona.com>.
Hi ,
I think I found the key of this issue.
It is you bean.xml's definition. If you want to define the value of
simple:server@serviceBean with a spring bean's reference, you need to
use the prefix '#' for the bean's name, and they should be in the same
application context.
If you take the CXF wiki's [1] as an example , you need to put the
contents in the cxf.xml into beans.xml.
Here is an example for it beans.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:simple="http://cxf.apache.org/simple"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://cxf.apache.org/simple
http://cxf.apache.org/schemas/simple.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<bean id="helloService" class="com.comp.HelloWorldImpl">
</bean>
<simple:server id="hello" address="/hello"
serviceClass="com.comp.HelloWorldNew"
serviceBean="#helloService">
</simple:server>
</beans>
[1]http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
Willem.
mule1 wrote:
> Hello Wellem,
>
> I really don't have anything extra on sever side. To make testing this
> problem simple, I added the HelloWorld sample code in my server side code
> and it just seems that the client code when trying to use it when deployed
> on web application gives the error.
>
> The configuration on server side is as follow:
> 1. --------- I have a cxf.xml which has following:
> <?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:aop="http://www.springframework.org/schema/aop"
> xmlns:util="http://www.springframework.org/schema/util"
> xmlns:tx="http://www.springframework.org/schema/tx"
> xmlns:simple="http://cxf.apache.org/simple"
>
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://www.springframework.org/schema/tx
> http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
> http://www.springframework.org/schema/util
> http://www.springframework.org/schema/util/spring-util-2.0.xsd
> http://www.springframework.org/schema/aop
> http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
> http://cxf.apache.org/simple
> http://cxf.apache.org/schemas/simple.xsd">
>
>
>
> <import resource="classpath:META-INF/cxf/cxf.xml"/>
> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
> <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
>
>
> <simple:server id="hello" address="/hello"
> serviceClass="com.comp.HelloWorldNew"
> serviceBean="helloService">
> </simple:server>
>
> </beans>
>
> 2. ------- I have bean.xml, which has ----------
>
> <bean id="helloService" class="com.comp.HelloWorldImpl">
> </bean>
>
>
> -------------CXF Sample Client changes done to call the HelloWorld service
> deployed in tomcat appserv
> I also tried updating the sample hello world spring client as follow to test
> this from the sample client:
> 1. Updates to Client.java
> public final class Client {
>
> private Client() {
> }
>
> public static void main(String args[]) throws Exception {
> // START SNIPPET: client
> ClassPathXmlApplicationContext context
> = new ClassPathXmlApplicationContext(new String[]
> {"demo/spring/client/client-beans.xml"});
>
> HelloWorld client = (HelloWorld)context.getBean("client");
>
> // NOTE: If I use this call, I get the error for
> "javax.xml.ws.WebServiceException: Could not find operation info for web
> method "
> //String response = client.sayHi("Joe");
>
> //NOTE: If I use this call, I get the error for "Caused by:
> java.lang.IllegalArgumentException: object is not an instance of declaring
> class "
> ClientProxyFactoryBean cf = new ClientProxyFactoryBean();
> cf.setAddress("http://localhost:8080/services/hello");
> cf.setServiceClass(HelloWorld.class); // Optionally specify the
> service interface
> HelloWorld service = (HelloWorld) cf.create();
>
> String test = "Hello World Test in Tomcat appserv";
> String response = service.sayHi(test);
>
> System.out.println("Response: " + response);
> System.exit(0);
> // END SNIPPET: client
> }
> }
>
> 2. Updates to client-beans.java
>
>
> <bean id="client" class="com.comp.HelloWorldNew"
> factory-bean="clientFactory" factory-method="create"/>
>
> <bean id="clientFactory"
> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
> <property name="serviceClass" value="com.comp.HelloWorldNew"/>
> <property name="address" value="http://localhost:8080/services/hello"/>
> </bean>
>
Re: having problem with cxf 2.0.2 using client webservice
Posted by mule1 <ua...@yahoo.com>.
Hello Wellem,
I really don't have anything extra on sever side. To make testing this
problem simple, I added the HelloWorld sample code in my server side code
and it just seems that the client code when trying to use it when deployed
on web application gives the error.
The configuration on server side is as follow:
1. --------- I have a cxf.xml which has following:
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:simple="http://cxf.apache.org/simple"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://cxf.apache.org/simple
http://cxf.apache.org/schemas/simple.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<simple:server id="hello" address="/hello"
serviceClass="com.comp.HelloWorldNew"
serviceBean="helloService">
</simple:server>
</beans>
2. ------- I have bean.xml, which has ----------
<bean id="helloService" class="com.comp.HelloWorldImpl">
</bean>
-------------CXF Sample Client changes done to call the HelloWorld service
deployed in tomcat appserv
I also tried updating the sample hello world spring client as follow to test
this from the sample client:
1. Updates to Client.java
public final class Client {
private Client() {
}
public static void main(String args[]) throws Exception {
// START SNIPPET: client
ClassPathXmlApplicationContext context
= new ClassPathXmlApplicationContext(new String[]
{"demo/spring/client/client-beans.xml"});
HelloWorld client = (HelloWorld)context.getBean("client");
// NOTE: If I use this call, I get the error for
"javax.xml.ws.WebServiceException: Could not find operation info for web
method "
//String response = client.sayHi("Joe");
//NOTE: If I use this call, I get the error for "Caused by:
java.lang.IllegalArgumentException: object is not an instance of declaring
class "
ClientProxyFactoryBean cf = new ClientProxyFactoryBean();
cf.setAddress("http://localhost:8080/services/hello");
cf.setServiceClass(HelloWorld.class); // Optionally specify the
service interface
HelloWorld service = (HelloWorld) cf.create();
String test = "Hello World Test in Tomcat appserv";
String response = service.sayHi(test);
System.out.println("Response: " + response);
System.exit(0);
// END SNIPPET: client
}
}
2. Updates to client-beans.java
<bean id="client" class="com.comp.HelloWorldNew"
factory-bean="clientFactory" factory-method="create"/>
<bean id="clientFactory"
class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
<property name="serviceClass" value="com.comp.HelloWorldNew"/>
<property name="address" value="http://localhost:8080/services/hello"/>
</bean>
--
View this message in context: http://www.nabble.com/having-problem-with-cxf-2.0.2-using-client-webservice-tf4524946.html#a12939613
Sent from the cxf-user mailing list archive at Nabble.com.
Re: having problem with cxf 2.0.2 using client webservice
Posted by Willem Jiang <ni...@iona.com>.
Hi ,
It looks like the error was thrown form the server side when the CXF
runtime invoke the service implementor.
Do you do some extra work on you server side?
Can you show me the server side configuration files?
Willem.
mule1 wrote:
> Hello Dan,
>
> I tried several things to debug to see what is going on.
>
> First, I tried to test the sample spring helloworld client application as
> standalone client that comes with the cxf download and it works with no
> problem.
>
> So, I copied the HelloWorld.java and HelloWorldImpl.java in my application,
> did the application deploy in tomcat with the address called "/hello'
> exposed for HelloWorld. Then, I ran the testcase using following:
>
>
> ClientProxyFactoryBean cf = new ClientProxyFactoryBean();
> cf.setAddress("http://localhost:8083/services/hello");
> cf.setServiceClass(HelloWorldNew.class);
> HelloWorld service = (HelloWorld) cf.create();
>
> String test = "Hello World Test in Tomcat appserv";
> String response = service.sayHi(test);
>
> And I see following error on the server side:
> Caused by: java.lang.IllegalArgumentException: object is not an instance of
> declaring class
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:107)
> at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:77)
>
> which is resulting in a CxfFault with message
> "org.apache.cxf.interceptor.Fault: object is not an instance of declaring
> class"
>
> With debugging, I can see that when NativeMethodAccessorImpl.invoke0 is
> called, the String message I pass "Hello World Test in Tomcat appserv" is
> there. So, not really sure what makes it give IllegalArgumentException.
>
> I am attaching some of the lines I copied from debug below:
> -------------------
>
>
>
> Daemon Thread [http-8080-Processor25] (Suspended)
> IllegalArgumentException.<init>(String) line: 36
> NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
> available [native method]
> NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
> DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
> Method.invoke(Object, Object...) line: 585
> BeanInvoker(AbstractInvoker).performInvocation(Exchange, Object, Method,
> Object[]) line: 107
> BeanInvoker(AbstractInvoker).invoke(Exchange, Object, Method, List) line:
> 77
> BeanInvoker(AbstractInvoker).invoke(Exchange, Object) line: 63
> ServiceInvokerInterceptor$1.run() line: 56
> SynchronousExecutor.execute(Runnable) line: 37
> ServiceInvokerInterceptor.handleMessage(Message) line: 92
> PhaseInterceptorChain.doIntercept(Message) line: 207
> ChainInitiationObserver.onMessage(Message) line: 73
> ServletDestination.doMessage(MessageImpl) line: 79
> ServletController.invokeDestination(HttpServletRequest,
> HttpServletResponse, ServletDestination) line: 235
> ServletController.invoke(HttpServletRequest, HttpServletResponse) line: 140
> CXFServlet(HttpServlet).service(HttpServletRequest, HttpServletResponse)
> line: 710
> CXFServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 803
>
> ---- the values just before it fails with the IllegalArgumentException ----
> this NativeMethodAccessorImpl (id=7268)
> method Method (id=7242)
> numInvocations 3
> parent DelegatingMethodAccessorImpl (id=7264)
> arg0 "helloService"
> arg1 Object[1] (id=7245)
> [0] "Hello World Test in Tomcat appserv"
>
>
> -------The request message seen in the tcpmon is ---------
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:sayHi
> xmlns:ns1="http://comp.com/"><arg0 xmlns="http://comp.com/">Hello World Test
> in Tomcat appserv</arg0></ns1:sayHi></soap:Body></soap:Envelope>
>
> and the response is:
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>object
> is not an instance of declaring
> class</faultstring></soap:Fault></soap:Body></soap:Envelope>
>
Re: having problem with cxf 2.0.2 using client webservice
Posted by mule1 <ua...@yahoo.com>.
Hello Dan,
I tried several things to debug to see what is going on.
First, I tried to test the sample spring helloworld client application as
standalone client that comes with the cxf download and it works with no
problem.
So, I copied the HelloWorld.java and HelloWorldImpl.java in my application,
did the application deploy in tomcat with the address called "/hello'
exposed for HelloWorld. Then, I ran the testcase using following:
ClientProxyFactoryBean cf = new ClientProxyFactoryBean();
cf.setAddress("http://localhost:8083/services/hello");
cf.setServiceClass(HelloWorldNew.class);
HelloWorld service = (HelloWorld) cf.create();
String test = "Hello World Test in Tomcat appserv";
String response = service.sayHi(test);
And I see following error on the server side:
Caused by: java.lang.IllegalArgumentException: object is not an instance of
declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:107)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:77)
which is resulting in a CxfFault with message
"org.apache.cxf.interceptor.Fault: object is not an instance of declaring
class"
With debugging, I can see that when NativeMethodAccessorImpl.invoke0 is
called, the String message I pass "Hello World Test in Tomcat appserv" is
there. So, not really sure what makes it give IllegalArgumentException.
I am attaching some of the lines I copied from debug below:
-------------------
Daemon Thread [http-8080-Processor25] (Suspended)
IllegalArgumentException.<init>(String) line: 36
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 585
BeanInvoker(AbstractInvoker).performInvocation(Exchange, Object, Method,
Object[]) line: 107
BeanInvoker(AbstractInvoker).invoke(Exchange, Object, Method, List) line:
77
BeanInvoker(AbstractInvoker).invoke(Exchange, Object) line: 63
ServiceInvokerInterceptor$1.run() line: 56
SynchronousExecutor.execute(Runnable) line: 37
ServiceInvokerInterceptor.handleMessage(Message) line: 92
PhaseInterceptorChain.doIntercept(Message) line: 207
ChainInitiationObserver.onMessage(Message) line: 73
ServletDestination.doMessage(MessageImpl) line: 79
ServletController.invokeDestination(HttpServletRequest,
HttpServletResponse, ServletDestination) line: 235
ServletController.invoke(HttpServletRequest, HttpServletResponse) line: 140
CXFServlet(HttpServlet).service(HttpServletRequest, HttpServletResponse)
line: 710
CXFServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 803
---- the values just before it fails with the IllegalArgumentException ----
this NativeMethodAccessorImpl (id=7268)
method Method (id=7242)
numInvocations 3
parent DelegatingMethodAccessorImpl (id=7264)
arg0 "helloService"
arg1 Object[1] (id=7245)
[0] "Hello World Test in Tomcat appserv"
-------The request message seen in the tcpmon is ---------
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:sayHi
xmlns:ns1="http://comp.com/"><arg0 xmlns="http://comp.com/">Hello World Test
in Tomcat appserv</arg0></ns1:sayHi></soap:Body></soap:Envelope>
and the response is:
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>object
is not an instance of declaring
class</faultstring></soap:Fault></soap:Body></soap:Envelope>
--
View this message in context: http://www.nabble.com/having-problem-with-cxf-2.0.2-using-client-webservice-tf4524946.html#a12929605
Sent from the cxf-user mailing list archive at Nabble.com.
Re: having problem with cxf 2.0.2 using client webservice
Posted by Daniel Kulp <dk...@apache.org>.
Any chance you can wireshark/tcpdump the interaction so we can see what
it on the wire? From the error, it looks like the return message is
messed up somehow.
You could try adding to the SEI interface:
@Features(features = "org.apache.cxf.feature.LoggingFeature")
to turn on the logging. If you could do that on the server as well to
see what it is sending, that would be great.
Dan
On Wednesday 26 September 2007, mule1 wrote:
> Hello Aurelije,
>
> Were you having this problem before? And after adding some jars the
> problem went away? Or you tried with all jars first with no problems?
>
> I verified again that I do have all the necessary exact jars from the
> cxf 2.0.2 lib directory and I still have the same problem. So, not
> sure what I am missing.
>
> Aurelije wrote:
> > Hi,
> >
> > I have included all jars from cxf 2.0.2 lib directory when running
> > client and I did not have any problems after that.
> >
> > Regards,
> > Aurelije
> >
> > On 9/26/07, mule1 <ua...@yahoo.com> wrote:
> >> Hello,
> >>
> >> I am learning to use cxf (migrated from xfire) and in previous cxf
> >> 2.0 release, I had no problem running the following client creating
> >> by using some of the sample code for cxf with spring.
> >> JaxWsProxyFactoryBean jf = new JaxWsProxyFactoryBean();
> >>
> >> jf.setAddress("http://localhost:8080/comp/cxf-services/serviceurl")
> >>; jf.setServiceClass(MyCxfWebService.class);
> >> MyCxfWebService service1 = (MyCxfWebService) jf.create();
> >> service1.showData("This is a test");
> >>
> >> I have the application server deployed with the server service
> >> configured for http://localhost:8080/comp/cxf-services/serviceurl
> >>
> >>
> >> Now with cxf 2.0.1, it was giving me error for missing jar for
> >> org.apache.geronimo.mail.util. So, I upgraded to cxf 2.0.2 - and I
> >> keep getting the following error. I am really not sure where the
> >> issue is.
> >>
> >> org.apache.cxf.binding.soap.SoapFault: Error reading
> >> XMLStreamReader. at
> >>
> >> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.hand
> >>leMessage (ReadHeadersInterceptor.java:187)
> >> at
> >>
> >> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.hand
> >>leMessage (ReadHeadersInterceptor.java:1)
> >> at
> >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> >> PhaseInterceptorChain.java:207)
> >> at
> >> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java
> >>
> >> :395)
> >>
> >> at
> >>
> >> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handl
> >>eResponse (HTTPConduit.java:1943)
> >> at
> >> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close
> >>( HTTPConduit.java:1790)
> >> at org.apache.cxf.transport.AbstractConduit.close(
> >> AbstractConduit.java:66)
> >> at
> >> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java
> >>
> >> :576)
> >>
> >> at
> >>
> >> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEn
> >>dingInterceptor.handleMessage (MessageSenderInterceptor.java:62)
> >> at
> >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> >> PhaseInterceptorChain.java:207)
> >> at
> >> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254) at
> >> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205) at
> >> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
> >>
> >> :73)
> >>
> >> at
> >> org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68) at
> >> $Proxy44.findData(Unknown Source)
> >> at
> >> com.comp.TestCxfWebService.test1(TestCxfWebService.java:74) at
> >> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp
> >>l.java
> >>
> >> :39)
> >>
> >> at
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> DelegatingMethodAccessorImpl.java:25)
> >> at java.lang.reflect.Method.invoke(Method.java:597)
> >> at junit.framework.TestCase.runTest(TestCase.java:154)
> >> at junit.framework.TestCase.runBare(TestCase.java:127)
> >> at
> >> org.springframework.test.ConditionalTestCase.runBare(
> >> ConditionalTestCase.java:69)
> >> at junit.framework.TestResult$1.protect(TestResult.java:106)
> >> at
> >> junit.framework.TestResult.runProtected(TestResult.java:124) at
> >> junit.framework.TestResult.run(TestResult.java:109) at
> >> junit.framework.TestCase.run(TestCase.java:118)
> >> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >> at junit.framework.TestSuite.run(TestSuite.java:203)
> >> at
> >> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.ru
> >>n( JUnit3TestReference.java:130)
> >> at
> >> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecuti
> >>on.java
> >>
> >> :38)
> >>
> >> at
> >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
> >> RemoteTestRunner.java:460)
> >> at
> >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
> >> RemoteTestRunner.java:673)
> >> at
> >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
> >> RemoteTestRunner.java:386)
> >> at
> >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
> >> RemoteTestRunner.java:196)
> >> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in
> >> prolog at [row,col {unknown-source}]: [1,0]
> >> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(
> >> StreamScanner.java:661)
> >> at com.ctc.wstx.sr.BasicStreamReader.handleEOF(
> >> BasicStreamReader.java:2134)
> >> at
> >> com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.
> >>java
> >>
> >> :2040)
> >>
> >> at
> >> com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java
> >>
> >> :1069)
> >>
> >> at
> >> com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java
> >>
> >> :1095)
> >>
> >> at
> >>
> >> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.hand
> >>leMessage (ReadHeadersInterceptor.java:85)
> >> ... 34 more
> >>
> >> Please help.
> >> --
> >> View this message in context:
> >> http://www.nabble.com/having-problem-with-cxf-2.0.2-using-client-we
> >>bservice-tf4524946.html#a12910018 Sent from the cxf-user mailing
> >> list archive at Nabble.com.
--
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727 C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog
Re: having problem with cxf 2.0.2 using client webservice
Posted by aurelije zovko <au...@gmail.com>.
I had errors running my cxf client from eclipse. This was my first CXF
client using Spring and Tomcat I wrote. I have added all jars in class path
(run configuration in eclipse) and errors are gone (my Maven is still not
working, and I did not have all dependencies resolved, so I needed manually
to add jars).
-Aurelije
On 9/26/07, mule1 <ua...@yahoo.com> wrote:
>
> Hello Aurelije,
>
> Were you having this problem before? And after adding some jars the
> problem
> went away? Or you tried with all jars first with no problems?
>
> I verified again that I do have all the necessary exact jars from the cxf
> 2.0.2 lib directory and I still have the same problem. So, not sure what I
> am missing.
>
>
> Aurelije wrote:
> >
> > Hi,
> >
> > I have included all jars from cxf 2.0.2 lib directory when running
> client
> > and I did not have any problems after that.
> >
> > Regards,
> > Aurelije
> >
> >
> > On 9/26/07, mule1 <ua...@yahoo.com> wrote:
> >>
> >>
> >> Hello,
> >>
> >> I am learning to use cxf (migrated from xfire) and in previous cxf 2.0
> >> release, I had no problem running the following client creating by
> using
> >> some of the sample code for cxf with spring.
> >> JaxWsProxyFactoryBean jf = new JaxWsProxyFactoryBean();
> >> jf.setAddress("http://localhost:8080/comp/cxf-services/serviceurl
> ");
> >> jf.setServiceClass(MyCxfWebService.class);
> >> MyCxfWebService service1 = (MyCxfWebService) jf.create();
> >> service1.showData("This is a test");
> >>
> >> I have the application server deployed with the server service
> configured
> >> for http://localhost:8080/comp/cxf-services/serviceurl
> >>
> >>
> >> Now with cxf 2.0.1, it was giving me error for missing jar for
> >> org.apache.geronimo.mail.util. So, I upgraded to cxf 2.0.2 - and I keep
> >> getting the following error. I am really not sure where the issue is.
> >>
> >> org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
> >> at
> >>
> >>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
> >> (ReadHeadersInterceptor.java:187)
> >> at
> >>
> >>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
> >> (ReadHeadersInterceptor.java:1)
> >> at
> >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> >> PhaseInterceptorChain.java:207)
> >> at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java
> >> :395)
> >> at
> >>
> >>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse
> >> (HTTPConduit.java:1943)
> >> at
> >> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(
> >> HTTPConduit.java:1790)
> >> at org.apache.cxf.transport.AbstractConduit.close(
> >> AbstractConduit.java:66)
> >> at
> >> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java
> >> :576)
> >> at
> >>
> >>
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage
> >> (MessageSenderInterceptor.java:62)
> >> at
> >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> >> PhaseInterceptorChain.java:207)
> >> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java
> :254)
> >> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java
> :205)
> >> at org.apache.cxf.frontend.ClientProxy.invokeSync(
> ClientProxy.java
> >> :73)
> >> at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java
> :68)
> >> at $Proxy44.findData(Unknown Source)
> >> at com.comp.TestCxfWebService.test1(TestCxfWebService.java:74)
> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> at
> >> sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java
> >> :39)
> >> at
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> DelegatingMethodAccessorImpl.java:25)
> >> at java.lang.reflect.Method.invoke(Method.java:597)
> >> at junit.framework.TestCase.runTest(TestCase.java:154)
> >> at junit.framework.TestCase.runBare(TestCase.java:127)
> >> at
> >> org.springframework.test.ConditionalTestCase.runBare(
> >> ConditionalTestCase.java:69)
> >> at junit.framework.TestResult$1.protect(TestResult.java:106)
> >> at junit.framework.TestResult.runProtected(TestResult.java:124)
> >> at junit.framework.TestResult.run(TestResult.java:109)
> >> at junit.framework.TestCase.run(TestCase.java:118)
> >> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >> at junit.framework.TestSuite.run(TestSuite.java:203)
> >> at
> >> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(
> >> JUnit3TestReference.java:130)
> >> at
> >> org.eclipse.jdt.internal.junit.runner.TestExecution.run(
> TestExecution.java
> >> :38)
> >> at
> >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
> >> RemoteTestRunner.java:460)
> >> at
> >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
> >> RemoteTestRunner.java:673)
> >> at
> >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
> >> RemoteTestRunner.java:386)
> >> at
> >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
> >> RemoteTestRunner.java:196)
> >> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> >> at [row,col {unknown-source}]: [1,0]
> >> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(
> >> StreamScanner.java:661)
> >> at com.ctc.wstx.sr.BasicStreamReader.handleEOF(
> >> BasicStreamReader.java:2134)
> >> at
> >> com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java
> >> :2040)
> >> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java
> >> :1069)
> >> at
> >> com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java
> >> :1095)
> >> at
> >>
> >>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
> >> (ReadHeadersInterceptor.java:85)
> >> ... 34 more
> >>
> >> Please help.
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/having-problem-with-cxf-2.0.2-using-client-webservice-tf4524946.html#a12910018
> >> Sent from the cxf-user mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/having-problem-with-cxf-2.0.2-using-client-webservice-tf4524946.html#a12913104
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>
Re: having problem with cxf 2.0.2 using client webservice
Posted by mule1 <ua...@yahoo.com>.
Hello,
actually in my first email, I was trying to create client two ways and both
ways are resulting in error.
If I use this:
ClientProxyFactoryBean f = new ClientProxyFactoryBean();
f.setAddress("http://localhost:8080/serviceurl");
f.setServiceClass(MyCxfWebService.class);
MyCxfWebService service1 = (MyCxfWebService) f.create();
service1.showData("This is a test");
I get folllowing error:
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:187)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:1)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:395)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1943)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1790)
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:576)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
at $Proxy44.showData(Unknown Source)
at com.comp.TestCxfWebService.test1(TestCxfWebService.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
at
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
at
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at
com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:85)
... 34 more
And If I use this for client:
JaxWsProxyFactoryBean jf = new JaxWsProxyFactoryBean();
jf.setAddress("http://localhost:8080/comp/cxf-services/serviceurl");
jf.setServiceClass(MyCxfWebService.class);
MyCxfWebService service1 = (MyCxfWebService) jf.create();
service1.showData("This is a test");
I get this error:
javax.xml.ws.WebServiceException: Could not find operation info for web
method showData.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:102)
at $Proxy44.showData(Unknown Source)
at com.comp.TestCxfWebService.test2(TestCxfWebService.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
If in the web browser I do
http://localhost:8080/comp/cxf-services/serviceurl?wsdl, it does show me the
wsdl file correctly. So, I am not sure what I missing.
--
View this message in context: http://www.nabble.com/having-problem-with-cxf-2.0.2-using-client-webservice-tf4524946.html#a12913393
Sent from the cxf-user mailing list archive at Nabble.com.
Re: having problem with cxf 2.0.2 using client webservice
Posted by mule1 <ua...@yahoo.com>.
Hello Aurelije,
Were you having this problem before? And after adding some jars the problem
went away? Or you tried with all jars first with no problems?
I verified again that I do have all the necessary exact jars from the cxf
2.0.2 lib directory and I still have the same problem. So, not sure what I
am missing.
Aurelije wrote:
>
> Hi,
>
> I have included all jars from cxf 2.0.2 lib directory when running client
> and I did not have any problems after that.
>
> Regards,
> Aurelije
>
>
> On 9/26/07, mule1 <ua...@yahoo.com> wrote:
>>
>>
>> Hello,
>>
>> I am learning to use cxf (migrated from xfire) and in previous cxf 2.0
>> release, I had no problem running the following client creating by using
>> some of the sample code for cxf with spring.
>> JaxWsProxyFactoryBean jf = new JaxWsProxyFactoryBean();
>> jf.setAddress("http://localhost:8080/comp/cxf-services/serviceurl");
>> jf.setServiceClass(MyCxfWebService.class);
>> MyCxfWebService service1 = (MyCxfWebService) jf.create();
>> service1.showData("This is a test");
>>
>> I have the application server deployed with the server service configured
>> for http://localhost:8080/comp/cxf-services/serviceurl
>>
>>
>> Now with cxf 2.0.1, it was giving me error for missing jar for
>> org.apache.geronimo.mail.util. So, I upgraded to cxf 2.0.2 - and I keep
>> getting the following error. I am really not sure where the issue is.
>>
>> org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
>> at
>>
>> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
>> (ReadHeadersInterceptor.java:187)
>> at
>>
>> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
>> (ReadHeadersInterceptor.java:1)
>> at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
>> PhaseInterceptorChain.java:207)
>> at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java
>> :395)
>> at
>>
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse
>> (HTTPConduit.java:1943)
>> at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(
>> HTTPConduit.java:1790)
>> at org.apache.cxf.transport.AbstractConduit.close(
>> AbstractConduit.java:66)
>> at
>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java
>> :576)
>> at
>>
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage
>> (MessageSenderInterceptor.java:62)
>> at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
>> PhaseInterceptorChain.java:207)
>> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
>> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
>> at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
>> :73)
>> at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
>> at $Proxy44.findData(Unknown Source)
>> at com.comp.TestCxfWebService.test1(TestCxfWebService.java:74)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
>> :39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> at junit.framework.TestCase.runTest(TestCase.java:154)
>> at junit.framework.TestCase.runBare(TestCase.java:127)
>> at
>> org.springframework.test.ConditionalTestCase.runBare(
>> ConditionalTestCase.java:69)
>> at junit.framework.TestResult$1.protect(TestResult.java:106)
>> at junit.framework.TestResult.runProtected(TestResult.java:124)
>> at junit.framework.TestResult.run(TestResult.java:109)
>> at junit.framework.TestCase.run(TestCase.java:118)
>> at junit.framework.TestSuite.runTest(TestSuite.java:208)
>> at junit.framework.TestSuite.run(TestSuite.java:203)
>> at
>> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(
>> JUnit3TestReference.java:130)
>> at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java
>> :38)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
>> RemoteTestRunner.java:460)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
>> RemoteTestRunner.java:673)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
>> RemoteTestRunner.java:386)
>> at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
>> RemoteTestRunner.java:196)
>> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>> at [row,col {unknown-source}]: [1,0]
>> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(
>> StreamScanner.java:661)
>> at com.ctc.wstx.sr.BasicStreamReader.handleEOF(
>> BasicStreamReader.java:2134)
>> at
>> com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java
>> :2040)
>> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java
>> :1069)
>> at
>> com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java
>> :1095)
>> at
>>
>> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
>> (ReadHeadersInterceptor.java:85)
>> ... 34 more
>>
>> Please help.
>> --
>> View this message in context:
>> http://www.nabble.com/having-problem-with-cxf-2.0.2-using-client-webservice-tf4524946.html#a12910018
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/having-problem-with-cxf-2.0.2-using-client-webservice-tf4524946.html#a12913104
Sent from the cxf-user mailing list archive at Nabble.com.
Re: having problem with cxf 2.0.2 using client webservice
Posted by aurelije zovko <au...@gmail.com>.
Hi,
I have included all jars from cxf 2.0.2 lib directory when running client
and I did not have any problems after that.
Regards,
Aurelije
On 9/26/07, mule1 <ua...@yahoo.com> wrote:
>
>
> Hello,
>
> I am learning to use cxf (migrated from xfire) and in previous cxf 2.0
> release, I had no problem running the following client creating by using
> some of the sample code for cxf with spring.
> JaxWsProxyFactoryBean jf = new JaxWsProxyFactoryBean();
> jf.setAddress("http://localhost:8080/comp/cxf-services/serviceurl");
> jf.setServiceClass(MyCxfWebService.class);
> MyCxfWebService service1 = (MyCxfWebService) jf.create();
> service1.showData("This is a test");
>
> I have the application server deployed with the server service configured
> for http://localhost:8080/comp/cxf-services/serviceurl
>
>
> Now with cxf 2.0.1, it was giving me error for missing jar for
> org.apache.geronimo.mail.util. So, I upgraded to cxf 2.0.2 - and I keep
> getting the following error. I am really not sure where the issue is.
>
> org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
> at
>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
> (ReadHeadersInterceptor.java:187)
> at
>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
> (ReadHeadersInterceptor.java:1)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:207)
> at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java
> :395)
> at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse
> (HTTPConduit.java:1943)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(
> HTTPConduit.java:1790)
> at org.apache.cxf.transport.AbstractConduit.close(
> AbstractConduit.java:66)
> at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java
> :576)
> at
>
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage
> (MessageSenderInterceptor.java:62)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> PhaseInterceptorChain.java:207)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
> at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java
> :73)
> at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
> at $Proxy44.findData(Unknown Source)
> at com.comp.TestCxfWebService.test1(TestCxfWebService.java:74)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
> :39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at
> org.springframework.test.ConditionalTestCase.runBare(
> ConditionalTestCase.java:69)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at
> org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(
> JUnit3TestReference.java:130)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java
> :38)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
> RemoteTestRunner.java:460)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
> RemoteTestRunner.java:673)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(
> RemoteTestRunner.java:386)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
> RemoteTestRunner.java:196)
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(
> StreamScanner.java:661)
> at com.ctc.wstx.sr.BasicStreamReader.handleEOF(
> BasicStreamReader.java:2134)
> at
> com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java
> :2040)
> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java
> :1069)
> at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java
> :1095)
> at
>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage
> (ReadHeadersInterceptor.java:85)
> ... 34 more
>
> Please help.
> --
> View this message in context:
> http://www.nabble.com/having-problem-with-cxf-2.0.2-using-client-webservice-tf4524946.html#a12910018
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>