null values as request parameters
---------------------------------

                 Key: XFIRE-845
                 URL: http://jira.codehaus.org/browse/XFIRE-845
             Project: XFire
          Issue Type: Bug
          Components: Aegis Module
    Affects Versions: 1.2.4
         Environment: jdk1.6.0 jax2b
            Reporter: Jens Lukas
         Assigned To: Dan Diephouse


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>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to