Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add...

Preview:

Citation preview

Publishing BizTalk Web Services

Project 1: FactorialLibrary

1. Run Visual Studio 2013 as Administrator.

2. Create a class library project and name it as “FactorialLibrary”.

Rename “Class1.cs” to “Factorial.cs”. Write the code to calculate

Factorial in the class file.

3. Sign the assembly in project properties. Create a strong key name

file for signing.

4. Build the project FactorialLibrary.

5. Now deploy the dll file of FactorialLibrary to GAC.

6. Open Developer Command Prompt as for VS2013 Administrator

present in Visual Studio Tools. Run the following command:-

gacutil -i “BizTalk_Workspace_PATH\FactorialLibrary\Fact

orialLibrary\bin\Debug\FactorialLibrary.dll”

7. Copy “FactorialLibrary.dll” to this folder “C:\Program Files

(x86)\Microsoft BizTalk Server 2013 R2\Developer Tools”.

Project 2: FactorialFunctoidLibrary

1. Create a class library project named as “FactorialFunctoidLibrary”.

Rename “Class1.cs” to “FactorialFunctoid.cs”. 2. Add a reference to Microsoft.BizTalk.BaseFunctoids. Click on

Project > Add Reference > Browse. Go to “C:\Program Files

(x86)\Microsoft BizTalk Server 2013 R2\Developer Tools” and

select “Microsoft.BizTalk.BaseFunctoids.dll”. Similarly add

reference to “FactorialLibrary.dll”. 3. Write the code for FactorialFunctoid. Sign its assembly, Build the

project, deploy it to GAC and copy “FactorialFunctoidLibrary.dll”

to “C:\Program Files (x86)\Microsoft BizTalk Server 2013

R2\Developer Tools\Mapper Extensions”. Below is the code:

Project 3: Factorial

1. Check whether IIS is installed or not. To check Go to control panel >

Programs and Features > Windows Features. Check the following

things:

2. Create an Empty BizTalk Project named as “Factorial”.

3. Create 2 schemas named as “Factorial_Input.xsd” and

“Factorial_Output.xsd”. These are shown as:

“Factorial_Input.xsd”

“Factorial_Output.xsd”

4. Create a map file “Fact_Map.btm”. It should look like:

5. Add the FactorialFunctoid to Functoids. Right click at tool box

section, click on Choose Items. A Choose Toolbox items wizard will

open. Choose BizTalk Mapper Functoids and find FactorialFunctoid. It

will look like:

6. Checkbox FactorialFunctoid and click OK button. FactorialFunctoid

will be added under Mathematical Functoids as:

7. Drag and drop this Factorial Functoid into map and configure it as:

8. Create an Orchestration named as “Fact_Orch”. In Orchestration

view, create 2 messages “MessageReceive” and “MessageSend” with

Message type as “Factorial_Input.xsd” and “Factorial_Output.xsd”

respectively.

9. Drag and drop a Port into port surface of the orchestration. Follow

the screenshots:

After Next click on Finish.

10. Drag and drop a Receive shape.

Properties of Receive shape should be like:

View of orchestration after setting properties:

11. Drag and drop Transform Activity under Receive.

Construct Message Properties should be:

In Transform Properties, Click on … button.

Choose an existing map and choose your defined map. Choose

Source and Destination and click OK button.

12. Drag and drop Send activity and configure it. Send properties

should look like:

Right click properties of Factorial, sign the assembly and DO GIVE

APPLICATION NAME UNDER DEPLOYMENT as shown:

Final view of orchestration will look like:

13. Build, deploy and configure in BizTalk Admin Console.

Click on OK Button. It will not be configured because we didn’t

created any Receive port. We will be creating it using Web Services

Publishing Wizard.

Publishing Factorial Orchestration as a Web Service.

1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files

(x86)\Microsoft BizTalk Server 2013 R2\Developer Tools”.

2. In Visual Studio, click on Tools and open BizTalk Web Services

Publishing Wizard. Follow Screenshots:-

Browse your Factorial.dll under Developer Tools folder.

Click on Create Button.

Finish. Your web service is created. Look at:

http://localhost/Factorial

3. Go to BizTalk Server Administration Console, refresh the

Applications and expand Factorial. Click on Receive ports and

you’ll see that a port is created. Configure Factorial and under

Receive Ports select the port which is created by the wizard. You

will see the green tick sign after you configure the receive port also.

4. Start the Factorial Application.

5. Open IIS Manager. Go to Application Pools and add a new

application pool.

6. Go to advance settings on “Factorial” Application Pool and

configure it as:

Click on … button and choose Custom setting.

Give your credentials accordingly in this screen.

7. Expand Sites and go to your “Factorial” site. Go to advance

settings of your site and choose the Application pool that you

created.

8. You’re all ready for testing the Factorial Service now. Test the

WSDL.

Result when tested WSDL in SOAP UI.

Recommended