Hi,
I am getting the following exception on the client side when trying to
connect to my CXF spawned web service:
com.sun.xml.ws.streaming.XMLStreamReaderException: unexpected XML tag.
expected: {http://schemas.xmlsoap.org/soap/envelope/}Envelope but found:
{http://schemas.xmlsoap.org/wsdl/}definitions
[junit] at
com.sun.xml.ws.streaming.XMLStreamReaderUtil.verifyTag(XMLStreamReaderUtil.java:189)
[junit] at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:172)
[junit] at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:149)
[junit] at
com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:121)
[junit] at
com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:280)
[junit] at
com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:158)
[junit] at
com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:74)
[junit] at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
[junit] at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
[junit] at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
[junit] at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
[junit] at com.sun.xml.ws.client.Stub.process(Stub.java:234)
[junit] at
com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:120)
[junit] at
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:230)
[junit] at
com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210)
[junit] at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
I have previously been using the out-of-box JaxWS from Java SDK 6 to publish
my webservice but recently changed over to CXF however cannot get it to
work.
My web service is declared in spring like so:
<jaxws:endpoint id="utilWebServices"
implementor="com.ee.berbe.buslogic.util.UtilWebService"
address="http://localhost:1199/berbe_util">
<jaxws:binding>
<soap:soapBinding mtomEnabled="true" version="1.1"/>
</jaxws:binding>
</jaxws:endpoint>
My wsdl file published when I start CXF is attached:
http://www.nabble.com/file/p22971679/myWsdl.wsdl myWsdl.wsdl
When I run a test client to try and use the web service it fails with above
error. Here is a debug of the SOAP envelope:
<?xml version="1.0" encoding="UTF-8"?>
[junit] <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
[junit] <S:Body>
[junit] <ns2:getTestString
xmlns:ns2="http://util.buslogic.berbe.ee.com/">
[junit] <arg0>abcdef</arg0>
[junit] </ns2:getTestString>
[junit] </S:Body>
[junit] </S:Envelope>
Any idea what the problem could be? In my old version I was setting the soap
binding of the service like this:
services.put("util",
Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING,
new UtilWebService()));
And i have attempted to re-create that with the above XML config but still
keep getting this error. I notice the wsdl file created by CXF contains the
namespace "wsdl:" although the original wsdl generated by:
Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS
RI 2.1.1 in JDK 6.
... did not.
Any help appreciated, I am quite stuck!
Thanks
Andrew
--
View this message in context:
http://www.nabble.com/XMLStreamReaderException%3A-unexpected-XML-tag-tp22971679p22971679.html
Sent from the cxf-user mailing list archive at Nabble.com.