1 course Introduction
Familiarize yourself with the development and testing techniques of map through this course
2. Preparations
- Familiar with XML, XML schema, XSLT, and other related XML Development Technologies
- Create a blank BizTalk Project
- Demo
3.1 basic operations
- Open the mapdev Solution
- Create a map ing in the mapdev Project
- Select mapdev. inputpo and mapdev. outputpo for the ing source and target respectively.
4. Connect the ing between the ing source and the target, as shown in. The loop component is in the advanced functoids on the toolbar.
5. Right-click the ing file and select test map.
6. The output information is displayed in the output window of Visual Studio. Click the corresponding output file to view the mapped file.
3.2 use the script Module
- Drag the scripting of advanced functoids to the ing area, and connect the source date and target date to both sides of scripts.
- Double-click the scripting module. In the Script Type configured in the script module, select inline c133 and copy the C # script in formatscript.txt under the testdatafolder to the inline script input box.
- In the input configuration, add an input parameter with the value yyyy/mm/dd to reformat the date value of the input message.
- Refer to 3.1.5 for testing. In the output file, we can see that the value of the date field in the mapped file has been converted according to the new format.
3.3 test map XSLT
- Right-click the map file and select debug map.
- Visual Studio starts the XSLT debugging mode. The debugging method is similar to. Net code development.
3.4 use external Methods
- Create a C # class library project maphelper under the mapdev solution directory.
- Modify the maphelper attribute and add the btsdev. SNK signature,
- Copy the following code to call "% vs100comntools % vsvars32.bat" in the Post-build event command line"
Gacutil/UF $ (targetname)
Gacutil/if $ (targetname)
- Add the following code to the class file:
Public class common
{
Public string format (string paramdate, string paramexpress)
{
String responsedate = paramdate;
Try
{
Datetime strdate = convert. todatetime (paramdate );
Responsedate = strdate. tostring (paramexpress );
}
Catch {}
Return responsedate;
}
}
- Generate a project and reference it in the mapdev project. Click scripting in map to delete the inline script configured by the script module.
- Select the external class library as the Script Type and select the method just created
- Test the script to verify that the output is correct.
Biztalk hands-on Experiment (5) map development and testing