Appearance
WebService流程 
流程是所有控件的基类容器,其余控件不允许单独拖拽至空白画布中,需要先将WebService流程拖拽至画布中,然后再将组件拖拽至WebService流程中。
一个WebService流程即为一个WebService接口。
同一项目中的WebService接口的服务描述都位于同一wsdl文件下,wsdl文件访问url为:http://服务器地址:6636/项目url前缀?wsdl
业务属性 
| 属性 | 含义 | 
|---|---|
| text | 与控件关联的文本 | 
| input | 请求参数格式 | 
| output | 返回参数格式 | 
WebService的出入参可以是基础类型数据(如string、int、boolean),也可以是自定义的复杂结构数据。
- input - 属性 - 含义 - 说明 - 输入限定 - 示例 - elementName - 元素名称 - soap封装中输入内容的节点命名 - 常量- Request - parameters - 参数 - 定义Web方法中的输入参数,包括 
 参数名称、参数个数、参数类型- 常量
- output - 属性 - 含义 - 说明 - 输入限定 - 示例 - elementName - 元素名称 - soap封装中输出内容的节点命名 - 常量- Response - parameters - 参数 - 定义Web方法中的输出参数,包括 
 参数名称、参数个数、参数类型- 常量
- parameters:
| 属性 | 说明 | 输入限定 | 示例 | 
|---|---|---|---|
| 参数名 | 入参参数名定义后,可在流程 中使用该名称直接引用该参数 | 常量 | inputParam1 | 
| 参数类型 | Object代表该参数的类型为自定义类型,可自定义类型的结构 | 选择值 | Object | 
| 是否数组 | 选择值 | 否 | |
| 操作 | 添加子节点:参数类型为Object时可操作,为参数类型添加属性 删除所有子节点:参数类型为Object时可操作,删除该自定义类型的所有属性并重置参数类型 移除此参数:删除该参数的定义 | 
WebService 输出 
使用SoapReturn控件输出,该控件中的输出内容需严格按照WebService流程的output中的参数定义来设置。
使用实例 
假设需要提供一个WebService接口:
入参要求:有两个输入参数,并且这两个输入参数都为自定义类型,内含string类型的属性name
输出要求:输出字符串
- WebService流程设置
soap封装中输入输出内容的节点名配置:将input和output属性的elementName属性分别设为SayHelloRequest和SayHelloResponse

入参配置: 展开 input 属性的 parameters 属性,为两个自定义类型入参设置参数名为requestParam1和requestParam2,两个参数类型都含有一个类型为string的属性name

出参配置: 展开 output 属性的 parameters 属性,设置参数名为responseData,数据类型为string

- 拼接输出结果
添加StringFormat控件,输出值命名为responseStr
expression属性:Hello,%s and %s;input属性:#{requestParam1.name},#{requestParam2.name}
requestParam1和requestParam2为WebService流程中定义的输入参数,可直接引用

- 输出结果
添加SoapReturn控件,dataFormat属性设置为:
xml
<responseData>#{responseStr}</responseData><responseData>#{responseStr}</responseData>
responseData为WebService流程中定义的输出参数,输出必须包含该节点

- WebService调用
获得wsdl文件:将流程发布至引擎后即可访问wsdl文件,访问路径:http://服务器地址:6636/项目url前缀?wsdl

http请求方式调Web方法:
根据wsdl文件对Web方法的描述,构建出请求体和请求url
获得http请求体,并替换两个入参参数为Tom和Jerry:
xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:orap="http://www.orapis.com/">
   <soapenv:Header><a>1</a></soapenv:Header>
   <soapenv:Body>
      <orap:SayHelloRequest>
         <orap:requestParam1>
            <orap:name>Tom</orap:name>
         </orap:requestParam1>
         <orap:requestParam2>
            <orap:name>Jerry</orap:name>
         </orap:requestParam2>
      </orap:SayHelloRequest>
   </soapenv:Body>
</soapenv:Envelope><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:orap="http://www.orapis.com/">
   <soapenv:Header><a>1</a></soapenv:Header>
   <soapenv:Body>
      <orap:SayHelloRequest>
         <orap:requestParam1>
            <orap:name>Tom</orap:name>
         </orap:requestParam1>
         <orap:requestParam2>
            <orap:name>Jerry</orap:name>
         </orap:requestParam2>
      </orap:SayHelloRequest>
   </soapenv:Body>
</soapenv:Envelope>使用http请求访问该Web方法:
$ curl -X POST "http://localhost:6636/api/sayHello" -H "Content-Type: text/xml;charset=UTF-8" -d "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:orap=\"http://www.orapis.com/\"> <soapenv:Header/> <soapenv:Body> <orap:SayHelloRequest> <orap:requestParam1> <orap:name>Tom</orap:name> </orap:requestParam1> <orap:requestParam2> <orap:name>Jerry</orap:name> </orap:requestParam2> </orap:SayHelloRequest> </soapenv:Body> </soapenv:Envelope>"$ curl -X POST "http://localhost:6636/api/sayHello" -H "Content-Type: text/xml;charset=UTF-8" -d "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:orap=\"http://www.orapis.com/\"> <soapenv:Header/> <soapenv:Body> <orap:SayHelloRequest> <orap:requestParam1> <orap:name>Tom</orap:name> </orap:requestParam1> <orap:requestParam2> <orap:name>Jerry</orap:name> </orap:requestParam2> </orap:SayHelloRequest> </soapenv:Body> </soapenv:Envelope>"http返回参数:
xml
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <SayHelloResponse>
         <responseData>Hello,Tom and Jerry</responseData>
      </SayHelloResponse>
   </soap:Body>
</soap:Envelope><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <SayHelloResponse>
         <responseData>Hello,Tom and Jerry</responseData>
      </SayHelloResponse>
   </soap:Body>
</soap:Envelope>