473,406 Members | 2,619 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,406 software developers and data experts.

Serialization of object returned from a Web Method containing jagged array

Hi there,

I m trying to return an object (of my own written class) from a web service that contains jagged Arrays as public variables. Asp.Net is showing me the its serialized version on the browser when i invoke the service during test.

Code:
public class returnType
{
[System.Xml.Serialization.XmlElementAttribute("chas sisdata")]
public _chassisdata[] chassisdata;

[XmlArray(),XmlArrayItem("wheel", typeof(_wheel[]),IsNullable=false)]
public _wheel[][] upsteps;


[XmlArray(),XmlArrayItem("wheelsize", typeof(_wheelsize[]),IsNullable=false)]
public _wheelsize[][] alloywheel;

[System.Xml.Serialization.XmlAttributeAttribute()]
public string id;

}
Result:
<upsteps>
<wheels>
<_wheel>
....
....
</_wheel>
<_wheel>
....
....
</_wheel>
</wheel>
</upsteps>
<alloywheels>
<wheelsize>
<_wheelsize size="">
....
....
</_wheelsize>
<_wheelsize size="">
....
....
</_wheelsize>
</wheelsize>
</alloywheels>
--------------------------------------------------------
The Problem is,I want to change the serialized xml as follows; (want to remove the middle nodes i.e. <wheel> and <wheelsize>.

<upsteps>
<wheel>
....
....
</wheel>
<wheel>
....
....
</wheel>
</upsteps>
<alloywheels>
<wheelsize size="">
....
....
</wheelsize>
<wheelsize size="">
....
....
</wheelsize>
</alloywheels>

Can any body help me?

thanx in Advance.
Nov 24 '06 #1
0 1195

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

Similar topics

16
by: Bob Rock | last post by:
Hello, when serializing an array of elements of a class Classname using XmlSerializer.Serialize() I get an XML like the following: <?xml version="1.0"> <ArrayOfClassname> ....... ..........
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...
4
by: ron | last post by:
Hi, I have class object that i serialize using the System.Xml.Serialization class. Intermittently the object is not getting serialized correctly, using System.Xml.Serialization classes....
3
by: Amadelle | last post by:
Hi all and thanks in advance for your help, I am having problems deserializing an object which seems to be serializing just fine. I save the byte array of the serialized object in the database...
11
by: ajou_king | last post by:
I was running some tests on my Win32 1GHZ processor to see how long it would take to transmit objects numerous times via TCP/IP using C# ..NET Remoting vs the C++ trustworthy method of binary...
4
by: Mark | last post by:
I'd like to take an instance of a class and store it in a database. I've marked my class as and am using the binary formatting code similar to...
4
by: Sahar | last post by:
Hi there, I m trying to return an object (of my own written class) from a web service that contains jagged Arrays as public variables. Asp.Net is showing me the its serialized version on the...
0
by: ksallem | last post by:
I have the following class that declares a jagged array named procedimentosRealizadosField()(). When I try to deserialize an XML file into an object of this class all fields are loaded correctly,...
17
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Hi Gurus, I need to transfer a jagged array of byte by reference to unmanaged function, The unmanaged code should changed the values of the array, and when the unmanaged function returns I need...
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
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:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.