Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

511 views
Skip to first unread message

imonline

unread,
Nov 23, 2006, 1:09:31 AM11/23/06
to
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

massimoc

unread,
Jan 3, 2007, 3:12:43 PM1/3/07
to

hi, I have the same problem with a third part webservice that answer with '2006-12-27 16:14:02' string that the parser won't understand because it's not ISO standard (it need the T between date and time), so I tried to change into < xsd:element name='date' type='xsd:string' / > from type xsd:dateTime but it don't works. The developer of the webservice don't want to change nothing (they prefer to deploy a not standard answer...)
if you have news about it let me know. we can work togheter and advice the first one.

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities

0 new messages