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

Serializing generic objects with circular references

I have authored a web service using ASP 2.0. The web services return objects
that use generics and that also contain circular references.

Programmatically, everything works well, as long as you use the web service
proxy client generated by visual studio. However, the default test harness
provided by the .asmx file errors out because it seems to use
XmlSerialization and cannot handle circular references.

I understand that the XmlSerializer cannot handle circular references, while
the SoapFormatter cannot handle generics. How does the asmx framework
serialize and deserialize such objects?

Thanks in advance.
~!#@~

Jun 13 '06 #1
2 2794
The asmx framework uses the XmlSerializer, here are some pointers:

http://msdn.microsoft.com/msdnmag/is...rv/?frame=true
http://msdn.microsoft.com/library/en...howwebmeth.asp

Josh
http://www.thejoyofcode.com/
Lapu-Lapu wrote:
I have authored a web service using ASP 2.0. The web services return objects
that use generics and that also contain circular references.

Programmatically, everything works well, as long as you use the web service
proxy client generated by visual studio. However, the default test harness
provided by the .asmx file errors out because it seems to use
XmlSerialization and cannot handle circular references.

I understand that the XmlSerializer cannot handle circular references, while
the SoapFormatter cannot handle generics. How does the asmx framework
serialize and deserialize such objects?

Thanks in advance.
~!#@~


Jun 13 '06 #2
I made a mistake, I wrote ASP 2.0, I meant ASP.NET 2.0. The articles below
are great but they don't help me figure out how asmx framework handles object
graphs/messages that contain CIRCULAR REFERENCES combined with GENERICS. Thx.

"Josh Twist" wrote:
The asmx framework uses the XmlSerializer, here are some pointers:

http://msdn.microsoft.com/msdnmag/is...rv/?frame=true
http://msdn.microsoft.com/library/en...howwebmeth.asp

Josh
http://www.thejoyofcode.com/
Lapu-Lapu wrote:
I have authored a web service using ASP 2.0. The web services return objects
that use generics and that also contain circular references.

Programmatically, everything works well, as long as you use the web service
proxy client generated by visual studio. However, the default test harness
provided by the .asmx file errors out because it seems to use
XmlSerialization and cannot handle circular references.

I understand that the XmlSerializer cannot handle circular references, while
the SoapFormatter cannot handle generics. How does the asmx framework
serialize and deserialize such objects?

Thanks in advance.
~!#@~


Jun 13 '06 #3

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

Similar topics

49
by: Steven Bethard | last post by:
I promised I'd put together a PEP for a 'generic object' data type for Python 2.5 that allows one to replace __getitem__ style access with dotted-attribute style access (without declaring another...
1
by: Ivo Bronsveld | last post by:
All, I have quite a challenging task ahead of me. I need to write an object model (for code access) based on a schema, which cannot be made into a dataset because of it's complexity. So I...
2
by: Jon Davis | last post by:
The garbage handler in the .NET framework is handy. When objects fall out of scope, they are automatically destroyed, and the programmer doesn't have to worry about deallocating the memory space...
2
by: Tobias Zimmergren | last post by:
Hi, just wondering what serializing really is, and howto use it? Thanks. Tobias __________________________________________________________________ Tobias ICQ#: 55986339 Current ICQ status: +...
12
by: Frank Rizzo | last post by:
I have a circular reference between 2 classes in the same project (i.e. each class refers to the other). The app runs fine and I am seeing no issues, which kind of surprised me. Are there any...
2
by: danny.dion | last post by:
Hi ! I have a question about JScript : I have an object class wich dynamically creates a control in the page. Then it binds an event to that control, pointing on one of its methods (the...
11
by: Nemisis | last post by:
Hi everyone, sorry if this post gets really long, i just wanna make sure i fully explain what i am trying to do. I am new to OOP and .net 2.0, so if this is obvious, i am sorry. I have wrote a...
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; }
3
by: =?Utf-8?B?UGF1bCBIYWxl?= | last post by:
Moving all User Controls to a single directory has solved my problem - Thanks Eliyahu. That said, I still got one Circular ref error yesterday, rebuilt again and the build was fine? Far far...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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...

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.