Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
If we are using a .Net class generated by xsd.exe from a schema.
we wont be able to acces the classed public fields inside the message assignment shapes / expressions etc.
To achieve that we need to edit the xsd generated cs file with the following attributes
[DistinguishedFieldAttribute()] or [PropertyNamespace.ShortPropertyName] // For properties
eg:
using System;
using Microsoft.XLANGs.BaseTypes; // this is required to be imported from c:\progfile\biztalk2006
Using PropertyNamespace;
namespace NetClass
{
[Serializable]
public class MsgClass
{
public MsgClass() // do necessary initialization here if required
{
StrField = "OK";
IntField = 1;
ShortField = 1;
}
[PropertyNamespace.ShortPropertyName] // For properties
public Int16 ShortField;
[PropertyAttribute(typeof(PropertyNamespace.StringPropertyName)]
[DistinguishedFieldAttribute()]
public String StrField;
[DistinguishedFieldAttribute()] // For distinguished fields
public int IntField;
}
}
Comments
- Anonymous
April 15, 2008
PingBack from http://microsoftnews.askpcdoc.com/?p=2739