• No results found

pub.client:http

In document Integration Server Bis Reference (Page 68-73)

WmPublic. Issues an HTTP request that you specify and returns the HTTP response.

Input Parameters

account String Conditional. The user name for an account on the FTP server. The

account is defined in the FTP protocol to further identify the user that is identified by the username and password input variables.

transfertype String Data transfer mode (passive or active) used by this session.

encoding String Conditional. IANA character set used by this session. If encoding is

not returned, the encoding was not explicitly set and the default JVM encoding is in effect.

url String URL of the resource that you want to access. For example:

http://www.rubicon.com/orders/orders.html

Important! This string must begin with http: or https:.

method String Specifies the HTTP method you want to use. Valid values are:

delete get head options post put trace

loadAs String Optional. Form in which you want the http service to store the returned

document.

Set to... To...

bytes Default. Return the body of the response as a byte[ ]. Use this option

if the body will be used as input to a service that operates on whole HTML or XML documents (for example, pub.xml:queryXMLNode).

stream Return the body of the response as a java.io.InputStream. Use this option if the document will be used as input to a service that can process documents incrementally (for example, Usage Notes).

data Document Data that you want the http service to submit with the HTTP request.

Specify data using one or more of the following keys.

Important! When you use more than one key, args is appended first, table is appended

second, and string is appended last.

Key Description

args Document Optional. Name=value pairs that you want this service to

submit to the resource in url. You can use args to submit data via the POST, GET, or HEAD method.

To specify data using args, create one String element for each name=value pair that you want to submit, where the element’s name represents the name portion of the pair and the element’s value represents the value portion of the pair.

When you use args, the http service will automatically:

URL-encode name=value pair, so you do not need to URL- encode the values you specify in args.

Insert the “&” character between pairs, so you do not need to include it in args.

Prefix the entire query string with the “?” character if it submits the data in args via a GET or HEAD. You do not need to include this character in args.

When you submit data using args, the webMethods Integration Server automatically sets the value of the Content-Type header to

application/x-www-form-urlencoded.

If you want to explicitly specify a different Content-Type value, you must submit the value using the string or bytes variable.

table String Table Optional. Data that the http service will use to construct

a query string to submit to the resource specified in url.

table is similar to args, but it allows you to submit unnamed values in

a query string, not just name=value pairs.

To specify data using table, create one row for each value that you want to submit, where the contents of column 0 of the String Table represents the name portion of the pair (leave this column null to submit an unnamed value) and the contents of column 1 represents the value portion of the pair.

When you use table, the http service will automatically: URL-encode name=value pair, so you do not need to URL- encode the values you specify in table.

Insert the “&” character between the pairs (or unnamed values) that it constructs, so you do not need to include it in table. Prefix the entire query string with the “?” character if it submits the data in table via the GET method. You do not need to include this character in table.

When you submit data using table, the webMethods Integration Server automatically sets the value of the Content-Type header to

application/x-www-form-urlencoded. If you want to explicitly specify a different Content-Type, you must submit your data using the string or bytes variable.

string String Optional. Text that you want the http service to submit to the

resource in url. You can use string to submit data via the POST, GET, or HEAD method.

If you use string to submit data, make sure that you specify the string exactly as you want it presented in the HTTP request. (If you are using the GET or HEAD method, make sure you URL-encode the contents of string.)

Note: When you use string, the http service will automatically prefix

the entire query string with “?” if it submits the data in string via a GET or HEAD. You do not need to include this character in string. When performing a POST, string will be submitted to the resource defined by url as the body of the request message.

bytes byte[ ] Optional. Data that you want this service to submit to the

resource in url. You can use bytes to submit data via the POST method only.

Important! When you use bytes and another element (args, table, or string) to specify data, the service appends the data from the args, table, or string element to url. The service appends args to url first, table second, and string last. The service encodes the data from the bytes element in the body of the post. If the stream variable is not

null, bytes is ignored.

mimeStream java.io.InputStream Optional. MIME or SMIME message that you

want this service to submit to the resource in url. A mimeStream is created by the pub.mime:getEnvelopeStream, pub.smime:createEncryptedData, or pub.smime:createSignedData services. It contains both headers and content. The headers in the mimeStream are appended to the http headers.

You can use mimeStream to submit data via the POST method only.

stream java.io.InputStream Optional. Data that you want the http service to

submit to the resource in url. You can use stream to submit data via the POST method only.

Important! When you use stream and another element (args, table, string or bytes) to specify data, the service appends the data from the args, table, or string element to url. The service appends args to url

first, table second, and string last. The service encodes the data from the stream element in the body of the post. If the stream input is not null, the bytes input is ignored.

encoding String Optional. Character set in which the URL data parameters are

encoded (args or table and/or string). Encoding is required to

correctly convert the String object to bytes when generating the URL for a post. Specify an IANA-registered character set (for example,

ISO-8859-1).

If this variable is null, the default JVM encoding is used. Because

string is used in the body of the post and not used for building the

URL, you do not need to specify encoding for the data parameter

string.

auth Document Optional. Authorization information that the http service will submit if

the resource specified in url is protected.

Key Description

type String Type of authentication that you want this service to use when

Output Parameters

Usage Notes

If url begins with https:, you can use pub.security:setKeyAndChain to specify the certificate chain. If you

do not specify a certificate chain, pub.client:http uses the default outbound SSL certificate settings to authenticate the resources.

If pub.client:http does not receive a response within the timeout period specified in the server’s

watt.net.timeout parameter, it will throw an exception. For information about the

watt.net.timeout parameter, see the webMethods Integration Server Administrator’s Guide.

user String User name that this service will submit when requesting a

protected resource.

pass String Password associated with user.

headers Document Optional. Fields that you want to explicitly override in the HTTP request

header issued by the http service.

Specify a key in headers for each header field that you want to set, where the key’s name represents the name of the header field and the key’s value represents the value of that header field.

If you do not set headers, the http service uses its default header values.

encodedURL String The URL that was submitted by pub.client:http. This will contain any argument

set in args, table, or string.

header Document Conditional. HTTP response headers.

Key Description

lines Document Fields in the response header, where key names

represent field names and values represent field values.

status String HTTP status code of the response.

statusMessage String HTTP status message of the response.

body Document Body of the HTTP response.

Key Description

bytes byte[ ] Conditional. Body of the HTTP response represented as a

byte[ ]. bytes is returned only when the loadAs input parameter is set to bytes.

stream java.io.InputStream Conditional. The body of the HTTP response

represented as an InputStream. stream is returned only when the

In document Integration Server Bis Reference (Page 68-73)

Related documents