Skip to Content

第五章 一个简单的小例子 – 接上文

第六步 IR中导入我们在SLD中定义的software组件

/wp-content/uploads/2012/08/14_125133.jpg

导入之后创建命名规范

/wp-content/uploads/2012/08/15_125134.jpg

/wp-content/uploads/2012/08/16_125135.jpg

可以看到,在该命名规范下会产生以下四个东东:

/wp-content/uploads/2012/08/17_125136.jpg

我们先来定义接口对象 Interface Objects

  • 创建数据类型:

     /wp-content/uploads/2012/08/18_125137.jpg

发送结构:

/wp-content/uploads/2012/08/19_125138.jpg

接受结构:

/wp-content/uploads/2012/08/20_125139.jpg

  • 创建消息类型:

/wp-content/uploads/2012/08/21_125140.jpg

/wp-content/uploads/2012/08/22_125141.jpg

  • 创建消息接口:

/wp-content/uploads/2012/08/23_125142.jpg

/wp-content/uploads/2012/08/24_125143.jpg

  • 创建消息的映射关系:

     /wp-content/uploads/2012/08/25_125144.jpg

  • 创建接口的映射关系:

     /wp-content/uploads/2012/08/26_125145.jpg

第七步:定义ID

  • 创建场景:

     /wp-content/uploads/2012/08/27_125146.jpg

  • 创建业务服务 Business Service, 并指定发送和接收方

/wp-content/uploads/2012/08/28_125147.jpg

/wp-content/uploads/2012/08/29_125148.jpg

/wp-content/uploads/2012/08/30_125149.jpg

  • 创建通道,指定adapter,定义发送路径:

/wp-content/uploads/2012/08/31_125150.jpg

    /wp-content/uploads/2012/08/32_125151.jpg

  • 创建发送方协议 sender agreement

          /wp-content/uploads/2012/08/33_125152.jpg

  • 创建接收方决定方法 receiver determination

          /wp-content/uploads/2012/08/34_125153.jpg

  • 创建接口决定方法 interface determination

          /wp-content/uploads/2012/08/35_125154.jpg

  • 创建接收方协议 receiver agreement

          /wp-content/uploads/2012/08/36_125155.jpg

  • 测试配置:

     /wp-content/uploads/2012/08/37_125156.jpg

  • 激活所有更改:

    /wp-content/uploads/2012/08/38_125157.jpg

第八步: 测试该接口

创建文件input.xml,并将文件放到发送文件夹下,文件内容:

<?xml version="1.0" encoding="UTF-8"?>
<ns0:mt_ob xmlns:ns0="http://bob.com/file">
   <First_line>first line<First_line/>
   <Second_line>second line<Second_line/>
 <date>20111215<date/>
</ns0:mt_ob>

启动接口发送文件,监控接口

/wp-content/uploads/2012/08/39_125158.jpg

检查接收方文件夹

/wp-content/uploads/2012/08/40_125159.jpg

<?xml version="1.0" encoding="UTF-8"?>
<ns0:mt_ib xmlns:ns0="http://bob.com/file">
<line_2>second line</line_2>
<Line_1>first line</Line_1>
<Line_3>2011/12/15</Line_3>
</ns0:mt_ib>

遇到的问题:

  1. 权限:请注意文件要放到<SID>adm用户有权限的目录下
  2. 发送方交流通道不通:重新启动File adapter 方法:进入VM,重新启动
To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply