[ 
https://issues.apache.org/jira/browse/AXIS-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13544026#comment-13544026
 ] 

Martin Gainty commented on AXIS-2886:
-------------------------------------

namespace prefix must be registered to http://www.w3.org/2001/XMLSchema

                  java.lang.String namespacePrefix = 
registerPrefix(xmlWriter,"http://www.w3.org/2001/XMLSchema";);
                   if ((namespacePrefix != null) && 
(namespacePrefix.trim().length() > 0)){
                       
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type";,
                           namespacePrefix+":date",
                           xmlWriter);
                   } else {
                       
writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type";,
                           "date",
                           xmlWriter);
                   }

in this case namespace prefix xs is assigned to the url 
http://www.w3.org/2001/XMLSchema
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";

so this declaration should resolve correctly

 <xs:complexType name="date" >
    <xs:simpleContent>
      <xs:extension base="xs:date" >
        <xs:attributeGroup ref="tns:commonAttributes" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
                
> xs:date not serialized/deserialized correctly 
> ----------------------------------------------
>
>                 Key: AXIS-2886
>                 URL: https://issues.apache.org/jira/browse/AXIS-2886
>             Project: Axis
>          Issue Type: Bug
>          Components: Serialization/Deserialization
>    Affects Versions: 1.4
>            Reporter: Mike 
>
> I am using Axis 1.4 for a web-service client application. all the classes and 
> stubs have been generated through wsdl2java . 
> While consuming a web service , we are getting the below exception. 
> java.lang.NumberFormatException: Invalid date
> at 
> org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:180)
> Axis is throwing this excpeption specifically for xsd:date type , where as 
> xsd:dateTime type it is working . 
> I have gone through the previous links in Jira forum on the same issue 
> https://issues.apache.org/jira/browse/AXIS-1050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863365#action_12863365
> Can you please help on the issue . Do i have to use Axis2 , to avoid this 
> issue , or i can continue using Axis 1.4 with some bug fix . 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to