Martin,
I don't think there is a Java2WSDL option that adds minOccurs="0" to an element
definition. However, you can edit the WSDL manually and add it yourself (sounds
like a good job for an Ant task or shell script.)
BTW, an element can have both nillable="true" and minOccurs="0". The semantics
of these attributes is different: nillable="true" allows an XML element to have
a value equivalent to a Java null reference:
<... xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<myelement xsi:nil="true"/>
This is different than a plain empty element:
<myelement/>
which is equivalent to a Java String object with length 0.
Mike
Martin Grotzke wrote:
Hello,
when creating the wsdl from java classes, is there's any way
to change the default behavior from generating nillable="true"
to minOccurs="0" (for interop with .net)?
thanx in advance,
martin