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

I

imonline

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top