You can define a Web Service (WEB_SERV) job to call an operation within a web service.
Note: To run these jobs, your system requires CA WA Agent for UNIX, Linux, or Windows and CA WA Agent for Web Services.
Required Statements
To define a Web Service job, you must specify the following statements:
Optional Statements
You can specify the following optional statements for a Web Service job:
Note: In a Web Service job, if you specify the WSDL_URL statement but not the ENDPOINT_URL statement, you must specify both the SERVICENAME and PORTNAME statements.
Example: Get a Company Stock Quote
Suppose that you want to invoke a web service that returns a company stock quote. The URL for the WSDL that describes the web service and its location is http://www.webservicex.com/stockquote.asmx?WSDL. The WSDL port name within the target namespace http://www.webserviceX.NET is StockQuoteSoap. The target endpoint address URL is http://www.webservicex.com/stockquote.asmx. The job calls the operation GetQuote within the StockQuote web service. When the job invokes the web service, the company's stock symbol is passed to the operation. The GetQuote operation returns a java.lang.String object, which maps to the XML type string in the return namespace http://www.webserviceX.NET/. When the job completes, the stock quote for CA is stored as a serialized Java object in the job's spool directory.
AGENT WSAGENT TARGETNAMESPACE http://www.webserviceX.NET/ SERVICENAME StockQuote PORTNAME StockQuoteSoap OPERATION GetQuote WSDL_URL http://www.webservicex.com/stockquote.asmx?WSDL ENDPOINT_URL http://www.webservicex.com/stockquote.asmx PARAMETER TYPE(xsd:string) VALUE(CA) RETURNCLASS java.lang.String RETURNXML string RETURNNAMESPACE http://www.webserviceX.NET/
Example: Validate an Email Address in a Web Service Job
Suppose that you want to invoke a web service that validates an email address. The URL for the WSDL that describes the web service and its location is http://www.webservicex.net/ValidateEmail.asmx?wsdl. The job calls the IsValidEmail operation within the ValidateEmail web service. When the job invokes the web service, the email address is passed to the operation. If the email address is valid, the operation returns true and the job completes successfully. If the email address is invalid, the operation returns false and the job fails.
AGENT WSAGENT TARGETNAMESPACE http://www.webservicex.net SERVICENAME ValidateEmail PORTNAME ValidateEmailSoap OPERATION IsValidEmail WSDL_URL http://www.webservicex.net/ValidateEmail.asmx?wsdl PARAMETER TYPE(xsd:string) VALUE(john.smith@example.com) RETURNCLASS java.lang.Boolean RETURNXML boolean RETURNNAMESPACE http://www.webservicex.net FILTER true
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|