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 "Andrey Karachoun (JIRA)" <ax...@ws.apache.org> on 2004/12/10 12:50:09 UTC

[jira] Created: (AXIS-1712) Adding empty elements to soap message: make a configurable option

Adding empty elements to soap message: make a configurable option
-----------------------------------------------------------------

         Key: AXIS-1712
         URL: http://nagoya.apache.org/jira/browse/AXIS-1712
     Project: Axis
        Type: New Feature
  Components: Basic Architecture  
    Versions: 1.2RC2    
    Reporter: Andrey Karachoun


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://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1712) Adding empty elements to soap message: make a configurable option

Posted by "Ulf Licht (JIRA)" <ax...@ws.apache.org>.
     [ 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


[jira] Commented: (AXIS-1712) Adding empty elements to soap message: make a configurable option

Posted by "Ulf Licht (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-1712?page=comments#action_12357673 ] 

Ulf Licht commented on AXIS-1712:
---------------------------------

Still not fixed in Axis 1.3. Isn't it possible to make it switchable instead of hardcoding it?

> 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

>
> 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


[jira] Reopened: (AXIS-1712) Adding empty elements to soap message: make a configurable option

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1712?page=all ]
     
Davanum Srinivas reopened AXIS-1712:
------------------------------------


Please upload your WSDL and soap messages.

thanks,
dims

> 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

>
> 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


[jira] Resolved: (AXIS-1712) Adding empty elements to soap message: make a configurable option

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1712?page=all ]
     
Davanum Srinivas resolved AXIS-1712:
------------------------------------

    Resolution: Fixed

I believe this has been fixed in Axis 1.2.1. If it isn't, add a comment and i'll reopen the bug.

thanks,
dims

> 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

>
> 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


[jira] Commented: (AXIS-1712) Adding empty elements to soap message: make a configurable option

Posted by "Ulf Licht (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-1712?page=comments#action_12357965 ] 

Ulf Licht commented on AXIS-1712:
---------------------------------

Can someone change the affected version to 1.3?

> 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