Implementation of ORCA example use case
This topic provides a process that you can use to implement the use case described in ORCA web service example use case.
Step 1
Use WDSL to execute the getProcessDescription
message. In addition to the values for user name and password, the request must include the values for <soa:gridName>
(grid name), and <soa:processName>
(the absolute process name).
Sample input for getProcessDescription message
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soa="http://bmc.com/ao/xsd/2008/09/soa">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>admin</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">admin123</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<soa:getProcessDescription>
<soa:gridName>Example_GRID</soa:gridName>
<soa:processName>: AutoPilot-AD-Utilities:Terminal:Command Line</soa:processName>
</soa:getProcessDescription>
</soapenv:Body>
</soapenv:Envelope>
Sample output from getProcessDescription message
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soa="http://bmc.com/ao/xsd/2008/09/soa">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>admin</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">admin123</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<soa:executeProcess>
<soa:gridName>Example_Grid</soa:gridName>
<soa:processName>:AutoPilot-AD-Utilities:Terminal:Command Line</soa:processName>
<soa:parameters>
<!--Optional:-->
<soa:Input>
<!--Zero or more repetitions:-->
<soa:Parameter>
<soa:Name required="true">adapter name</soa:Name>
<!--Optional:-->
<!--Optional:-->
<soa:Value soa:type="xs:string">
<!--Optional:-->
<!--Optional:-->
<soa:Text></soa:Text>
</soa:Value>
</soa:Parameter>
<soa:Parameter>
<soa:Name required="true">command</soa:Name>
<soa:Value soa:type="xs:string">
<soa:Text></soa:Text>
</soa:Value>
</soa:Parameter>
</soa:Input>
<!--Optional:-->
</soa:parameters>
</soa:executeProcess>
</soapenv:Body>
</soapenv:Envelope>
Step 2
Using the response in step 1, add the values for the following parameters: adapter name
and command
, as shown in the following example:
<soa:parameters>
<!--Optional:-->
<soa:Input>
<!--Zero or more repetitions:-->
<soa:Parameter>
<soa:Name required="true">adapter name</soa:Name>
<!--Optional:-->
<!--Optional:-->
<soa:Value soa:type="xs:string">
<!--Optional:-->
<!--Optional:-->
<soa:Text>CMD_CDP</soa:Text>
</soa:Value>
</soa:Parameter>
<soa:Parameter>
<soa:Name required="true">command</soa:Name>
<soa:Value soa:type="xs:string">
<soa:Text>ls</soa:Text>
</soa:Value>
</soa:Parameter>
</soa:Input>
<!--Optional:-->
</soa:parameters>
Step 3
Use the modified response as input to the executeProcess message. This XML document is the request that the external program must construct to communicate with the AutoPilot-AD-Utilities:Terminal:Command Line workflow. As shown in the following sample request, the <soa:Parameter>
element is modified to include the command input attribute:
<soa:Parameter>
<soa:Name required="true">command</soa:Name>
<soa:Value soa:type="xs:string">
<soa:Text>ls</soa:Text>
</soa:Value>
</soa:Parameter>
Complete request
The following code sample provides an example of a complete request.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soa="http://bmc.com/ao/xsd/2008/09/soa">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>admin</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">admin123</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<soa:executeProcess>
<soa:gridName>IMWGrid</soa:gridName>
<soa:processName>:AutoPilot-AD-Utilities:Terminal:Command Line</soa:processName>
<soa:parameters>
<!--Optional:-->
<soa:Input>
<!--Zero or more repetitions:-->
<soa:Parameter>
<soa:Name required="true">adapter name</soa:Name>
<!--Optional:-->
<!--Optional:-->
<soa:Value soa:type="xs:string">
<!--Optional:-->
<!--Optional:-->
<soa:Text>CMD_CDP</soa:Text>
</soa:Value>
</soa:Parameter>
<soa:Parameter>
<soa:Name required="true">command</soa:Name>
<soa:Value soa:type="xs:string">
<soa:Text>ls</soa:Text>
</soa:Value>
</soa:Parameter>
</soa:Input>
<!--Optional:-->
</soa:parameters>
</soa:executeProcess>
</soapenv:Body>
</soapenv:Envelope>
Response
The following code sample contains the results from the sample request. The <output>
element contains the results of the ls
command.
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns1:executeProcessResponse xmlns:ns1="http://bmc.com/ao/xsd/2008/09/soa">
<ns1:Output>
<ns1:Output>
<ns1:Parameter>
<ns1:Name>adapter response</ns1:Name>
<ns1:Value ns1:type="xs:anyType">
<ns1:XmlDoc>
<command-result>
<metadata>
<status>success</status>
</metadata>
<targets-output>
<target-output>
<metadata>
<os-id>Linux</os-id>
<os-version>2.6.9-55.0.2.ELsmp</os-version>
<os-arch>i386</os-arch>
<status>success</status>
</metadata>
<commands-output>
<command-output>
<metadata>
<command>ls</command>
<working-dir/>
<command-dir/>
<line-count>4</line-count>
<execution-milliseconds>120</execution-milliseconds>
<exit-code>0</exit-code>
<status>success</status>
</metadata>
<output>
<line index="1">bao.sh</line>
<line index="2">fix_perm.sh</line>
<line index="3">server.pid</line>
<line index="4">server.sh</line>
</output>
</command-output>
</commands-output>
</target-output>
</targets-output>
</command-result>
</ns1:XmlDoc>
</ns1:Value>
</ns1:Parameter>
</ns1:Output>
</ns1:Output>
</ns1:executeProcessResponse>
</S:Body>
</S:Envelope>
Comments
Log in or register to comment.