The following details the steps required to publish a very simple message transformation orchestration as a WCF web service via BizTalk
Part 1 – Project
![1](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/11-300x183.png)
1) Open Visual Studio and create an “Empty BizTalk Server Project”
![2](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/2-300x175.png)
2) Right click project in Solution Explorer and select “New item…”
![3](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/3-300x183.png)
3) Add a “Schema” file that will be used to define the request message
![4](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/4-300x131.png)
4) Define the request message schema. The schema in example has two attributes, “Amount” and “Quantity”. Define namespace.
![5](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/5-300x144.png)
5) Repeat step 2 and add another “Schema” for the response message. In this example it has one attribute called “Tax”. Define namespace.
![6](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/6-300x183.png)
6) Repeat step 2 and add a “Map”
![7](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/7-300x171.png)
7) In map the transformation is defined from a request message to a response message.
![8](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/8-272x300.png)
8) Values for the first “Mathematical Functoid”
![9](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/9-272x300.png)
9) Values for the second “Mathematical Functoid”
![10](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/103-300x244.png)
10) Right-Click map and select “Test Map”
![11](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/111-300x155.png)
11) CTRL-Click the first test map to see test request map
![12](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/12-300x138.png)
12) CTRL-Click the second test map to see response map with value calculate from test request map
![13](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/13-300x183.png)
13) Repeat step 2 and add an “Orchestration”
![14](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/14-300x168.png)
14) Add a “Receive Shape”, “Transform Shape” and a “Send Shape”. Create a two messages, one for a request schema and another for the response schema.
![15](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/15-300x266.png)
15) Configure the “Transform Shape” with the map created in step 6.
![16](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/16-300x231.png)
16) Add port and give it a name.
![17](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/17-300x231.png)
17) Create a new port type and give it a name. The port must be public and a request-response pattern.
![18](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/18-300x231.png)
18) Leave at “Specify later”.
![19](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/19-300x169.png)
19) Configure messages in the “Receive Shape” and “Send Shape” from the messages created in step 14.
![20](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/20-300x169.png)
20) Connect the “Request” and “Response” ports to the “Receive Shape” and the “Send Shape”. Set the orchestration to public.
![21](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/21-300x185.png)
21) Specify the BizTalk application name otherwise it will deploy in default application on BizTalk.
![22](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/22-300x146.png)
22) Add a key to sign assembly. Assembly will be GAC deployed and a key file is required.
![23](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/23-300x189.png)
23) Build solution
![24](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/24-300x149.png)
24) Deploy solution
![25](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/25-300x152.png)
25) GAC deploy assembly after each build
Part 2 – Publish
![p1](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/p1-300x233.png)
1) Start the “BizTalk WCF Publishing Wizard”. In this example the “WCF-WSHttp” transport type is used. Ensure that “Enable on-premise metadata exchange” and “Create BizTalk receive locations in the following application:” has the application published in part 1 selected.
![p2](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/p2-300x233.png)
2) Select “Publish BizTalk orchestrations as WCF service”.
![p3](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/p3-300x164.png)
3) On the next page browse to the assembly created in part 1.
![p4](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/p4-300x233.png)
4) Ensure ports are shown
![p5](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/p5-300x233.png)
5) Specify namespace
![p6](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/p6-300x233.png)
6) In this example the WCF service will allow anonymous access.
![p7](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/p7-300x238.png)
7) If we at this stage browse to web service location we get this error.
![p8](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/p8-245x300.png)
8) To resolve error in step 2, change the identity of the application pool used by the web service, to one with appropriate BizTalk rights.
![p9](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/p9-300x230.png)
9) If we at this stage browse to web service location we get this error.
![p10](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/p10-300x210.png)
10) To resolve error in step 9, configure the orchestration in the published BizTalk application.
![p11](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/p11-259x300.png)
11) Start the BizTalk application.
![p12](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/p12-300x280.png)
12) After these step, the web service test page should display correctly.
Part 3 – Testing
![t1](http://svermaak-001-site6.ctempurl.com/wp-content/uploads/2015/06/t1-300x158.png)
After the orchestration is published, it is available and transformation can be tested