| Profil de Denzil PintoTheBuzzPhotosBlogListes | Aide |
|
1 mai Generate Schema from Class Library
We need to first create a new solution in visual studio.net, follow the steps below
using System; using System.Xml.Serialization;
namespace ClassLibraryEmployeeTest { [Serializable()] [XmlRoot]
public class Employee { [XmlElement("EmployeeID",typeof(int))] public int empID; [XmlElement("EmployeeName",typeof(string))] public string empName; [XmlElement("Address", typeof(Address))] public Address address;
[System.Xml.Serialization.XmlIgnore] public int EMPID { get { return empID; }
set { empID=value; } } [System.Xml.Serialization.XmlIgnore] public string EMPName { get { return empName; } set { empName=value; } }
public Employee() {
} } }
· If you look at the code carefully you will notice that we have three fields, empID, empName and Address. Now we need to add Address so again · Right click on the Project File and select Add > Add New Item > select Class from the templates and enter the name “Address”. · Open Address and add the following code
using System; using System.Xml.Serialization;
namespace ClassLibraryEmployeeTest {
public class Address { [System.Xml.Serialization.XmlIgnore] public string address1;
public string phoneNo; [System.Xml.Serialization.XmlIgnore]
public string Address1 { get { return address1; } set { address1=value; } } [System.Xml.Serialization.XmlIgnore] public string PhoneNo { get { return phoneNo; } set { phoneNo=value; } }
public Address() {
} } }
You have now added the new schema to BizTalk.
CommentairesPour ajouter un commentaire, connectez-vous avec votre identifiant Windows Live ID (si vous utilisez Messenger ou Xbox LIVE, vous avez un identifiant Windows Live ID). Connectez-vous Vous n'avez pas d'identifiant Windows Live ID ? Inscrivez-vous RétroliensL'URL de rétrolien de ce billet est : http://denzilpinto.spaces.live.com/blog/cns!A2256C53CD2EC18E!149.trak Blogs Web qui font référence à ce billet
|
|
|