axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Massimiliano Ziccardi <>
Subject AXIS2 and optional parameter
Date Fri, 01 Oct 2010 09:31:21 GMT
Hi All.

I have the following WSDL (just an extract):

<element name="op">
    <element name="cert" type="xsd:string"/>
    <element name="reason" type="xsd:int"/>
    <element name="comment" type="xsd:string"/>
    <element name="opDate" type="xsd:dateTime"/>

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

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,

View raw message