axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ulf Licht (JIRA)" <>
Subject [jira] Updated: (AXIS-1712) Adding empty elements to soap message: make a configurable option
Date Wed, 16 Nov 2005 07:39:30 GMT
     [ ]

Ulf Licht updated AXIS-1712:

    Attachment: getSalesOrderList.wsdl

This SOAP request was generated by AXIS 1.3 using the also attached WSDL. All optional elements
of the "__getSalesOrderListInput" complex type, for which null was provided in the generated
Java method, AXIS generates the elements with xsi:nil="true".

Since the three possible XML states for an element (value, nil or omitted) can not be matched
with the two possible states of a Java method parameter (value or nil) it should be a configurable
option which XML state to choose for a Java method parameter with null value.

> Adding empty elements to soap message: make a configurable option
> -----------------------------------------------------------------
>          Key: AXIS-1712
>          URL:
>      Project: Apache Axis
>         Type: New Feature
>   Components: Basic Architecture
>     Versions: 1.2RC2
>     Reporter: Andrey Karachoun
>  Attachments: getSalesOrderList.SOAPRequest.xml, getSalesOrderList.wsdl
> Currently Axis serialize empty elements to SOAP message with attribute xsi:nil="true",
for example:
> ...
> <arg1 xsi:type="xsd:int" xsi:nil="true"/>
> ...
> But sometimes it is necessary not to include such elements in the message because server
may fail to parse them, resulting in NumberFormatException throw.
> Both options are already implemented in Axis, but Axis is hardcoded to use first option:.
Here is this hardcode:
> org.apache.axis.encoding.SerializationContext
> 134:    /**
> 135:     * Send an element with an xsi:nil="true" attribute for null
> 136:     * variables (if Boolean.TRUE), or nothing (if Boolean.FALSE).
> 137:     */
> 138:    private Boolean sendNull = Boolean.TRUE;
> org.apache.axis.message.RPCParam
> 177:        context.serialize(getQName(),  // element qname
> 178:                          null,   // no extra attrs
> 179:                          value,  // value
> 180:                          xmlType, // java/xml type
> 181:                          Boolean.TRUE, wantXSIType);
> I suggest making this option configurable. This will give greater flexibility to developers
because the only existing workaround is to patch Axis library.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message