msdnshared.blob.core.windows.net · web viewthe orchestration should show up as below in the...

25
Biztalk adapter for Host files : Insert Scenario : Create a Send Port: Static two ways solicit response Configure port : Configure the port (Host file provider connection and may be command to execute) e.g. Connection string

Upload: others

Post on 15-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

Biztalk adapter for Host files :

Insert Scenario :

Create a Send Port: Static two ways solicit response

Configure port :

Configure the port (Host file provider connection and may be command to execute)

e.g. Connection string

User ID=BVT22;Password=***************;Network Transport Library=TCP;Host CCSID=37;PC Code Page=1252;Network Address=CONDOR;Network Port=446;Process Binary as Character=False;Persist

Page 2: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

Security Info=True;Cache Authentication=False;Location=CONDOR;Default Library=BVT22;Repair Host Keys=False;Strict Validation=False;Metadata=C:\HISTests\DataTests\Binaries\HostFileProvider\Library_AS400.DLL;

Page 3: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

e.g request :

<ns0:RequestHF xmlns:ns0="BAHFTest"> <sync> <after> <Library_AS400.BVTTESTS OUT1_CHAR1="TEST_0">BVT22.BVTTESTS</Library_AS400.BVTTESTS> </after> </sync></ns0:RequestHF>

Not that Document Target Namespace can be anything like BAHFTest

Response Root element is the element name that will appear in XML response.

Page 4: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

When Creating ports for Orchestration, send pipeline and Receive pipeline should be XMLTransmit and XML receive respectively.

We are not setting any other properties apart from General section

Create orchestration :

Generate XSD and XML instance:

Create new Biztalk type project in visual studio . right click the project name ( in solution explorer ) and hit add generated items :

Page 5: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

In the wizard , add adapter metadata . and proceed – finish . At the end you will see , the xsd is created for Metadata like in e.g. below :

  <?xml version="1.0" encoding="utf-16" ?> - <xs:schema xmlns:tns="BAHFTest"

xmlns:b="http://schemas.microsoft.com/BizTalk/2003" targetNamespace="BAHFTest" xmlns:xs="http://www.w3.org/2001/XMLSchema">

- <xs:element name="RequestHF">+ <xs:complexType>

  </xs:element>- <xs:element name="ReponseHF">- <xs:complexType>- <xs:sequence>+ <xs:element name="Success">

  </xs:sequence>  </xs:complexType>  </xs:element>  </xs:schema>

More closely , Request element is :

- <xs:element name="RequestHF">- <xs:complexType>- <xs:sequence>- <xs:element xmlns:updategram="urn:schemas-microsoft-com:xml-updategram"

updategram:Prefix="updg" minOccurs="1" maxOccurs="unbounded" name="sync">- <xs:complexType>- <xs:sequence>- <xs:element updategram:Prefix="updg" minOccurs="0" maxOccurs="unbounded"

name="after">- <xs:complexType>- <xs:sequence>- <xs:element minOccurs="0" maxOccurs="unbounded"

name="Library_AS400.BVTTESTS">- <xs:complexType>- <xs:simpleContent>- <xs:extension base="xs:string">  <xs:attribute name="OUT1_CHAR1" type="xs:string" />

  </xs:extension>  </xs:simpleContent>  </xs:complexType>  </xs:element>  </xs:sequence>  </xs:complexType>  </xs:element>  </xs:sequence>  </xs:complexType>  </xs:element>  </xs:sequence>  </xs:complexType>  </xs:element>

- <xs:element name="ReponseHF">

Page 6: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

Response element is :

<xs:element name="ReponseHF">- <xs:complexType>- <xs:sequence>- <xs:element name="Success">- <xs:complexType>- <xs:sequence>  <xs:element minOccurs="0" maxOccurs="1" name="RowsAffected" type="xs:int" />

  </xs:sequence>  </xs:complexType>  </xs:element>  </xs:sequence>  </xs:complexType>  </xs:element>

Generate instance of the xsd ;

Page 7: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

the instance will look like following XML :

<ns0:RequestHF xmlns:ns0="BAHFTest"> <sync> <after> <Library_AS400.BVTTESTS OUT1_CHAR1="OUT1_CHAR1_0">Library_AS400.BVTTESTS_0</Library_AS400.BVTTESTS> <Library_AS400.BVTTESTS OUT1_CHAR1="OUT1_CHAR1_0">Library_AS400.BVTTESTS_1</Library_AS400.BVTTESTS> <Library_AS400.BVTTESTS OUT1_CHAR1="OUT1_CHAR1_0">Library_AS400.BVTTESTS_2</Library_AS400.BVTTESTS> </after> <after> <Library_AS400.BVTTESTS OUT1_CHAR1="OUT1_CHAR1_0">Library_AS400.BVTTESTS_0</Library_AS400.BVTTESTS> <Library_AS400.BVTTESTS OUT1_CHAR1="OUT1_CHAR1_0">Library_AS400.BVTTESTS_1</Library_AS400.BVTTESTS> <Library_AS400.BVTTESTS OUT1_CHAR1="OUT1_CHAR1_0">Library_AS400.BVTTESTS_2</Library_AS400.BVTTESTS> </after> <after> <Library_AS400.BVTTESTS OUT1_CHAR1="OUT1_CHAR1_0">Library_AS400.BVTTESTS_0</Library_AS400.BVTTESTS> <Library_AS400.BVTTESTS OUT1_CHAR1="OUT1_CHAR1_0">Library_AS400.BVTTESTS_1</Library_AS400.BVTTESTS> <Library_AS400.BVTTESTS OUT1_CHAR1="OUT1_CHAR1_0">Library_AS400.BVTTESTS_2</Library_AS400.BVTTESTS> </after> </sync>

</ns0:RequestHF>

Change it to more acceptable format for Host file adapter:

<ns0:RequestHF xmlns:ns0="BAHFTest"> <sync> <after> <Library_AS400.BVTTESTS OUT1_CHAR1="TEST_0">BVT22.BVTTESTS</Library_AS400.BVTTESTS> </after> </sync>

</ns0:RequestHF>

Now store this XML file into some directory say c:\BAHFprojects

Now we will create Orchestration :

Click on the BizTalk Orchestration.odx file and you will get the work area to create ports .

As shown below create 3 ports :

Page 8: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

Explanation of wizards for configuring ports shown above:

Page 9: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports
Page 10: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports
Page 11: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports
Page 12: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

Note in above screen we have mentioned Transport = FILE and URI = c:\input\*.xml. This is the receive location where the XML file created for Insert request will be placed.

Receive pipeline is : XML recieve

Page 13: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

Similarly create Host file send receive port through Wizard .

Page 14: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

This will be :

I will be sending a Host file request and receiving a host file response back on this two way port.

Page 15: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

Now that you have created ports, create the flow of messages by using orchestration toolbox.

Drag and drop receive send ports on the flow chart :

Page 16: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

Create messages as displayed in below orchestration view of project explorer.

Page 17: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports
Page 18: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

Assign messages and operations as below :

Page 19: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports
Page 20: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports
Page 21: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports
Page 22: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

Now give a key to assembly and deploy the orchestration project .

. after successful deploy , go to Biztalk administration and hit refresh .

The orchestration should show up as below in the Application where you have created your send receive host files port.

Page 23: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

Now start all ports and then enlist the orchestration .( NOTE: make sure you have configured the binding for Host file send – recieve port before )

Page 24: msdnshared.blob.core.windows.net · Web viewThe orchestration should show up as below in the Application where you have created your send receive host files port. Now start all ports

Now drop the Input XML file into c:\input

This will go away in some time and you will see the response in:

C:\outpuyt\po.xml

Also now if you browse the online file, you should see the inserted row there .

Thus we complete the insert scenario for BAHF.