473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

web reference throwing an xmlserializer error.

hi,

i have a program that when executed, creates an instance of itself and then runs a method (that has been written in its base class). This works fine, and looks like this;

public static void Main(string[] args) {
ObjectOne myObject = new ObjectOne();
myObject.performUpdate();
}

I have a windows service that wakes up at a certain point, and calls a webmethod located on a web service. This method calls a static method in another class which does the exact same thing as the program above. It looks like this;

public static void update() {
ObectTwo myObject = new ObjectTwo();
myObject.performUpdate();
}


Both of these classes run the 'performUpdate()' method, which is located in their shared abstract base class. The first one (the exe) runs fine. The second one which is initiated by the webmethod fails with an "Object reference not set to an instance of an object". I have narrowed it down to the problem. When the 'performUpdate()' method is called.... amongst other things, it creates a web-reference - and begins calling other webmethods. It is the instansiation of this web-reference that is failing.

I can only think that because a webmethod is creating a class which then goes and creates a web-reference so it can access other webmethods in the service that actually created it - its getting confused :-) ??

I know this might seem as clear as mud, but any help would be really appriciated!!!


UPDATE:: I set it to break on any exception, and the line comes up with;

"TBS.US.ServiceAgents.USWebService.XmlSerializ ers' failed to load in the 'LoadFrom' binding context of the AppDomain with ID 76. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'TBS.US.ServiceAgents.USWebService.XmlSerializers, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'TBS.US.ServiceAgents.USWebService.XmlSerializers, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'"


TBS.UC.ServiceAgents.USWebService is my project web service
Sep 8 '08 #1
0 1136

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Chris Aitchison | last post by:
Hello, I am attempting to have a class that I have written serialize so that it can be both passed as a parameter or return value for a webservice, and also be serialized to disk using the...
5
by: Stuart Robertson | last post by:
I am trying to find a solution that will allow me to use XmlSerializer to serialize/deserialize a collection of objects where a given object is shared between two or more other objects, and not...
8
by: Harris Boyce | last post by:
Hello, I'm trying to use the FOR XML EXPLICIT clause with SQL Server to deserialize data from my database into a strongly-typed collection object that I will use throughout my application. I...
12
by: SJD | last post by:
I've just read Christoph Schittko's article on XmlSerializer: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp . . . and very informative it is too....
4
by: Steve Long | last post by:
Hello, I hope this is the right group to post this to. I'm trying to serialize a class I've written and I'd like to be able to serialze to both binary and xml formats. Binary serialization is...
3
by: Don McNamara | last post by:
Hi, I've hit quite a strange problem with XmlSerializer on my W2K3 server. When I serialize/deserialize using an exe on my local computer (XP), everything works fine. When I put the code out on...
0
by: William Stacey [MVP] | last post by:
Had a method that got some string info from mp3 tags in N files and serializes this class and deserializes at other side. Works ok except sometimes get chars that choke the XmlSerializer. After...
4
by: SteveT | last post by:
I have a data structure that I am writing to an XML file using XmlSerializer. XmlSerializer xSer = new XmlSerializer(typeof(MyData)); StreamWriter sw = new StreamWriter("SomeData.xml");...
2
by: Jeremy Kitchen | last post by:
I have inherited a project and I am trying to figure out why the failing units tests that exist fail. I a, getting the following error when I attempt serialization. Any advice on what I should...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.