minOccurs="0" is ignored for dateTime values --------------------------------------------
Key: AXIS2-3596 URL: https://issues.apache.org/jira/browse/AXIS2-3596 Project: Axis 2.0 (Axis2) Issue Type: Bug Components: wsdl Affects Versions: 1.3 Environment: Windows Server 2003 Reporter: Raanan Zvi I tried to search for similar bug but couldn't find one. I have a java web service and I use Axis2 1.3 as the web service implementation. One of my methods gets a Java Date object and in the wsdl that is created by Axis2 this parameter gets minOccurs="0" which is good to me, because I want the user to be able not to supply this field. <xs:element name="schedule"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="id" type="xs:int" /> <xs:element minOccurs="0" name="startTime" nillable="true" type="xs:dateTime" /> <xs:element minOccurs="0" name="endTime" nillable="true" type="xs:dateTime" /> <xs:element minOccurs="0" name="startHour" type="xs:int" /> <xs:element minOccurs="0" name="endHour" type="xs:int" /> <xs:element maxOccurs="unbounded" minOccurs="0" name="days" nillable="true" type="xs:string" /> </xs:sequence> </xs:complexType> </xs:element> The problem is that if the client doesn't supply this field I get this error: <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Body> <soapenv:Fault> <soapenv:Code> <soapenv:Value>soapenv:Receiver</soapenv:Value> </soapenv:Code> <soapenv:Reason> <soapenv:Text xml:lang="en-US">date string can not be less than 19 charactors</soapenv:Text> </soapenv:Reason> <soapenv:Detail/> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope> When I supply the startDate it works fine, so not supplying the startDate parameter is clearly the case. P.S The exception text is misspelled "charactors" -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]