Overview | File | Class | Tree | Index | Help
| Jala 1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class jala.XmlRpcRequest

    Object
       |
       +--jala.XmlRpcRequest

class jala.XmlRpcRequest

Instances of this class provide the necessary functionality for issueing XmlRpc requests to a remote service.
Defined in XmlRpcRequest.js

Constructor Summary
`jala.XmlRpcRequest (<String> url, <String> methodName)` A constructor for XmlRpc request objects

Method Summary
`Boolean` | `debug()` Returns true if debug is enabled for this request, false otherwise
`Object` | `execute()` Calling this method executes the remote method using the arguments specified.
`String` | `getCredentials()` Returns the credentials of this request
`String` | `getInputEncoding()` Returns the input encoding
`String` | `getMethodName()` Returns the name of the remote function to call
`String` | `getOutputEncoding()` Returns the output encoding
`java.net.Proxy` | `getProxy()` Returns the proxy object.
`Number` | `getReadTimeout()` Returns the socket timeout of this request
`Number` | `getTimeout()` Returns the connection timeout of this request
`java.net.URL` | `getUrl()` Returns the URL of this request
`void` | `setCredentials(<String> username, <String> password)` Sets the credentials for basic http authentication to use with this request.
`void` | `setDebug(<Boolean> flag)` Enables or disables the debug mode.
`void` | `setEncoding(<String> enc)` Sets both input and output encoding to the specified encoding string
`void` | `setInputEncoding(<String> enc)` Sets the input encoding to the specified encoding string
`void` | `setOutputEncoding(<String> enc)` Sets the output encoding to the specified encoding string
`void` | `setProxy(<String> proxyString)` Sets the proxy host and port.
`void` | `setReadTimeout(<Number> millis)` Sets the socket timeout to the specified milliseconds.
`void` | `setTimeout(<Number> millis)` Sets the connection timeout to the specified milliseconds.
`<static> String` | `argumentsToString(<Object> args)` Helper method to format an arguments array into a string useable for debugging output.
`<static> java.lang.Object` | `convertArgument(<Object> obj)` Helper method for converting a Javascript object into its appropriate Java object.
`<static> Object` | `convertResult(<java.lang.Object> obj)` Converts a Java object into its appropriate Javascript representation.

Constructor Detail

### jala.XmlRpcRequest

    jala.XmlRpcRequest(<String> url, <String> methodName)

A constructor for XmlRpc request objects

Parameters:

`url` - The url of the XmlRpc entry point

`methodName` - The name of the method to call

Returns:

A newly created jala.XmlRpcRequest instance

Method Detail

### debug

    Boolean debug()

Returns true if debug is enabled for this request, false otherwise

Returns:

True if debugging is enabled, false otherwise

### execute

    Object execute()

Calling this method executes the remote method using the arguments specified.

Returns:

The result of this XmlRpc request

### getCredentials

    String getCredentials()

Returns the credentials of this request

Returns:

The base46 encoded credentials of this request

### getInputEncoding

    String getInputEncoding()

Returns the input encoding

Returns:

The input encoding used by this request

### getMethodName

    String getMethodName()

Returns the name of the remote function to call

Returns:

The name of the remote function

### getOutputEncoding

    String getOutputEncoding()

Returns the output encoding

Returns:

The output encoding used by this request

### getProxy

    java.net.Proxy getProxy()

Returns the proxy object. This method will only return a value if using a java runtime > 1.5

Returns:

The proxy to use for this request

See:

- setProxy()

### getReadTimeout

    Number getReadTimeout()

Returns the socket timeout of this request

Returns:

The socket timeout value in milliseconds

### getTimeout

    Number getTimeout()

Returns the connection timeout of this request

Returns:

The connection timeout value in milliseconds

### getUrl

    java.net.URL getUrl()

Returns the URL of this request

Returns:

The URL of this request

### setCredentials

    void setCredentials(<String> username, <String> password)

Sets the credentials for basic http authentication to use with this request.

Parameters:

`username` - The username

`password` - The password

### setDebug

    void setDebug(<Boolean> flag)

Enables or disables the debug mode. If enabled the xml source of both request and response is included in the result properties 'requestXml' and 'responseXml'

Parameters:

`flag` - True or false.

### setEncoding

    void setEncoding(<String> enc)

Sets both input and output encoding to the specified encoding string

Parameters:

`enc` - The encoding to use for both input and output. This must be a valid java encoding string.

### setInputEncoding

    void setInputEncoding(<String> enc)

Sets the input encoding to the specified encoding string

Parameters:

`enc` - The encoding to use for input. This must be a valid java encoding string.

### setOutputEncoding

    void setOutputEncoding(<String> enc)

Sets the output encoding to the specified encoding string

Parameters:

`enc` - The encoding to use for output. This must be a valid java encoding string.

### setProxy

    void setProxy(<String> proxyString)

Sets the proxy host and port. For Java runtimes < 1.5 this method sets the appropriate system properties (so this has an effect on all requests based on java.net.URL), for all others the proxy is only set for this request.

Parameters:

`proxyString` - The proxy string in the form 'fqdn:port' (eg. my.proxy.com:3128)

### setReadTimeout

    void setReadTimeout(<Number> millis)

Sets the socket timeout to the specified milliseconds.

Parameters:

`millis` - The timeout to use as socket timeout

### setTimeout

    void setTimeout(<Number> millis)

Sets the connection timeout to the specified milliseconds.

Parameters:

`millis` - The timeout to use as connection timeout

### argumentsToString

    <static> String argumentsToString(<Object> args)

Helper method to format an arguments array into a string useable for debugging output.

Parameters:

`args` - An arguments array

Returns:

The arguments array formatted as string

### convertArgument

    <static> java.lang.Object convertArgument(<Object> obj)

Helper method for converting a Javascript object into its appropriate Java object.

Parameters:

`obj` - The Javascript object to convert

Returns:

The appropriate Java representation of the object

### convertResult

    <static> Object convertResult(<java.lang.Object> obj)

Converts a Java object into its appropriate Javascript representation.

Parameters:

`obj` - The Java object to convert

Returns:

The appropriate Javascript representation of the Java object

Overview | File | Class | Tree | Index | Help
| Jala 1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Tue May 29 10:26:15 2007