[Mono-dev] Mono Web service on 1.2.6

Gwyneth Morrison monogwyn at toadware.ca
Thu Dec 20 06:25:02 EST 2007


Good Day,

This short program is being used to test a web service from mono to a 
windows server.



using System;
using System.Collections.Generic;
using System.Text;
using ConsoleApplication1.mywebservice;
using System.Data;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            mywebservice.EnterpriseConfigWebService svc = new 
ConsoleApplication1.mywebservice.EnterpriseConfigWebService();
// GCM added ConsoleApplication1.mywebservice.
ConsoleApplication1.mywebservice.GetYourSiteDataResponse 
response=svc.GetYourSiteData(new 
ConsoleApplication1.mywebservice.GetYourSiteDataRequest());
            DataRow row = 
response.Data.tblEnterpriseConfig_Enterprise.Rows[0];
            Console.WriteLine(row["Name"]);
        }
    }
}

=============================================

The first thing you will notice by the comment is that I needed to 
prefix GetYourSiteDataResponse with the
name space etc even though it is declared above. This in not required in 
VS2005.

There are some other components generated by VS2005 but it all compiles 
and runs just fine under 1.2.5.
Upon updating to 1.2.6 we receive the following exception which appears 
to be much lower in the food
chain then the example program given (something has changed in the mono 
engine?)

==============================================
Unhandled Exception: System.FormatException: Invalid format.
  at System.DateTime.ParseExact (System.String s, System.String[] 
formats, IFormatProvider fp, DateTimeStyles style) [0x00000]
  at System.Xml.XmlConvert.ToDateTime (System.String s, System.String[] 
formats) [0x00000]
  at System.Xml.XmlConvert.ToDateTime (System.String value, 
XmlDateTimeSerializationMode mode) [0x00000]
  at System.Data.XmlDataLoader.StringToObject (System.Type type, 
System.String value) [0x00000]
  at System.Data.XmlDiffLoader.LoadColumnChildren (System.Data.DataTable 
Table, System.Data.DataRow Row, System.Xml.XmlReader reader, 
DataRowVersion loadType) [0x00000]
  at System.Data.XmlDiffLoader.LoadColumns (System.Data.DataTable Table, 
System.Data.DataRow Row, System.Xml.XmlReader reader, DataRowVersion 
loadType) [0x00000]
  at System.Data.XmlDiffLoader.LoadCurrentTable (System.Data.DataTable 
Table, System.Xml.XmlReader reader) [0x00000]
  at System.Data.XmlDiffLoader.LoadCurrent (System.Xml.XmlReader reader) 
[0x00000]
  at System.Data.XmlDiffLoader.Load (System.Xml.XmlReader reader) [0x00000]
  at System.Data.DataSet.ReadXml (System.Xml.XmlReader reader, 
XmlReadMode mode) [0x00000]
  at System.Data.DataSet.ReadXml (System.Xml.XmlReader r) [0x00000]
  at ConsoleApplication1.mywebservice.DSYourSite.ReadXmlSerializable 
(System.Xml.XmlReader reader) [0x00000]
  at 
System.Data.DataSet.System.Xml.Serialization.IXmlSerializable.ReadXml 
(System.Xml.XmlReader reader) [0x00000]
  at System.Xml.Serialization.XmlSerializationReader.ReadSerializable 
(IXmlSerializable serializable) [0x00000]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElement 
(System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers 
(System.Xml.Serialization.ClassMap map, System.Object ob, Boolean 
isValueList, Boolean readByOrder) [0x00000]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstanceMembers 
(System.Xml.Serialization.XmlTypeMapping typeMap, System.Object ob) 
[0x00000]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadClassInstance 
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, 
Boolean checkType) [0x00000]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObject 
(System.Xml.Serialization.XmlTypeMapping typeMap, Boolean isNullable, 
Boolean checkType) [0x00000]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElement 
(System.Xml.Serialization.XmlTypeMapElementInfo elem) [0x00000]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers 
(System.Xml.Serialization.ClassMap map, System.Object ob, Boolean 
isValueList, Boolean readByOrder) [0x00000]
  at 
System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMessage 
(System.Xml.Serialization.XmlMembersMapping typeMap) [0x00000]
  at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot 
() [0x00000]
  at System.Xml.Serialization.XmlSerializer.Deserialize 
(System.Xml.Serialization.XmlSerializationReader reader) [0x00000]

Any suggestions?

Thank you

Gwyneth



More information about the Mono-devel-list mailing list