BizTalk Schema Question and Answer Skip to main content

BizTalk Schema Question and Answer

What is the purpose of a document schema?
The schema is basically a contract of your message and defines it. The XML Schema definition (XSD) language defines the structure of an XML instance message, and this is the intended purpose of XSD, such schemas use XSD in a straightforward way. A schema is a term borrowed from the database world to describe the structure of data in relational tables. In the context of XML, a schema describes a model for a whole class of documents.

What is the purpose of a property schema?
Property schema is a special type of schema, not created to describe messages. Instead it describes context properties. It consists of only child node under a root node

What is the purpose of an envelope schema?
An envelope schema is a special type of XML schema. Envelope schemas are used to define the structure of XML envelopes, which are used to wrap one or more XML business documents into a single XML instance message. When you define an XML schema to be an envelope schema, a couple of additional property settings are required, depending on such factors as whether there is more than one root record defined in the envelope schema
 
What is the purpose of a Flat File schema?
A flat file schema defines the structure of a class of instance messages that use a flat file format, either delimited or positional or some combination thereof. Because the native semantic capabilities of XSD do not accommodate all of the requirements for defining the structure of flat file instance messages—such as the various types of delimiters that might be used for different records and fields within the flat file. BizTalk Server uses the annotation capabilities of XSD to store this extra information within an XSD schema. BizTalk Server defines a rich set of specific annotation tags that can be used to store all of the required additional information. 
 
What is the target namespace for schema?
Target Namespace is to schema what a namespace is to .Net Object and root node as a class name.

Is it possible to create a custom data type and use it in a schema?
Yes, it’s possible to create custom data types and it can be used across the schema.

Can schema have two nodes with the same name and different datatypes?
Yes, as long as they are not in the same scope.

Can schema have multiple root nodes?
Yes, a schema (XSD) can have multiple root nodes. In case you have a schema with multiple root nodes you will end up with multiple message types declared in BizTalk, one for every root node. So when you want to create a message you will need to specify exactly which message type you are going to use.

Is it possible to include and import in a single schema?
Yes, it is possible, both are the ways to utilize already existing schema. The only condition is the schema which is included should have same Target Namespace or no namespace.

By default, what is the data type of elements in a schema?
xs:string

What is the difference between Group Max occurs,Group Min Occurs and Max occurs, Min Occurs?
These are all node properties
Group Max Occurs: Specifies the maximum number of times that to the underlying group content of the selected All Group node can occur.
Group Min Occurs: Specifies the minimum number of times that the underlying group content of the selected All Group node can occur.
Max Occurs: Specifies the maximum number of times that the element corresponding to the selected Record node can occur.
Min Occurs:  Specifies the minimum number of times that the element corresponding to the selected Record node can occur.

What is BlockDefault property used for?
Use the BlockDefault property to prevent or restrict the types of derivations that can be used in instance messages for all data types defined by the schema being edited

What is a canonical schema?
A canonical schema is a design pattern, which is applied within a service oriented paradigm, and within BizTalk server context establish the loose coupling between systems. Through performing the transformation of messages from one system to canonical schema and from the canonical schema to message of another system, systems have no direct relation with each other. The canonical schema can also be viewed as an internal schema in BizTalk and aid you in structuring your solution through best practice of creating separate projects for maps, orchestrations, internal and external schemas. Another advantage of using a canonical schema is that it reduces the number of transformations you need. If you need a to map a few types of inbound message coming from different parties to a few outbound messages, you can create a map to your canonical schema for each inbound schema and then a map from your canonical schema to each outbound schema. If for example you have three types of incoming that needs to be mapped to three types of outgoing messages you will only need to build and maintain six maps instead of nine.

What is the correlation property schema?
Correlation types define a set of properties on which you will be correlating messages. These can be any properties which were previously defined in a property schema and deployed with some BizTalk Project including “system” properties deployed with the GlobalPropertySchemas which is
installed as part of the base BizTalk install. A correlation set defines a set of properties and values for these properties that a message must contain to be processed by a particular orchestration.

Difference between Flat File Schema and XML schema?
A flat file schema defines the structure of a class of instance messages that use a flat file format, either delimited or positional or some combination thereof. Because the native semantic capabilities of XSD do not accommodate all of the requirements for defining the structure of flat file instance messages—such as the various types of delimiters that might be used for different records and fields within the flat file—BizTalk Server uses the annotation capabilities of XSD to store this extra information within an XSD schema. BizTalk Server defines a rich set of specific annotation tags that can be used to store all of the required additional information.
Different Types of BizTalk Schemas: An XML Schema is basically a contract of your message and defines it. The XMLSchema definition (XSD) language defines the structure of an XML instance message, and this is the intended purpose of XSD, such schemas use XSD in a straightforward way.

Can we have schema without a target namespace? What will be its MessageType?
Yes, we can have a schema without target namespace and it’s message type will be the Root node.

Which property is only available for the flat file schema?
Custom Date/time property is only available for flat file schema.

What is the Message?
Each message in BizTalk Server is considered a multi-part message and is made up of zero or more parts. Each message with one or more parts has one of these parts identified as the body part. Each part consists of a binary chunk of data
which can represent an XML document, a flat file, a serialized .NET class, or other binary stream of data. You use the body part of the message to identify the type of the message that can be used for routing.

What is the difference between BizTalk (Schema) Editor and BizTalk Schema Generator?
BizTalk Editor resides within the Microsoft Visual Studio shell. Some of the functionality within BizTalk Editor relies upon existing user interface elements within the Visual Studio shell. BizTalk can automatically create the schema from DTD, well-formed XML, XDR. To do this schema generator is used.

How is schema generator invoked?
Right click the project in Solution Explorer and
select Add Generated Items –> Generate Schemas.

What is InstallWFX.vbs script?
It is a script which when run installs the BizTalk Schema Generator. It is used when generating schema from existing items. It’s likely to get error first time or after updates “WFX to XSD Schema generation module is not installed”. Then this script can be used to install the schema generator.

Can “EDI” be a part of Namespace?
It can be but it should be avoided in the projects that uses BizTalk EDI engine as during run time there can be conflicts with this and expected results might not be seen.

Is it possible to promote XML record of ComplexContent ?
No. To promote XML record its ContentType property should be set SimpleContent.

What is the maximum length allowed for promoted properties? 
255 characters

What is the maximum length allowed for Distinguished fields?
It can be of any length, no limits.

How to create an XPath alias to a field which can be used in decision making in Orchestration?
Distinguished field is a XPath alias to the field.
To create it , right click the
element–>Promote–>Show promotion–>Add

What is <Any> element?
An <Any> element in a schema designates a specific location in the schema where new elements or attributes can be added. When BizTalk uses the schema to process a message containing unknown elements or attributes in the designated location, the schema will still consider the message valid.

What is the Root Node?
It’s a node within a BizTalk Server schema that represents the outermost XML element in the business document specified by the schema.

How BizTalk engine identifies a unique schema?
BizTalk uses a combination of namespace#rootnode to define the schema type of a message, thereby making a MessageType unique (for example: http://mynamespace.com#MyRootNode). In other words, BizTalk uses this combination to identify and resolve
schemas references.

How BizTalk engine performs a validation of an instance of the message against the Schema?
By default, BizTalk Server will examine only the namespace and the root node name of a message to identify and validate the schema, and will not detect extra elements in the message body. To perform a deep validation of a message format,
you have to create a Custom Pipeline with the XML Disassembler component.

What are encoding options available used by BizTalk when creating schema?
There are various options but BizTalk always uses UTF-16 encoding for their schemas

Does BizTalk add any namespaces when creating schema?
Yes.  http://schemas.microsoft.com/BizTalk/2003 and http://www.w3.org/2001/XMLSchema are added by BizTalk when creating a schema.
 
How is schema namespace added by BizTalk when creating schema?
By default, the BizTalk Editor will set the namespace of a schema to http://ProjectName.SchemaName. 

What is the difference between XSD and DTD?
 Difference between XSD and DTD are listed below:
XSD are written in XML.
XSD  support data types.
XSD  support namespaces.
XSD is extensible to future additions.
XSD is richer and more powerful than DTDs.
 

Comments

Popular posts from this blog

BizTalk Interview Question and Answer

1. What is BizTalk? BizTalk is a middleware that sits in the middle of any two software who wish to communicate with each other and agree on some specified communication pattern. It uses SQL Server as back end database. “Microsoft BizTalk Server is an Inter-Organizational Middleware System (IOMS) that enables companies to automate business processes, through the use of adapters which are tailored to communicate with different software systems used in an enterprise. Created by Microsoft, it provides enterprise application integration, business process automation, business-to-business communication, message broker and business activity monitoring.”                 2. What is BizTalk Server Architecture and Life Cycle of Message? BizTalk Server Architecture: Life Cycle of Message: In this simplified view, a message is received through a receive location defined in a given receive port. This message is processed by the receive locatio

Configuring BizTalk WCF Timeout Values on a Binding

There are a number of timeout settings available in WCF bindings. Setting these timeout settings correctly can improve not only your service’s performance but also play a role in the usability and security of your service. The following timeouts are available on WCF bindings: OpenTimeout CloseTimeout SendTimeout ReceiveTimeout Open Timeout :  This property represents the amount of time a channel open operation has to complete. Send Timeout :  Use this property to set the amount of time that a send operation has to complete. When used as part of a solicit-response scenario, this value encompasses the total amount of time for the interaction to complete. If we are sending a large message, we may need to increase this timeout to allow for the request and response messages to be processed within this window. Close Timeout :  A time-stamp that is used to indicate the amount Receive Timeout :  Used by the Service Framework Layer to initialize the session-idle timeo

PowerShell Script to enable BizTalk Receive Location

We are facing problem in BizTalk server 2016 that few of running SFTP Receive location would be stopped after some time due to sftp connectivity issue of their threshold so I am going to share PowerShell script to enable receive location by window task scheduler. Before execute following script Please do following task a. Set Server name in ConnectionString b. Set ( $hostname) host name value that is using in SFTP Receive location c. Set ( $rcvLocation) Receive location name # Import external assembly and create a new object [ void ] [ System.reflection.Assembly ]:: LoadWithPartialName( "Microsoft.BizTalk.ExplorerOM" ) $Catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer   #BizTalk Config $Catalog . ConnectionString = "SERVER=.;DATABASE=BizTalkMgmtDb;Integrated Security=SSPI"   #connectionstring for the BizTalkMgmtDb $hostname = "BizTalkServerApplication" #hostname $rcvLocation = "RL_GetAccReq_SQL

Step by step solution of BizTalk Two-Way WCF-SQL XmlPolling in Send Port

I am going to share most awaited Two way WCF_SQL Two Way XmlPolling so that you can easily enhance your old SQL procedure and BizTalk Map without any big change. I know there is no content available in any website to how work with XmlPolling in WCF-SQL two-way adapter. In the last of this post you can download complete source code with an example. Please follow carefully all steps – 1. Open Microsoft Visual Studio as Administrator user and Click File>New>Project… In Installed Templates click BizTalk Projects then Empty BizTalk Server Project and Name as “BizTalkLive-WCF-SQL” and click OK. 2. Now see the below picture and create all respective folders separately for Schema, Map, Orchestration, Pipeline, Binding- 3. Create Schemas in Schema folder as shown below picture to get Account request using One Way WCF-SQL XmlPolling a) Create Envelope Schema first with Target NameSpace - http://BizTalkLive_WCF_SQL.AccountRequest b) Create Second Sch

Publish a web service in biztalk using BizTalk WCF Service Publishing Wizard

Welcome you again in my Blog and let us do another mind blowing achievement that how to publish a WCF web service in BizTalk and as in previous post to Complete BizTalk project to host Schema as Web Service  so If you want to expose/publish a web service, you should run through the BizTalk WCF Service Publishing Wizard. This wizard guides you through choosing what you want to expose as a web service. This section walks you through the wizard step by step to publish WCF Web Service using  WCF-WSHttp- Step-1:  To start the wizard, go to Start, All Programs, Microsoft BizTalk Server 2016(version), BizTalk WCF Service Publishing Wizard. This fires up a welcoming screen, on which you just click Next. Consider disabling the welcoming screen for the future by checking the check box at the bottom. You will now see the screen shown in above figure. Step-2: Choose the Service Endpoint option, and choose which adapter to use. Check Enable Metadata Endpoint if you want to expose t