Cisco Cisco Workload Automation 6.3 개발자 가이드

다운로드
페이지 24
5
Cisco Systems, Inc.
www.cisco.com
2
Web Services Procedures
This chapter describes how to generate the Cisco Workload Automation (CWA) Web Services SOAP API.
Overview
The CWA Web Services SOAP API is published through a Web Service Definition Language (WSDL) document and its 
associated schema. The WSDL file defines available Web Service operations, binding, and access end points. The 
schema file defines operation parameters and additional data types.
Setting Up the Client User
The CWA Web Services SOAP API leverages the same authentication mechanism as the Cisco Workload Automation 
Web UI. The login for the client program requires a combination of username and password known to the CWA. To 
implement authentication for your client, the easiest way is to utilize the standard BindingProvider API of JAX-WS as 
shown in the code snippet below. More details are available in the supplied sample client in 
<TESSoapClient>\src\com\tidalsoft\tesws\client\Console.java. 
TESWebService_Service tesws = new TESWebService_Service();
TESWebService teswsPort = tesws.getTESWebServicePort();
BindingProvider bindingProvider = (BindingProvider)teswsPort;
Map<String, Object> map = bindingProvider.getRequestContext();
map.put(BindingProvider.USERNAME_PROPERTYusername);
map.put(BindingProvider.PASSWORD_PROPERTYpassword);
Before carrying out each operation, the Web Services API validates the given user account against the security and object 
access policy that the user has defined in CWA to determine if the account has the privilege to perform that operation.
Generating the CWA Web Services SOAP API
This section describes how to generate the CWA Web Services SOAP API.
To generate the CWA Web Services SOAP API
1.
In a live CWA environment, go to the following websites to download the WSDL file and its associated schema files: 
http://<hostname>:<port>/api/<DSP Name>/webservice/TESWebService?WSDL
http://<hostname>:<port>/api/<DSP Name>/webservice/TESWebService_schema1.xsd
2.
Enter the following substitutions: