Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.2.4
-
Fix Version/s: 1.2.5
-
Component/s: Aegis Module
-
Labels:None
-
Environment:jdk1.6.0 jax2b
-
Number of attachments :
Description
Line 217 in org.codehaus.xfire.aegisAegisBindingprovider.java seems quirky to me, it causes an Exception with null value complex type parameters.
Caused by: javax.xml.stream.XMLStreamException: Attribute not associated with any element
at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeAttribute(XMLStreamWriterImpl.java:600)
at org.codehaus.xfire.aegis.stax.AttributeWriter.writeValue(AttributeWriter.java:45)
... 36 more
The exeption is right, there is no open tag at this context.
A possible fix could be
213 MessageWriter mw = new ElementWriter(writer);
214
215 /* if (type.isNillable() && value == null)
216 {
217 mw.writeXsiNil();
218 return;
219 } */
220
221 context.setProperty(CURRENT_MESSAGE_PART, p);
commented block should be removed.
Null value parameters are working after that patch.
Fixed request parameter output as sample:
<ns5:ArrayOfSortOption_3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns5="http://types.xlocate.xserver.ptvag.com" xmlns:ns4="http://wrappertypes.service.jabba.ptvag.com" xmlns:ns3="http://exception.core.jabba.ptvag.com" xmlns:ns2="http://common.xserver.ptvag.com" xmlns="http://xlocate.xserver.ptvag.com" xsi:nil="true"></ns5:ArrayOfSortOption_3>
Thanks Jens. Scheduling for 1.2.5