You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Andrej Rippich <an...@rippich.de> on 2005/03/24 19:53:30 UTC

xml serialization - nil attribute in elements which are not declared as nillable

Hi,
in my actual project i'm using axis (a great piece of software!) to 
implement document style webservices.
I'm using wsdl2java to generate the Java classes representing the xml schema 
instances.
In some cases the serianlizer generates an 'nil' attribute for elements 
which are not declared as nillable.
Because the partner system validates the messages sent by my service against 
a xml schema, my messages are refused.

For example i have a simpletype (xsd:string) which is occurence in the 
parent type is defined as 0 ... unbounded.
In Java the corresponding array is'nt initialized.
The serializer generates an <element xi:nil="true"/> tag, instead of 
nothing.

Is there somthing i could do to prevent the serializer doing this ?

regards
Andrej
 



RE: xml serialization - nil attribute in elements which are not declared as nillable

Posted by Eugene Shershnev <sh...@gmail.com>.
Check out this JIRA issue:
http://issues.apache.org/jira/browse/AXIS-530

Does not look like it's fixed yet. 

-----Original Message-----
From: Andrej Rippich [mailto:andrej@rippich.de] 
Sent: Thursday, March 24, 2005 1:54p
To: axis-user@ws.apache.org
Subject: xml serialization - nil attribute in elements which are not
declared as nillable

Hi,
in my actual project i'm using axis (a great piece of software!) to
implement document style webservices.
I'm using wsdl2java to generate the Java classes representing the xml schema
instances.
In some cases the serianlizer generates an 'nil' attribute for elements
which are not declared as nillable.
Because the partner system validates the messages sent by my service against
a xml schema, my messages are refused.

For example i have a simpletype (xsd:string) which is occurence in the
parent type is defined as 0 ... unbounded.
In Java the corresponding array is'nt initialized.
The serializer generates an <element xi:nil="true"/> tag, instead of
nothing.

Is there somthing i could do to prevent the serializer doing this ?

regards
Andrej