Skip to main content

Posts

Showing posts from March, 2012

Looping functoid in BizTalk map

Using Looping functoid in BizTalk Map: 1.       Create two schema, Order schema and MasterOrderSchema with below shown structure. 2.       OrderSchema will have order from multiple companies, using “ LOOPING ” functoid we will map it to MasterOrdeeShema. 3.       We will create a map to achieve   this, in this map we will use Looping functoid (Advanced Functoid Grp). Order Schema MasterOrderSchema Map – OrderSchemaToMasterOrderSchema.btm Now test the map created with input instance Order.xml file < ns0:Order xmlns:ns0 = " http://LoopinFunctoidSoln.OrderSchema " >   < ABCCompany >     < ID > 11 </ ID >     < ItemName > ItemName_0 </ ItemName >     < Qty > 10 </ Qty >   </ ABCCompany >   < PQRCompany >     < ID > 1 </ ID >     < ItemName > ItemName_1 </ ItemName >     < Qty > 2 </ Qty >   </ PQRCompany >   < XYZCompany >     < ID > 2 </ ID >     <

Creating Envelope Schema in BizTalk

1.       Create two schema , contect and PhoneBook(Enevelope Schema) 2.       Here we create a contact schema and which we will use in our envelope schema phonebook. 3.       Set PhoneBook envelope schema poperty to “ Yes ”.Import Contact schema to PhoneBook schema using “Imports ….Ellipse icon”. 4.       CInsert a new child record inside the PhoneBook node and name it as Contact. 5.       Select contact node Data Type property to   “ns0:Contact (Reference)”.

Developin custom Functoid in BizTalk

1) Fine, create a new project its type is class library and name it CustomFunctoid. 2) Add a reference of Microsoft.BizTalk.BaseFunctoids you can find it here : X:\Program Files\Microsoft BizTalk Server 2006\Developer Tools\Microsoft.BizTalk.BaseFunctoids.dll (where X the drive that holds the installation of BizTalk server 2006) 3) let you class implement from BaseFunctoid public class Percentage : BaseFunctoid 4) let the constructor override the base public Percentage(): base() 5) write the following line of code in the construction : this.ID = 3003; SetupResourceAssembl("CustomFunctoid.CustomFunctoidResource", System.Reflection.Assembly.GetExecutingAssembly()); SetName("PERCENTAGE_NAME"); SetTooltip("PERCENTAGE_TOOLTIP"); SetDescription("PERCENTAGE_DESCRIPTION"); SetBitmap("PERCENTAGE_BITMAP"); this.SetMinParams(2); this.SetMaxParams(2); SetExternalFunctionName(GetType().Assembly.FullName, "CustomFunctoid.Percentage&

Reading schema node value

Following example show, how to read schema node value: strAction = System.Convert.ToString(xpath(msg_StudAcadsReq,"string( /*[local-name()='getStudentAcademicRequest' and amespace-uri()='http://schemas.careered.com/student'] /*[local-name()='Header' and namespace-uri()='http://schemas.careered.com/student'] /*[local-name()='Action' and namespace-uri()='http://schemas.careered.com/student'] )")); strSSID = System.Convert.ToString(xpath(msg_StudAcadsReq,"string( /*[local-name()='getStudentAcademicRequest' and namespace-uri()='http://schemas.careered.com/student'] /*[local-name()='Header' and namespace-uri()='http://schemas.careered.com/student'] /*[local-name()='SourceSystemId' and namespace-uri()='http://schemas.careered.com/student'] )"));