BizTalk Server Orchestration - RE: Property Fields in .Net Classes... ANOTHER Compile Error-"XML-SERIALIZABLE&q

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > June 2004 > RE: Property Fields in .Net Classes... ANOTHER Compile Error-"XML-SERIALIZABLE&q





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author RE: Property Fields in .Net Classes... ANOTHER Compile Error-"XML-SERIALIZABLE&q
Hong Lee

2004-06-30, 3:30 am

[Serializable]
public class POClass
{
[Property(typeof(PropertySchemas.IDs))]
public string ID;

public string Item;
}

NOW...
I have another error - "'NetClass.POClass' must be Xml serializable to be a
message part type."

Isn't enough with [Serializable]?

I added another attribute [XmlRootAttribute("PO")]
I solved this error.

But...I feel...
this is not the right way to specify xml-serializable class...

What's the good answer?


"Shankar Stanam[MSFT]" <umass-nospam@online.microsoft.com> wrote in message
news:TmmHQ4gXEHA.2900@cpmsftngxa06.phx.gbl...
>
> Hello Hong
>
> Here is how you should be annotating .net mebers as propertys
>
> [Serializable]
> public class POClass
> {
> [Property(typeof(propertyString))] // do not use PropertyAttribute
> but use Property
> [DistinguishedFieldAttribute()]
> public string ID;
>
> [DistinguishedFieldAttribute()]
> public string Item;
>
> public POClass()
> {
> }
> }
>
>
>
> Also, propertyString should be defined in the schema editor. Not in the
> user code as you are trying. I suggest you create a project that has
> schemas, mark it as property schema ( property in the schema editor),
> define your properties in the schema. You should reference this schema

dll
> in your user code and make use of the property as above. You should not
> be deriving from MessageDataPropertyBase.
> Hope this helps
>
>
>
> This posting is provided "AS IS" with no warranties, and confers no

rights.
>
> EBusiness Server Team
>





Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com