473,396 Members | 1,804 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,396 software developers and data experts.

Serialization with/out WebService

Strange thing indeed...
I serialize my object on Client Side and apply it to WS, wich recieved
XMLDocument as Input.
WS saves it and it's possible to retrive the XMLDocument from WS by Client
Side and the Deserialize it. This working fine!
The SAME object with SAME serialization procedure, BUT Serialized on Client
Side and Deserialized on WS failed with "...No Set to the Instance of the
Object..." error. WHY? Very strange, VERY VERY
Sources available upon request.

TNX
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Nov 16 '05 #1
3 1151
Hi Tamir,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you have received an error message when
deserializing an XmlDocument in the WebService. If there is any
misunderstanding, please feel free to let me know.

Based on the information you have provided, it seems that the reference
hasn't been set to a valid XmlDocument object. Could you please paste your
code for serializing at client and deserializing at web service? Please
also paste the complete exception message here, so that we can provide out
assistance more quickly.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #2
[WebMethod]

public System.Xml.XmlDocument GetObjects(System.Xml.XmlNode objectData)

{

doc = new System.Xml.XmlDocument();

try

{
doc.AppendChild(doc.ImportNode(objectData,true));
DL.SomeGlobalDataClasses.GlobalObject =

((DL.ObjectSerialized)ser.DeSerialize(doc,typeof(D L.ObjectSerialized))).Glob
alObjects; //Here Exception System.NullReferenceException: Object reference
not set to an instance of an object. Method DeSerialize work fine in other
content



}

catch(Exception e)

{

Console.WriteLine(e.ToString());

}

return doc;

}

Here
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:Rd**************@cpmsftngxa06.phx.gbl...
Hi Tamir,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you have received an error message when deserializing an XmlDocument in the WebService. If there is any
misunderstanding, please feel free to let me know.

Based on the information you have provided, it seems that the reference
hasn't been set to a valid XmlDocument object. Could you please paste your
code for serializing at client and deserializing at web service? Please
also paste the complete exception message here, so that we can provide out
assistance more quickly.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #3
Hi Tamir,

From the error message, It seems that some reference might not have been
set to a valid object. For debugging, I have break down the error line into
three lines. Please replace this line with the following lines. If it still
doens't work, please let me know which line throws exception and you can
put the object references in watch window to find out which one was not set
to a valid object and throws the exception.

XmlSerializer ser = new XmlSerializer(typeof(DL.ObjectSerialized));
DL.ObjectSerialized obj = (DL.ObjectSerialized)ser.DeSerialize(doc);
Object o = obj.GlobalObjects;

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: BjörnHolmberg | last post by:
Hi everyone! In the following code we get a UTC offset in xml. Since I want my WAP users in UTC+02:00 to see data on a server in some US time zone, a lot of confusion will be created from this...
0
by: uAsking | last post by:
I'm building a client side application that uses webservices. In the client application I'm inheriting from basic types used by the webservices, so the wevservice provides the classes and sets all...
0
by: psy000 | last post by:
Hi, I have a C# web service client that talks to a JAVA application sever. I use AXIS to generate the WSDL file, use wsdl.exe to generate proxy stub c# code. When I try to use c# client connect...
0
by: Abhishek Srivastava | last post by:
Hello All, I am writing a XML WebService. I have two very simpilar methods exposed as webService. GetPersonList and GetModuleList. The GetPersonList method returns an ArrayList containing...
5
by: francois | last post by:
First of all I would to to apologize for resending this post again but I feel like my last post as been spoiled Here I go for my problem: Hi, I have a webservice that I am using and I would...
2
by: Angelos Karantzalis | last post by:
Hi y'all, we're using a bunch of classes in a project, that we wanted to convert to-from xml easily. So, we defined XmlAttribute annotations for our class members and all worked fine. The Xml...
1
by: Thomas Qvist | last post by:
We are building a suite of programs consisting of both winforms applications and office addins. We would like to pre-generate the xml-serialization classes and add it to our project to avoid...
1
by: Sebastian Araya | last post by:
Hello, I'm facing a little problem with php 5.1 and SOAP sessions. I've built a class which uses a few internal objects to solve a query, named CWebService, and I've issued a: $objServer...
2
by: =?ISO-8859-1?Q?=22Andr=E9s_G=2E_Aragoneses_=5B_kno | last post by:
Hello. I have this kind of object: class classA { int x; classA z; public int X { get { return this.x; }
0
by: samh | last post by:
Hi, I'm using .net 1.1 and have a web reference to a 3rd party. What I'm attempting to do is when I get a "failed" response from the webservice (that's inserting some data or doing something...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.