Skip to main content

namespace handling regression ?

6 replies [Last post]
jfdenise
Offline
Joined: 2004-12-20

I switched to JAXWS_SI_20051123.jar and ran into a problem.

It was working with the previous builds.

The server generate a SOAP Message that the client can't unmarshall.
Both server and client are using JAXWS2.0.

The problem seems related to namespaces (In this case ns5 beeing set to "").

Your help would be very appreciated.

Message that used to be unmarshalled successfully
=================================================

<?xml version="1.0" ?>

Information on the management interface of the MBean

Public constructor of the MBean

The same message using the latest RI. Message that is not unmarshalled
======================================================================

<?xml version="1.0" ?>

Information on the management interface of the MBean

Public constructor of the MBean

Client side exception
=====================

javax.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,657]
Message: http://www.w3.org/TR/1999/REC-xml-names-19990114#EmptyPrefixedAttName?prefix="xmlns",localpart="ns5",rawname="xmlns:ns5"]
at com.sun.xml.ws.encoding.jaxb.JAXBTypeSerializer.deserialize(JAXBTypeSerializer.java:123)
at com.sun.xml.ws.encoding.jaxb.JAXBBeanInfo.fromStAX(JAXBBeanInfo.java:52)
at com.sun.xml.ws.encoding.soap.client.SOAPXMLDecoder.decodeBody(SOAPXMLDecoder.java:111)
at com.sun.xml.ws.encoding.soap.SOAPDecoder.decodeEnvelope(SOAPDecoder.java:249)
at com.sun.xml.ws.encoding.soap.client.SOAPXMLDecoder.toInternalMessage(SOAPXMLDecoder.java:188)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:529)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:274)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.send(SOAPMessageDispatcher.java:153)
at com.sun.xml.ws.client.dispatch.impl.DispatchDelegate.send(DispatchDelegate.java:71)
at com.sun.xml.ws.client.dispatch.DispatchBase.sendAndReceive(DispatchBase.java:313)
at com.sun.xml.ws.client.dispatch.DispatchBase.invoke(DispatchBase.java:137)
at com.sun.jmx.remote.ws.client.JMXWSManagementProcessorStub.getMBeanInfo(JMXWSManagementProcessorStub.java:263)
at com.sun.jmx.remote.ws.client.JMXWSConnector$RemoteMBeanServerConnection.getMBeanInfo(JMXWSConnector.java:335)
at jsr160client.Main.main(Main.java:79)
Caused by: javax.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,657]
Message: http://www.w3.org/TR/1999/REC-xml-names-19990114#EmptyPrefixedAttName?prefix="xmlns",localpart="ns5",rawname="xmlns:ns5"]
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:396)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:334)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:304)
at com.sun.xml.ws.encoding.jaxb.JAXBTypeSerializer.deserialize(JAXBTypeSerializer.java:111)
... 13 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,657]
Message: http://www.w3.org/TR/1999/REC-xml-names-19990114#EmptyPrefixedAttName?prefix="xmlns",localpart="ns5",rawname="xmlns:ns5"
at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:548)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:139)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:332)
... 15 more
Nov 24, 2005 3:14:30 PM com.sun.jmx.remote.ws.client.JMXWSManagementProcessorStub getMBeanInfo
FINER: getMBeanInfo Failed javax.xml.ws.WebServiceException: java.lang.NullPointerException
Exception in thread "main" javax.xml.ws.WebServiceException: java.lang.NullPointerException
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:282)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.send(SOAPMessageDispatcher.java:153)
at com.sun.xml.ws.client.dispatch.impl.DispatchDelegate.send(DispatchDelegate.java:71)
at com.sun.xml.ws.client.dispatch.DispatchBase.sendAndReceive(DispatchBase.java:313)
at com.sun.xml.ws.client.dispatch.DispatchBase.invoke(DispatchBase.java:137)
at com.sun.jmx.remote.ws.client.JMXWSManagementProcessorStub.getMBeanInfo(JMXWSManagementProcessorStub.java:263)
at com.sun.jmx.remote.ws.client.JMXWSConnector$RemoteMBeanServerConnection.getMBeanInfo(JMXWSConnector.java:335)
at jsr160client.Main.main(Main.java:79)
Caused by: java.lang.NullPointerException
at com.sun.xml.ws.encoding.soap.client.SOAPXMLDecoder.toMessageInfo(SOAPXMLDecoder.java:137)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:533)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:274)
... 7 more
Java Result: 1

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jfdenise
Offline
Joined: 2004-12-20

The message is on the client side. Nothing is displayed on the server. On the server side, marshalling worked well.

I have an handler that logs the requests/replies.
On the Client side I am using Dispatch

, on the server side I am using Provider
kohlert
Offline
Joined: 2003-06-16

Since you are using Provider and Dispatch, we will really need a test case to recreate the problem. Can you create an issue in the JAX-WS project on java.net and include a test program the recreates the problem?

Thank you

jfdenise
Offline
Joined: 2004-12-20

I was able to run my case with JAXWS_SI_20051207.jar
and it doesn't occur anymore.

kwalsh
Offline
Joined: 2003-06-10

Thanks for the update-
Kathy

kohlert
Offline
Joined: 2003-06-16

Is this message coming from the server? Are there handlers involved, are you using Dispatch or Provider?

kohsuke
Offline
Joined: 2003-06-09

It would be great if you can create a test case that reproduces the problem.

I suspect a bug in the JAXB marshaller, but it's difficult to examine unless we can reproduce the problem.