I am using *2.0.5-incubator* for my testing. I started looking into the spring examples as well, and notice that the ant task is starting up a new instance of Jetty in a different JVM...? Is that correct?
So basically, here is what I am trying to do when this error occurs. 1. startup embeded tomcat on port 8080 2. war up test application 3. deploy test application to the embeded tomcat 4. start up testNG with a test applicationContext pointing to the localhost:8080/cxf/EchoService 5. Get an EchoService object. 6. Print the details of that Object for debugging (which shows all the valid operations) 7. Invoke the EchoService 8. BANG! I get the mentioned error. On Fri, Apr 11, 2008 at 7:54 PM, Glen Mazza <[EMAIL PROTECTED]> wrote: > I don't know what version of CXF you're using but 2.0.5 has some changes > that *might* reduce the number of com.ctc.wstx.exc.WstxEOFExceptions you > will be getting, and hopefully provide you a more useful error message: > http://www.jroller.com/gmazza/date/20080327 > > HTH, > Glen > > Am Freitag, den 11.04.2008, 10:26 -0800 schrieb Mick Knutson: > > I have an echo web service working when deployed to tomcat 5.5 and > sending > > requests through soapUI. It seems to work great. > > > > But now I am trying to create a client via spring 2.5, and test this > through > > testNG. *I keep getting this error when I create this client:* > > > > * <!-- Web service dynamic proxy --> > > <bean id="echoClient" > > class="com.baselogic.service.EchoImpl" > > factory-bean="echoClientFactory" > > factory-method="create"/> > > > > <!-- Factory to create the dynamic proxy --> > > <bean id="echoClientFactory" > > class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean"> > > <property name="serviceClass" > > value="com.baselogic.service.EchoService"/> > > <property name="address" value=" > > http://localhost:8080//cxf/EchoService"/> > > <property name="serviceFactory" > ref="jaxwsAndAegisServiceFactory"/> > > </bean> > > > > * > > *And here is my testNG test:* > > * @Test(groups = {"functional"}) > > public void testEcho() throws Exception { > > log.debug("testGetUser"); > > > > try { > > Object echo1 = applicationContext.getBean("echoClient"); > > > > log.debug("======================================================"); > > log.debug(StringUtil.toString(echo1.getClass())); > > > > log.debug("======================================================"); > > EchoService echo = (EchoService) > > applicationContext.getBean("echoClient"); > > > > > > log.debug("======================================================"); > > log.debug(echo.echoString("this is a > > test........................")); //<-- This lines throws the error.... > > > > log.debug("======================================================"); > > AssertJUnit.assertNotNull(echo.echoString("this is a > > test........................")); > > //AssertJUnit.assertEquals("mknutson", user.getUsername()); > > } > > catch (Exception e) { > > e.printStackTrace(); > > throw e; > > } > > } > > * > > > > > > *Here is my error:* > > > > * <exception class="javax.xml.ws.soap.SOAPFaultException"> > > <message> > > <![CDATA[Error reading XMLStreamReader.]]> > > </message> > > <full-stacktrace> > > <![CDATA[javax.xml.ws.soap.SOAPFaultException: Error > reading > > XMLStreamReader. > > at > > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:211) > > at $Proxy39.echoString(Unknown Source) > > at > > com.baselogic.service.UserServiceTest.testEcho(UserServiceTest.java:79) > > 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.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580) > > at org.testng.internal.Invoker.invokeMethod(Invoker.java:478) > > at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:607) > > at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:874) > > at > > > org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) > > at > org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109) > > at org.testng.TestRunner.runWorkers(TestRunner.java:689) > > at org.testng.TestRunner.privateRun(TestRunner.java:566) > > at org.testng.TestRunner.run(TestRunner.java:466) > > at org.testng.SuiteRunner.runTest(SuiteRunner.java:301) > > at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:296) > > at org.testng.SuiteRunner.privateRun(SuiteRunner.java:276) > > at org.testng.SuiteRunner.run(SuiteRunner.java:191) > > at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:808) > > at org.testng.TestNG.runSuitesLocally(TestNG.java:776) > > at org.testng.TestNG.run(TestNG.java:701) > > at > > > org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74) > > at > > > org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92) > > at org.apache.maven.surefire.Surefire.run(Surefire.java:177) > > 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.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) > > at > > > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) > > Caused by: org.apache.cxf.binding.soap.SoapFault: Error reading > > XMLStreamReader. > > at > > > org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:191) > > at > > > org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:56) > > at > > > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220) > > at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:429) > > at > > > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1976) > > at > > > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1812) > > at > > org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) > > at > org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:582) > > at > > > org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) > > at > > > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220) > > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276) > > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222) > > at > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) > > at > > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:170) > > ... 31 more > > 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) > > ... 44 more > > ]]> > > </full-stacktrace> > > </exception> > > * > > > > > > -- Thanks, Mick Knutson http://www.baselogic.com http://www.blincmagazine.com http://www.linkedin.com/in/mickknutson http://www.djmick.com http://www.myspace.com/mickknutson http://www.myspace.com/BLiNCMagazine http://tahoe.baselogic.com ---
