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 Igor Mekterović <ig...@fer.hr> on 2003/09/16 11:20:43 UTC
Is there any way to omit a minOccurs="0" element in Axis 1.1 ?
Here's a snipplet of my code:
JAVA:
ElementDesc ed = new ElementDesc();
ed.setFieldName("dataSourceInfo");
ed.setXmlName(new QName("http://tempuri.org/type", "DataSourceInfo"));
ed.setMinOccurs(0); // is this supposed to do the trick?
typeDesc.addFieldDesc(ed);
...
but the DataSourceInfo element persistently keeps appearing in the SOAP:
SOAP:
...
<DataSourceInfo xsi:type="xsd:string" xsi:nil="true"/>
...
and I was expecting it to be omitted since: ed.setMinOccurs(0).
Did I get it wrong or it can't be done?
Thanks in advance,
Igor Mekterovic