Previous Topic: TABLENAME Statement—Specify the Name of the Table to MonitorNext Topic: TARGETOSTYPE Statement—Specify the Remote Operating System Type


TARGETNAMESPACE Statement—Specify a Target Namespace

The TARGETNAMESPACE statement specifies the target namespace in a Web Service job.

Supported Job Type

This statement is required for the Web Service job type.

Syntax

This statement has the following format:

TARGETNAMESPACE target_namespace
target_namespace

Specifies the target namespace used for the names of messages, port type, binding, and services defined in the WSDL for the web service. Complex data types such as arrays require the target namespace.

Limits: Up to 256 characters; case-sensitive

Note: Enclose values that contain delimiters (such as spaces) in double quotation marks.

Example: Specify Target Namespace for Getting 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/