23
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.

Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

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.

Page 2: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

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”.

Page 3: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

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:

Page 4: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

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”

Page 5: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

“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:

Page 6: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

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:

Page 7: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

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:

Page 8: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk
Page 9: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

After Next click on Finish.

Page 10: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

10. Drag and drop a Receive shape.

Properties of Receive shape should be like:

View of orchestration after setting properties:

Page 11: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

11. Drag and drop Transform Activity under Receive.

Construct Message Properties should be:

In Transform Properties, Click on … button.

Page 12: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

Choose an existing map and choose your defined map. Choose

Source and Destination and click OK button.

Page 13: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

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:

Page 14: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

Final view of orchestration will look like:

Page 15: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

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.

Page 16: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

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.

Page 17: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk
Page 18: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

Click on Create Button.

Page 19: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

Finish. Your web service is created. Look at:

http://localhost/Factorial

Page 20: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

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.

Page 21: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

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.

Page 22: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

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.

Page 23: Publishing BizTalk Web Services...Publishing Factorial Orchestration as a Web Service. 1. Add “Factorial.dll” to GAC and copy this to “C:\Program Files (x86)\Microsoft BizTalk

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

WSDL.

Result when tested WSDL in SOAP UI.