zoukankan      html  css  js  c++  java
  • PipeLine学习笔记(二) 使用Xml Disassemble【转】

    你将学会

    1.       创建Schema

    2.       创建PipeLine

    3.       使用Xml disassemble

    4.       测试Pipeline

    5.        

     

    用例介绍

    将输入Xml文件分解成文档Xml

    输入

    <Customers>

        <Customer>

            <CustomerID>1</CustomerID>

            <Name>xuzhong</Name>

        </Customer>

        <Customer>

            <CustomerID>2</CustomerID>

            <Name>yangerkf</Name>

        </Customer>

        <Customer>

            <CustomerID>3</CustomerID>

            <Name>xxx</Name>

        </Customer>

    </Customers>



    输出

    每一个子节点

    File1

    <Customer>

        <CustomerID>1</CustomerID>

        <Name>xuzhong</Name>

    </Customer>

    File2

    <Customer>

        <CustomerID>2</CustomerID>

        <Name>yangerkf</Name>

    </Customer>

    File3

    <Customer>

        <CustomerID>3</CustomerID>

        <Name>xxx</Name>

    </Customer>

    Step by step

    1.       创建解决方案



    2.       创建项目



    3.       创建Envelope Schema


    (1)Target Namespace设置成空 ,因为输入的Xml没有定义Namespace

    (2)设置Envelope(信封)属性为Yes()



    (3)定义Node

    (4)修改CustomersDocument XPath属性,如图配置




    (5)修改CustomerData structure Type属性为xs:anyType




    4.       创建Document Schema



    (1)修改Target Namespace为空,因Document中无Namespace

    (2)添加如图的Node


    5.       测试Schema是否符合Pipeline要求

    (1)生成Envelope测试实例,创建文件Test.xml,内容为用例内容,保存到项目目录中



    (2)运行xmldasm.exe测试Schema定义是否有效

    (3)如果看到了这样的结果,那么就表明定义的Schema是正确的,如果有其它错误信息,基本上者是schema定义的有问题



    6.       创建Pipeline

    (1)创建CustomerPipeline.btp

    (2)添加Xml disassemble

    (3)配置Document Schema SchemaDocument.xsd

    (3)配置Evnelope Schema SchemaEnvelope.xsd




    7.       创建Orchestration

    (1)创建一个Orchestration

    (2)创建一个接收端口,接收数据类型为SchemaDocument,使用后期绑定端口

    (3)部署

    (4)配置接收端口,配置接收PipelineCustomerPipeline

    (5)这样,接收的SchemaSchemaEnvelope,但输入的到Orchestration中的SchemaSchemaDocument

    时间原因,不进行演示了

    这是我2005-02-16写的文档,现在将它发布到我的blog中。

  • 相关阅读:
    (转)Fiddler 教程
    (转)Web自动化测试之12306火车票网站自动登录工具
    (转)用c#来写个木马程序吧
    (转)windows phone 7 用户控件页面跳转
    (转)自学Windows Phone 7随笔
    (转)Windows Phone7页面导航
    (转)Asp.net生成htm静态文件的两种途径
    (转)HTTP协议详解
    (转)Web自动化测试之12306火车票网站自动登录工具
    收录一些位运算的技巧(不断更新)
  • 原文地址:https://www.cnblogs.com/cxd4321/p/901896.html
Copyright © 2011-2022 走看看