cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ee7arh <andrew.hu...@2e-systems.com>
Subject Re: XMLStreamReaderException: unexpected XML tag
Date Thu, 09 Apr 2009 18:40:59 GMT

Hi Dan,

thanks for the reply. You are correct :)

The strange thing is that the following actually worked somehow with basic
jaxWs!

((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
            "http://localhost:1199/berbe_util?wsdl");

So I just removed the "?wsdl" and it worked :)

thanks a lot
Andrew


dkulp wrote:
> 
> 
> My "gut feeling" is that the URL of the "post" that you are doing is going
> to 
> the ?wsdl URL and not the actual endpoint URL.  That would definitely
> result 
> in that message.   Basically, the wsdl is being returned and is trying to
> be 
> parsed as the soap message.
> 
> Dan
> 
> 
> 
> On Thu April 9 2009 10:07:08 am ee7arh wrote:
>> 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(HttpTranspor
>>tPipe.java:158) [junit] 	at
>> com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpT
>>ransportPipe.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:2
>>30) [junit] 	at
>> com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:2
>>10) [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
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/XMLStreamReaderException%3A-unexpected-XML-tag-tp22971679p22976964.html
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message