cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Oledzki (JIRA)" <>
Subject [jira] Created: (CXF-908) "XMLStreamException: No open start element..." using JaxB
Date Mon, 13 Aug 2007 14:33:32 GMT
"XMLStreamException: No open start element..." using JaxB

                 Key: CXF-908
             Project: CXF
          Issue Type: Bug
         Environment: Application on Jboss-4.2.1.GA, JRockit R27.2.0 jre 1.5.0_10. 
            Reporter: Grzegorz Oledzki

When writing a service which implements only one method: 
public Set<Address> getAddresses(String par);

we get on the server-side an 
org.codehaus.xfire.fault.XFireFault: Couldn't write message.

caused by: No open start element, when trying to write end element

Client failes with the message:
org.codehaus.xfire.fault.XFireFault: Could not unmarshall type : unexpected element (uri:"",
local:"Envelope"). Expected elements are [ comes the list of expected elements]
at org.codehaus.xfire.jaxb2.JaxbType.readObject( 

After debugging the XFire under Eclipse I discovered that:

the problem is caused by too many writeEndElement() compared to writeStartElement(), 
the error has to been somewhere in the area constrained by these calls:
AegisBindingProvider:220 # writeParameter() creates an ElementWriter with constructor NOT
writing the start element,
CollectionType # writeObject() is called
ArrayType:279 # writeValue() is called
Since type is JaxbType this line is called: 
cwriter = writer;

Then after writing the object the writer is closed by:


which refers to:

ElementWriter:176 # close()

which writes the end-element (but there has been no start element written before, so it closes
its parent)

My guess is that the ElementWriter#close() implementation should be changed. So that the end
element is written only if the start element was written before.
Or... If not there, then maybe the ArrayType#writeValue()?

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message