BizTalk Hands-On Labs (12) wcf-oracle adapter use

Source: Internet
Author: User
Tags biztalk wsdl

1 Course Brief

Familiarize yourself with the use of the Wcf-oracle adapter through this course

2 preparatory work

1. Create a new BizTalk Empty project

2. Configure the application name and program signature for the BizTalk project.

3. Oracle Database

(Oracle Database Expression http://www.oracle.com/technetwork/products/express-edition/downloads/index.html)

4. Oracle SQL Developer (http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html)

5. BizTalk WCF Operation Promote Pipeline Component (http://btsoperationpromote.codeplex.com)

3 Demo 3.1 Generate database table schema for corresponding actions

Note: The process of creating a BizTalk project is described in the following: Comprehensive BizTalk Development Experiment

1. Right-click the project and add the build item

3.2 Click Consume Adapter Service

2. Select sqlbinding in the binding type

3. Enter the account information in the security options for the adapter properties configuration

4. Enter the server address and database name in the URI attribute

5. Set the "useambienttransaction" option to false in the bindings window and "Enablebiztalkcompatibilitymode" to True

6. Click OK to save

7. Click the Connect button

8. Select contract Type Choose client (Outbound Operations), select contacts in the category tables, select Insert, select, Update, and delete in the operation.

9. The Build wizard will generate the appropriate schema file and binding file

10. Build and deploy the project

3.3 Release schema for wcf-basichttp service

1. Click BizTalk WCF Service Publishing Wizard in the Visual Studio Tools menu.

2. Click Next

3. Select Wcf-basichttp in the transport type and choose to create the receive port in the BizTalk application that you just deployed

4. Select Publish schema as WCF service in Create law

5. Create a Select and insert method

6. Right-click on the corresponding request and output parameters of the method, select the schema type

7. Select the appropriate schema according to the command space

8. Configure the appropriate operation and parameter types

Enter the appropriate namespace

9. Enter the URL address to enable anonymous access

10. Confirm the configuration and click Create

11. Create complete

A corresponding receive port is created in the BizTalk application

13. Open IIS 7 Manager, create a new application pool Btsapppool, and change the running account to administrator

14. Modify the Wcf-sqldemo application's run pool to Btsapppool

15. Modify Web. config (default folder location: C:\inetpub\wwwroot\WCF-SQLDemo), turn on WSDL for getting the service via HTTP GET

<servicemetadata httpgetenabled= "true" httpsgetenabled= "false"/>

3.4 Configuring the Wcf-sql send Port

1. Right-click the BizTalk Administration Console application, right-select import binding

2. Select WcfSendPort_SqlAdapterBinding_Custom.bindinginfo.xml under the project folder

3. BizTalk will automatically generate a send port

4. Need to reconfigure the database user name and password in the Send port

5. Configure the send port for the send pipeline to Promotepipeline

6. Configure the subscription criteria in the configuration file for the send port, that is, the receive port name generated by the Wcf-basichttp Publishing Wizard:

7. For ease of testing, set the retry count and interval time for the Send Port transfer option to 0

3.5 Testing Services
    1. Start the Wcforacledemo application
    2. Open Soapui, create a new project, add the WSDL to the BTSORACLEWCF.SVC access address and get the WSDL

    1. Edit the appropriate insert, Select, update data, and request. The corresponding return data is received.

    1. Querying data using SQL Developer

3.6 Polling The Oracle database
    1. In BizTalk, right-click to select Build Project

    1. Using the adapter service

    1. In the adapter service configuration, click Configure, enter the user and password in the connection configuration, enter a unique digital ID in the polling identity in the URI attribute

11. Configure the polling command in the binding properties as: SELECT * from Contacts, set "Useambienttransaction" to False, "Enablebiztalkcompatibilitymode" to True

    1. Click OK to save and click Connect to access the Oracle database.
    2. Select the service (Inbound service) in the contract type and click the "/" root node and select POLLINGSTMG in the categories and actions available on the right.

    1. Click OK to save, the system will generate the corresponding polling schema and binding

    1. The generated bindings are imported into the application in the application in the BizTalk Administration Console, and the receive port is automatically configured

8. New send port to file type, subscribe to Oracle Polling data

9. Start polling the receive port in the file Send folder will automatically have the corresponding file

3.7 Oracle Database Scripting reference

CREATE TABLE CONTACTS

(

ID number (*, 0) not NULL

, NAME VARCHAR2 (BYTE) not NULL

, PHONE VARCHAR2 (BYTE)

, EMAIL VARCHAR2 (BYTE)

, IM VARCHAR2 (+ BYTE)

, ADDRESS VARCHAR2 (+ BYTE)

, CONSTRAINT CONTACTS_PK PRIMARY KEY

(

Id

)

ENABLE

)

Create or Replace

PROCEDURE Addcontact

(

PARAM0 in number

, PARAM1 in VARCHAR2

, PARAM2 in VARCHAR2

, PARAM3 in VARCHAR2

, PARAM4 in VARCHAR2

, PARAM5 in VARCHAR2

) as

BEGIN

Insert into CONTACTS(ID,NAME,PHONE,EMAIL,IM,ADDRESS) Values (PARAM0,PARAM1,PARAM2,PARAM3,PARAM4,PARAM5 );

END Addcontact;

BizTalk Hands-On Labs (12) wcf-oracle adapter use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.