Table of Contents

Search

  1. Preface
  2. Web Service Concepts
  3. Understanding the Web Services Provider
  4. Using the Web Services Hub Console
  5. Batch Web Service Operations
  6. Writing Client Applications
  7. Working with Web Service Sources and Targets
  8. Editing Web Service Sources and Targets
  9. Working with Web Service Mappings
  10. Working with Web Service Workflows
  11. Appendix A: Web Service Sample Client Applications
  12. Appendix B: Configure the Web Browser

Web Services Provider Guide

Web Services Provider Guide

Parameter Array Definition

Parameter Array Definition

The parameter definition in a SOAP request consists of the scope, name, and value of the parameter. When the Integration Service runs the workflow or task, it uses the parameters in an array the same way it uses parameters in a parameter file.
The WSDL contains the following definition for the parameter array elements:
<complexType name="Parameter">    <sequence>       <element name="Scope" type="xsd:string" />       <element name="Name" type="xsd:string" />       <element name="Value" type="xsd:string" />    </sequence> </complexType> <complexType name="ParameterArray">    <sequence>       <element maxOccurs="unbounded" minOccurs="0" name="Parameters"                nillable="true" type="impl:Parameter" />    </sequence> </complexType>
For example, a parameter file has the following parameters:
[s_m_A] $a=1 $b=2 $c=3 [WSH_Folder.s_m_B] $d=4
The SOAP request for a web service call to the StartWorkflow operation with the same parameters in a parameter array would include the following elements:
<StartWorkflow> …    <Parameters>       <Parameter>          <Scope>s_m_A</Scope>          <Name>$a</Name>          <Value>1</Value>       </Parameter>       <Parameter>          <Scope>s_m_A</Scope>          <Name>$b</Name>          <Value>2</Value>       </Parameter>       <Parameter>          <Scope>s_m_A</Scope>          <Name>$c</Name>          <Value>3</Value>       </Parameter>       <Parameter>          <Scope>WSH_Folder.s_m_B</Scope>          <Name>$d</Name>          <Value>4</Value>       </Parameter> … </StartWorkflow>
The WorkflowRequest and TaskRequest types contain ParameterArray elements. You can specify any number of parameters in a parameter array.
The following sample code from a web service client application in Axis shows how to create the parameter array in a WorkflowRequest:
Parameter[] parameters = new Parameter[4]; Parameter param1 = new Parameter(); Param1.setScope(“s_m_A”); Param1.setName($a”); Param1.setValue(“1”); Parameters[0] = param1; Parameter param2 = new Parameter(); Param2.setScope(“s_m_A”); Param2.setName(“$b”); Param2.setValue(“2”); Parameters[1] = param2; Parameter param3 = new Parameter(); Param3.setScope(“s_m_A”); Param3.setName(“$c”); Param3.setValue(“3”); Parameters[2] = param3; Parameter param4 = new Parameter(); Param4.setScope(“WSH_Folder.s_m_B”); Param4.setName(“$d”); Param4.setValue(“4”); Parameters[3] = param4; WorkflowRequest wfReq = new WorkflowRequest(); wfReq.setParameters(parameters);
You can use parameter arrays in the following operations:
  • startWorkflow
  • startWorkflowFromTask
  • recoverWorkflow
  • startTask

0 COMMENTS

We’d like to hear from you!