Policies and techniques using BizTalk Adatper for Web Service

zhaozj2021-02-16  60

In the EAI solution using BizTalk Adapter for Web Service, different, separated components are integrated together to complete unified business logic. In the solution, various components must work well. There are two key principles (Key Princi) allows your BizTalk solution to be perfect:

KP1: When building a solution, each step is tested;

KP2: The front end begins to advance to the rear end, or the last end of the bus begins and advances forward, step by step. Each time a step incremental development is guaranteed to be used after an incremental solution.

The following describes, and guides the skills.

1. Back-to-front strategy

Strategy from the backend to the front end

When using the BizTalk Adapter for Web Service solution, the development of the backend is a better policy. Because this solution is usually complex by providing a Web Method interface. At the beginning, the first thing is the process of environmental inspection backend outside the BizTalk Server (Process). If you can perform an independent test (Stand-Alone Test) is a very good way.

1.1 Component Tactics

Component skills

When actual combat, you need to test before the component is assembled to BizTalk. Here are some optimization suggestions and check-in recommendations:

If you use XLANG Schedule to connect the rear process (Process), you can use the COM component as a bridge. The COM component can be a third party's adapter component (Adapter) or a custom component. No matter that, please test control, such as: Visual Basic Scripts to make a unit test.

If you use a message port (Messaging Port) to connect the backend third-party components or custom AIC, create a test message port and channel (CHANNEL) is much better than using Visual Basic Script. Here is how to create a test message port, the step of the channel:

1) Create a message port (template) using AIC as a transport port (TAPOR);

2) The channel can use null documents as a source document and destination document, and no mapping (MAP) definitions are required.

3) Use BizTalk Editor to generate a legal implementation (instance) document;

4) Remove the copy of the SubmitSync.vbs, so that the document is submitted to the channels described earlier;

5) Use the browser to drag and drop the document to be submitted to SubmitSync.vbs, BizTalk Messaging Service will transfer the document to AIC and return a reply document. (This VBS will reply to the files written to the same name)

For custom-developed components, regardless of the AIC or COM, interactive Debug is useful. The following is a debug technology steps:

1) In the development environment, set breakpoints to set the project to Debug mode;

2) To ensure that BizTalk Messaging Service does not load a non-Debug version AIC, you must stop and restart BizTalk Messaging Service; (You can use RestartBTs.cmd) 3) If xlang schedule uses your components you are debug, you may need to stop All running xlang schedule. (You can use XLANG Event Monitor)

So, you can start

1.2 Document Tactics

Document skills

In order to avoid errors that the wrong document implementation is recommended, it is recommended that you test your documentation and its definition. The following points are if the decision of the document error brings an error:

Use BizTalk Editor to generate a document.

When using an example document to test, use the BizTalk Editor to check the document format and then test. (For details, please refer to BizTalk Help: Validate a document instance)

Similarly, if you have made any document definition, you need to re-use.

If you make a change in document definition, the corresponding mapping file also needs to change, the relevant BizTalk entity, such as: channel, envelope, XLANG Schedule, etc. need to change, refresh, and recompile. You can follow the following:

1) Update all mappings using BizTalk Mapper;

2) Use btm_refresh.exe to update the BizTalk entity; (you can find this program in ... / program files / massaging samples / refresh messaging manager)

3) Use OrcheStration Design to open the update, recompile XLANG Schedule.

1.3 Orchestration Tactics

Row

XLANG Schedule can be tested in real time, here is recommended:

BizTalk Orchestration Designer can compile after all the action (Action) is connected to the implementation.

Use the XLANG Event Monitor to monitor the scheduled operation.

Using Windows 2000 Event Viewer, an event monitor is monitored.

2. Front-to-back statategy

Strategy from the front end to the backend

It is also possible to start working from the front end. Possible cases start from Web Service and Web Method, then get the channel, message port, document definition mapping via BizTalk Messaging Service. When you use the front end to the back-end policy, you don't have to use the method in the strategy to the front end.

2.1 BizTalk Messaging Services Tactics

BizTalk Message Service Skills

You can't work directly through the BizTalk Adapter for Web Service, because you need a reply (REQEST) document definition, and to generate the requirements of Web Method, you also need to define channels. The following is what you want to do before you connect Web Method and channels:

Get or create a call (response) document definition.

Create a message port. When testing, the ResponseFile component (in the included example) can be used.

Create a channel. The channel can be configured to define a document to make the call document format or the mapping file formatting unit in the configuration of the channel. To test the channel and message port separately, you can drag and drop the test document to SubmitSync.vbs to submit a call and display a reply. Of course, you need to customize SubmitSync.vbs to make it adapt to your channel, port, and document definition.

If you configure the channel without using a document definition, or there is no school inspection document, you can consider adding this feature and retest the channel before connecting it to the Web Method.

2.2 BizTalk Adapter for Web Service Tactics

BizTalk Web Service Special Adapter Skills

When the channel and message port are ready, you can create Web Method to submit a call to the channel. It is important to understand the "Web Service Administration" as a design tool to a management tool. This means that you cannot use this tool to work if you successfully create a Web Method, you can't use this tool for the wrong positioning (Troubleshoot).

2.3 USING THE BIZTALK Adapter Trace UTILITY TOOL

Use the BizTalk Adapter Tracking Tool Set

If you are confident that you need to make an error positioning for BizTalk Adatper For Web Service, you can use "BizTalk Adapter Trace Utility" to collect details in data exchange in the operating status. (For details, please refer to the "Running the BizTalk Adapter Utility" section in BizTalk Adapter for Web Service Help)

3. Closing the loop

closed loop

After completing the research learning "Front-to-back" and "back-to-front" strategy. You can mix two methods in the actual application of the whole process. The strategy of "backend to the front end" typically stops at the message port, and the AIC and SOC used in this message port. You can use a test framework to activate AIC or SOC, or you can use a dedicated channel and message channel to test.

The "front end to the backend" policy is usually associated with a message port in a test AIC, and this AIC is associated with a message port. In the test of software product design, you can use the AIC or SoC used by the product to replace the test AIC.

It can be seen that AIC or SOC associated with the message channel is a combination point you blend in two ways strategies. When you blend two strategies, this closed loop and the closed-loop implementation have completed business logic in the form of Web Method.

-end-

转载请注明原文地址:https://www.9cbs.com/read-19227.html

New Post(0)