The string '2006-11-20T09:48:08+0530' is not a valid AllXsd value.

Discussion in 'ASP .Net Web Services' started by imonline, Nov 23, 2006.

  1. imonline

    imonline Guest

    Hi,
    I have created a web service with .net 2005 which receives a soap
    messages of complex type. Now in the message there is an attribute
    called Timestamp of datatype xs:datetime which has value like
    "2006-11-20T09:48:08+0530" this.

    I get the following error message when I receive the soap message.
    <?xml version="1.0" encoding="utf-8"?><soap:Envelope
    xmlns:soap="http://schemas.xmlsoap.org/soap/
    envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <soap:Fault>
    <faultcode>soap:Client</faultcode>
    <faultstring>
    System.Web.Services.Protocols.SoapException:Server was unable to read
    request. ---&gt;
    System.InvalidOperationException: There is an error in XML document
    (23, 48). ---&gt;
    System.FormatException: The string '2006-11-20T09:48:08+0530' is not a
    valid AllXsd value...
    at System.Xml.Schema.XsdDateTime..ctor(String text, XsdDateTimeFlags
    kinds)..
    at System.Xml.XmlConvert.ToDateTime(String s,
    XmlDateTimeSerializationMode dateTimeOption)..
    at System.Xml.Serialization.XmlCustomFormatter.ToDateTime(String
    value)..
    at
    System.Xml.Serialization.XmlSerializationReader.ToDateTime(Stringvalue)..

    at
    Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read561_OTA_HotelInvCountNotifRQ(Boolean
    is
    Nullable, Boolean checkType).. at
    Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializati
    onReader1.Read646_OTA_HotelInvCountNotif()..
    at
    Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer64.Deserialize(XmlSeriali
    zationReader reader).. at
    System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,
    String encod
    ingStyle, XmlDeserializationEvents events).. --- End of inner
    exception stack
    trace ---..
    at System.Xml.Seri
    alization.XmlSerializer.Deserialize(XmlReader xmlReader, String
    encodingStyle, XmlDeserializatio
    nEvents events).. at
    System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader,
    S
    tring encodingStyle).. at
    System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()..
    --- End of inner exception stack trace ---..
    at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()..

    at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
    </faultstring>
    <detail />
    </soap:Fault>
    </soap:Body>
    </soap:Envelop>
    If i change "2006-11-20T09:48:08+0530' to
    "'2006-11-20T09:48:08'" then it executes successfully.

    Please let me know what am I doing wrong. Any
    help is highly appreciated.


    Thanks,
    Nis
    imonline, Nov 23, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. A. M. G. Solo
    Replies:
    0
    Views:
    516
    A. M. G. Solo
    Nov 21, 2005
  2. Replies:
    0
    Views:
    722
  3. John Hatcliff
    Replies:
    0
    Views:
    380
    John Hatcliff
    Aug 23, 2005
  4. Massimo_Z

    is not a valid AllXsd value

    Massimo_Z, Jan 3, 2007, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    307
    Massimo_Z
    Jan 3, 2007
  5. Neil Chambers

    The string '' is not a valid AllXsd value - meh?

    Neil Chambers, May 9, 2008, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    1,332
    Neil Chambers
    May 9, 2008
Loading...

Share This Page