469,282 Members | 1,953 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

Why does svcutil generate two classes in different namespaces?

If I define Order class in WCF data contract

[DataContract(Namespace = http://OrderEntry)]
public class Order
{
// ...
}

and use svcutil to generate a proxy class specifying namespace

..../n:http://OrderEntry, OrderEntry

then svcutil generates two classes:

First one in the default namespace

[System.CodeDom.Compiler.GeneratedCodeAttribute("sv cutil", "3.0.4506.30")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("c ode")]
[System.Xml.Serialization.XmlTypeAttribute(Namespac e=http://OrderEntry)]
public partial class Order
{
///...
}

and second one in OrderEntry namespace

namespace CTII.CityDispatch2007.Wcf
{
using System.Runtime.Serialization;
[System.CodeDom.Compiler.GeneratedCodeAttribute("Sy stem.Runtime.Serialization",
"3.0.0.0")]
[System.Runtime.Serialization.DataContractAttribute ()]
public partial class Order: object,
System.Runtime.Serialization.IExtensibleDataObject
{
/// ...
}
}
I never understood why it is doing this but it is confusing because there
are two classes on the client, Order and OrderEntry.Order...

I want to have only OrderEntry.Order, that is why I use OrderEntry
namespace, but why do I get Order class in the default namespace and why is
this default Order class is not derivied from anything? What is it for?

Thanks,

-Stan
Jun 11 '07 #1
0 1868

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by PeterW | last post: by
6 posts views Thread by Michael C | last post: by
2 posts views Thread by Franck | last post: by
1 post views Thread by adacai | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.