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 "Dominik Kacprzak (JIRA)" <ax...@ws.apache.org> on 2004/11/18 07:42:43 UTC
[jira] Updated: (AXIS-530) elements without minOccurs="0" produce isnill="true" on the wire
[ http://nagoya.apache.org/jira/browse/AXIS-530?page=history ]
Dominik Kacprzak updated AXIS-530:
----------------------------------
Attachment: patch.tar.gz
The attached patch provides a fix for various bugs related to Axis treatment of element's nillable attribute. Although the default value of nillable attribute is "false". Axis assumes that a nillable attribute is always true and it does not keep track of its real value. It leads to scenarios in which Axis allows a non-nillable element to be null. For Axis there is no difference between the following two definitions:
<element name="areaCode" type="string" minOccurs="0" maxOccurs="1"/>
and
<element name="areaCode" type="string" minOccurs="0" maxOccurs="1" nillable="true"/>
The proposed fix adds an additional field to org.apache.axis.description.ElementDesc. The nillable property defaults to false and is populated based on web services deployment definition or element's type. As a result, Axis enforces stricter rules when generating web services. An exception is thrown when a null value is passed as a value of a non-nillable, required element.
The attached tar ball contains the modified files and a README file with cvs diffs and explanation for the changes. This patch fixes the following JIRA issues:
- AXIS-530
- AXIS-1321
- AXIS-1332
- AXIS-1357
- AXIS-1670
Please apply this patch to CVS repository. Feel free to ping me if there are any questions.
thanks,
- Dominik
> elements without minOccurs="0" produce isnill="true" on the wire
> ----------------------------------------------------------------
>
> Key: AXIS-530
> URL: http://nagoya.apache.org/jira/browse/AXIS-530
> Project: Axis
> Type: Bug
> Components: Serialization/Deserialization
> Versions: 1.0
> Environment: Operating System: Other
> Platform: Other
> Reporter: Andre Kramer
> Assignee: Glen Daniels
> Attachments: patch.tar.gz
>
> Elements that are marked optional in wsdl schema. e.g. profile field in:
> <complexType name="User">
> <sequence>
> <element name="profile" type="someComplexType" minOccurs="0"/>
> </sequence>
> </complexType>
> <element name="User" type="types:User"/>
> Produces (inside SOAP body element) on the wire:
> <User>
> <profile xsi:nil="true"/>
> </User>
> Since the profile schema element is not marked as nillable="true" (only
> minOccurs="0") it would (at least) save bandwidth to just drop it altogether:
> <User>
> </User>
> [Both formats already work for deserialization.]
> thanks,
> Andre
--
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