I have now fixed a part of the problem myself by turning chunking off in the http conduit. But new problems arise.
My new clientContext.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:simple="http://cxf.apache.org/simple" xmlns:soap="http://cxf.apache.org/bindings/soap" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:ds="http://www.mycompany.com/services/dummy" xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" default-autowire="byType" xsi:schemaLocation="http://www.mycompany.com/services/dummy http://www.springframework.org/schema/oxm http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd "> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-http.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-http-binding.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> <http-conf:conduit name="*.http-conduit"> <http-conf:client AllowChunking="false" /> </http-conf:conduit> <simple:client id="dummyService" wsdlLocation="http://localhost:9999/services/dummy?wsdl" serviceName="ds:dummyService" endpointName="ds:dummyServicePort" transportId="http://schemas.xmlsoap.org/soap/http" address="http://localhost:9999/services/dummy" bindingId="http://apache.org/cxf/binding/http" serviceClass="com.mycompany.service.MyService"> <simple:dataBinding> <bean class="org.apache.cxf.aegis.databinding.AegisDatabinding" /> </simple:dataBinding> <simple:binding> <soap:soapBinding mtomEnabled="true" version="1.2" /> </simple:binding> </simple:client> </beans> Now I get this exception: WARNUNG: Interceptor for {http://www.mycompany.com/services/dummy}dummyService has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Invalid URL/Verb combination. Verb: POST Path: at org.apache.cxf.binding.http.interceptor.DispatchInterceptor.handleMessage(Di spatchInterceptor.java:74) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain .java:243) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationOb server.java:110) at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestinatio n.java:98) at org.apache.cxf.transport.servlet.ServletController.invokeDestination(Servlet Controller.java:423) at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController. java:178) at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServle t.java:142) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractH TTPServlet.java:179) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServ let.java:103) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPSer vlet.java:159) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:295) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnectio n.java:827) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379) at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:22 6) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:4 42) Sean -- MostlyMagic.com - Sean Patrick Floyd IT-Consultant und Senior Java Developer Mobile: +49 170 4746496 Mail: [email protected] Web: www.mostlymagic.com XING: https://www.xing.com/profile/SeanPatrick_Floyd GULP: http://www.gulp.de/Profil/mostlymagic.html -----Original Message----- From: Sean Patrick Floyd [mailto:[email protected]] Sent: Freitag, 18. Juni 2010 10:19 To: [email protected] Subject: RE: CXF problem: IllegalStateException (Already connected) Sorry once more, the usage instructions were a bit unclear, and jetty:run wouldn't work. So here are the revised usage instruction: OK, I'll try again, this time the project is here: http://mostlymagic.com/cxf-dummy-service.zip The directory structure is this: cxf-dummy - cxf-dummy-api - cxf-dummy-impl - cxf-dummy-server - cxf-dummy-client - pom.xml Api contains the service interface, impl the implementation Server has a dependency to impl, client only to api Instructions: 1) inside cxf-dummy execute mvn clean install 2) Launch the server project (cxf-dummy-server) using either a) mvn org.codehaus.mojo:exec-maven-plugin:1.1.1:java -Dexec.mainClass=com.mycompany.service.server.Start -Dexec.classpathScope=test b) from eclipse: in src/test/java there is a class named com.mycompany.service.server.Start that starts an embedded jetty and launches the server. run as -> java application 3) Run the client com.mycompany.service.client.MyServiceClient (in project cxf-dummy-client) and see the error in action. again either: a) mvn org.codehaus.mojo:exec-maven-plugin:1.1.1:java -Dexec.mainClass=com.mycompany.service.client.MyServiceClient b) or in eclipse, find this class in src/main/java and run as -> java application result: IllegalStateException(already connected) Sean
