473,624 Members | 2,502 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Xml Serialization the same class may have multiple namespaces

Hi,

Not 100% sure if this is the correct group to post in but.

I have a class that I want to serialize/deserialize to match the MM7
specifications, which I have done but now that we are starting to
connect to a few different people we have realised that there are
multiple versions of the specification and each one has been defined
in a different namespace, now the actual xml is the same between the
versions

example :

Release 6 version 1. 4

<?xml version="1.0"?>
<Envelope xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema" xmlns="http://
schemas.xmlsoap .org/soap/envelope/">
<Header>
<TransactionI D d3p1:mustUnders tand="1" xmlns:d3p1="htt p://
schemas.xmlsoap .org/soap/envelope/" xmlns="http://www.3gpp.org/ftp/
Specs/archive/23_series/23.140/schema/REL-6-MM7-1-4">test</
TransactionID>
</Header>
<Body>
<SubmitReq xmlns="http://www.3gpp.org/ftp/Specs/archive/23_series/
23.140/schema/REL-6-MM7-1-4">
<MM7Version>6.8 .0</MM7Version>
<SenderIdentifi cation>
<VASPID>GENE</VASPID>
<VASID>GENE</VASID>
</SenderIdentific ation>
<Recipients>
<To>
<Number>6140519 2054</Number>
</To>
</Recipients>
<Subject>Subjec t</Subject>
<Content href="cid:conte nt_part" />
</SubmitReq>
</Body>
</Envelope>

Release 5 versiojn 1.3

<?xml version="1.0" ?>
<env:Envelope xmlns:env="http ://schemas.xmlsoap .org/soap/envelope/">
<env:Header>
<mm7:Transactio nID xmlns:mm7="http ://www.3gpp.org/ftp/Specs/archive/
23_series/23.140/schema/REL-5-M M7-1-3" env:mustUnderst and="1">
vas00001-sub
</mm7:Transaction ID>
</env:Header>
<env:Body>
<SubmitReq xmlns="http://www.3gpp.org/ftp/Specs/archive/23_series/
23.140/schema/REL-5-MM7-1 -3">
<MM7Version>5.6 .0</MM7Version>
<SenderIdentifi cation>
<VASPID>GENE_TE ST</VASPID>
<VASID>GENE</VASID>
</SenderIdentific ation>
<Recipients>
<To>
<Number>6141476 0983</Number>
</To>
</Recipients>
<Subject>Testin g</Subject>
<Content href="cid:conte nt_part"/>
</SubmitReq>
</env:Body>
</env:Envelope>

The only difference is the namespaces, is there anyway in .NET to
control the serialization and map different namespaces onto one so
that we can just have one set of classes defined ?

Thanks for any help here

Sep 26 '07 #1
0 2458

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

Similar topics

1
2186
by: Sacha | last post by:
I'm having trouble serializing some of my classes when using late binding. When I don't use late binding, it works fine. MyClass inherit from an abstract class called AbsMyClass. If I do the following, it works fine: #BEGIN public static void Write( string fileName ){ MyClass myClass = null; XmlSerializer xmlSerializer = null;
7
1709
by: Dave | last post by:
Hi all, I know there is a lot of information on here about Serialization, but I can't find what I need so I thought i would ask. I am trying to serialize and deserialize a set of data. Doesn't sound too hard. The only problem is, I have a number of elements in my XML File that do not refer to specific variables and I don't know until I deserialize what those are.
1
247
by: Dave | last post by:
I'm having trouble dynamically deserializing information. The following code is what I have. It serialises fine, the Dave element is serialized as the Name of the element, not its value. On Deserialize I need to store the Name of the Dave element in Variable C and also the same for INV. I am using serialization, but i can't deserialize the Dave value as it will always change, so a variable in the class cannot always be of the same...
0
1961
by: Chris McDonough | last post by:
ElementTree's XML serialization routine implied by tree._write(file, node, encoding, namespaces looks like this (elided): def _write(self, file, node, encoding, namespaces): # write XML to file tag = node.tag if tag is Comment: file.write("<!-- %s -->" % _escape_cdata(node.text, encoding)) elif tag is ProcessingInstruction: file.write("<?%s?>" % _escape_cdata(node.text, encoding))
0
1197
by: nobin01 | last post by:
Dear sir; I want ur Help in serialization.I know serialization.I Know binary,soap and xmlserialization also.But i want ur help in following topics.pls help me as soon as possible.I have search in site but only basics serialization is there. Topics: 1) serialize a nested object in mutiple files by maintaining the relation on parent level. ie, let say object1 containts object2 and object2 contains object3 , while serializing the object1,...
4
11400
by: mijalko | last post by:
Hi, I have inherited my class from System.Drawing.Printing.PrintDocument and I wish to serialize this object using XmlSerializer. And I get exception "There was an error reflecting type ...". If I look at innerException it says: "Cannot serialize member 'System.ComponentModel.Component.Site' of type 'System.ComponentModel.ISite'. OK it is problem to serialize all data so I'll implement my Serialization. I implemented ISerializable...
3
1456
by: Marc | last post by:
Hi, I am trying to serialize a data structure -- a list (of custom class) -- in one application, then read it in with another application. My serialize and deserialize subs are in a module that is shared between the two applications, so they are using exactly the same code (this module also contains the class, so I am certain the class code is the same) The code I'm using is quite simple, so I'm not sure where I'm going wrong:
12
3070
by: =?Utf-8?B?enRSb24=?= | last post by:
Hi all, I recently came across something really strange and after a couple of days of debugging, I finally nailed the cause of it. However, I have absolutely no idea what I am doing wrong or is it just a bug in binary serialization. The following is a simple example of the code:
0
2474
by: =?Utf-8?B?Y211cmFsaQ==?= | last post by:
I am serializing/deserializing a class (Class1) using the XmlSerializer object in the System.Xml.Serialization namespace in .Net 2.0. Class1 has some strings and ints and two lists of other simple serializable classes (Class2 and Class3) Class1, Class2 and Class3 are defined in an assembly (Assembly1) which is loaded by another assembly (Assembly2). When I statically reference Assembly1 in Assembly2, serialization and deserialization...
0
8246
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8179
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8685
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8341
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8490
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4184
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.