You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Ulf Licht (JIRA)" <ax...@ws.apache.org> on 2005/11/16 08:39:30 UTC
[jira] Updated: (AXIS-1712) Adding empty elements to soap message: make a configurable option
[ http://issues.apache.org/jira/browse/AXIS-1712?page=all ]
Ulf Licht updated AXIS-1712:
----------------------------
Attachment: getSalesOrderList.wsdl
getSalesOrderList.SOAPRequest.xml
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: http://issues.apache.org/jira/browse/AXIS-1712
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira