Passing name value pair to the biztalk Orchestration

xiaoxiao2021-03-06  63

The Biztalk Messaging accepts the XML, Custom XML and name value pair inputs. Document specifications describe the internal structure of your document instances. Biztalk Messaging validates the input files with the specification. User can create the specification for XML using the Biztalk editor, but for Name Value Pair Needs to Create Custom Specification.

Create Specification

This is the procedure for creating the specification for the name value pair.

Open the biztalk editor and do the folowing steps

On the File menu, click New. The New Document Specification dialog box appears. Click Blank Specification and click OK. Select Declaration in the right pane and change the name as it meaning full main node (for our request change "Blank Specification" as " Request ") Select the Reference tab and Double-click the value field in the Standard row. in the Standard list, click CUSTOM and press ENTER. Click Yes to confirm the change. Change the Default Record Delimiter value to & (0x26). Next , select the Parse tab on the right pane, and change the FieldOrder property to Infix. This tells the valuator to look for the delimiters between different records, but not before the first record or after the last record. Change the Append New Line and Skip Carriage Return property's value to No and Skip Line Feed to Yes Change the delimiter type to the Default Record Delimiter Add new record to the root node Select the declaration tab in the right pane and change the name of the node Select the parse Tab and change the property as it to the root node insert the field node Similarly Insert All The Nodes and FIELDS FINALLY SAVE The Specification

You can see the custom specification created for the name value pair (see the name value pair at the end of the page) IS in Figure Below.create envelope

User necessary to create the envelopes for processing Custom XML and name value pairs using Biztalk Messaging Manager. The envelope must points to the specification, so that the Biztalk Server interprets the specification and submits the interpreted document to the Interchange interface.

This is the procedure for recreating the envelope.

Open the biztalk messaging manager and do the folloading steps

On the File menu, select New -> Envelope Enter the envelope name in the name text box Select the envelope format as CUSTOM Check the Envelope Specification and browse for the file path of custom specification Press OK to create the envelope

BizTalk Orchestration

Biztalk orchestration is to receive the name value pair and do the business processing by using COM functions. See below the simple orchestration to receive the name value pair and copy it to the file specified in response port (Without COM functionality).

How to call the orchestration

This is the code to call the orchestration from VS.Net. Here "ChannelNonXML" is the request channel pointed to the request port (NonXmlRequest) and "NonXmlEnvelope" is the envelope name. According to the code it receives the name value pair text ( see the text of name value pair below here) from the specified path and submitted to the Biztalk InterchangeClass interface. The Biztalk server interprets the input text with specification specified in envelope and converts into the equivalent xml and calls the Biztalk orchestration.

InterchangeClass btsobj =

New

InterchangeClass ();

Object

o =

New

Object ();

Objecto1 =

New

Object ();

String

Result = "";

StreamReader SR =

New

StreamReader (@ "c: /custom/nonxml/flatfile.txt");

Result = sr.readtoend ();

Btsobj.submitsync (biztalk_openness_type.biztalk_openness_type_notopen,

Result,

// the document body

NULL

,

// docname

NULL

,

// SourceQualifier

NULL

,

// sourceID

NULL

,

// destqualifier

NULL

,

// destid

"CHANNELNONXML",

// "Channelorderxml", // CHANNEL

// "Channel-ncbetelacc",

NULL

,

// FilePath

"Nonxmlenvelope",

// envelope

0,

Ref

O,

Ref

O1);

// passthrough

Btsobj =

NULL

;

INPUT NAME VALUE PAIR

msg_num = 660 & msg_text = InsertAccount & userid = rosi & password = rosi123 & external_account_no = test-rosi-002 & external_account_no_type = 1 & acct_date_created = 20040101 & acct_code = 118 & acct_sss_code = 18 & acct_bill_fname = rosi & acct_bill_lname = Dabre

Output XML Response

Conclusion

BizTalk server only accepts the XML input to the orchestration. Custom envelope is used to convert the Name Value Pair to the XML, which is suitable for BizTalk orchestration. This article explains the effective way to pass the Name Value Pair to the BizTalk orchestration. Mail US atvinod@dotnetforce.com

oral

RosiReddyR@yahoo.com

For queries related to this article.

转载请注明原文地址:https://www.9cbs.com/read-119857.html

New Post(0)