Hi All.
I have the following WSDL (just an extract):
<element name="op">
<complexType>
<sequence>
<element name="cert" type="xsd:string"/>
<element name="reason" type="xsd:int"/>
<element name="comment" type="xsd:string"/>
<element name="opDate" type="xsd:dateTime"/>
</sequence>
</complexType>
</element>
opDate is optional : the user must be able to pass 'null'.
I have no problems with axis1, while I can't pass null with AXIS2 because I
always get 'opDate cannot be null'.
Looking through the code, I found this inside the generated stub:
if (localOpDate==null)
{
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException("opDate cannot be
null!!");
}
else
{
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localOpDate));
}
Is there any way I can tell WSDL2JAVA that some parameter is optional?
If I have to change the wsdl, since it is autogenerated by AXIS2 server
side, is there a way I can tell AXIS to generate the parameter as optional
inside the WSDL?
Thanks a lot,
Massimiliano