cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ee7arh <>
Subject XMLStreamReaderException: unexpected XML tag
Date Thu, 09 Apr 2009 14:07:08 GMT


I am getting the following exception on the client side when trying to
connect to my CXF spawned web service: unexpected XML tag.
expected: {}Envelope but found:
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at
    [junit] 	at

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

My web service is declared in spring like so:

<jaxws:endpoint id="utilWebServices" 
            <soap:soapBinding mtomEnabled="true" version="1.1"/>

My wsdl file published when I start CXF is attached: 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="">
    [junit]     <S:Body>
    [junit]         <ns2:getTestString
    [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:

                                         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 RI's version is JAX-WS
RI 2.1.1 in JDK 6. 

... did not.

Any help appreciated, I am quite stuck!

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message