# Class: XmlRpcRequest

## jala.XmlRpcRequest(url, methodName)

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

## Constructor

#### new XmlRpcRequest(url, methodName)

A constructor for XmlRpc request objects

##### Parameters:

Name | Type | Description
--- | --- | ---
`url` | String | The url of the XmlRpc entry point
`methodName` | String | The name of the method to call

Source:
  - jala/code/XmlRpcRequest.js, line 45

##### Returns:

A newly created jala.XmlRpcRequest instance

### Methods

#### debug()

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

Source:
  - jala/code/XmlRpcRequest.js, line 252

##### Returns:

True if debugging is enabled, false otherwise

#### execute()

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

Source:
  - jala/code/XmlRpcRequest.js, line 270

##### Returns:

The result of this XmlRpc request

#### getCredentials()

Returns the credentials of this request

Source:
  - jala/code/XmlRpcRequest.js, line 136

##### Returns:

The base46 encoded credentials of this request

#### getInputEncoding()

Returns the input encoding

Source:
  - jala/code/XmlRpcRequest.js, line 223

##### Returns:

The input encoding used by this request

#### getMethodName()

Returns the name of the remote function to call

Source:
  - jala/code/XmlRpcRequest.js, line 181

##### Returns:

The name of the remote function

#### getOutputEncoding()

Returns the output encoding

Source:
  - jala/code/XmlRpcRequest.js, line 232

##### Returns:

The output encoding used by this request

#### getProxy()

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

Source:
  - jala/code/XmlRpcRequest.js, line 115
See:
  - #setProxy

##### Returns:

The proxy to use for this request

#### getReadTimeout()

Returns the socket timeout of this request

Source:
  - jala/code/XmlRpcRequest.js, line 172

##### Returns:

The socket timeout value in milliseconds

#### getTimeout()

Returns the connection timeout of this request

Source:
  - jala/code/XmlRpcRequest.js, line 163

##### Returns:

The connection timeout value in milliseconds

#### getUrl()

Returns the URL of this request

Source:
  - jala/code/XmlRpcRequest.js, line 68

##### Returns:

The URL of this request

#### setCredentials(username, password)

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`username` | String | The username
`password` | String | The password

Source:
  - jala/code/XmlRpcRequest.js, line 125

#### setDebug(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:

Name | Type | Description
--- | --- | ---
`flag` | Boolean | True or false.

Source:
  - jala/code/XmlRpcRequest.js, line 242

#### setEncoding(enc)

Sets both input and output encoding to the specified encoding string

##### Parameters:

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

Source:
  - jala/code/XmlRpcRequest.js, line 192

#### setInputEncoding(enc)

Sets the input encoding to the specified encoding string

##### Parameters:

Name | Type | Description
--- | --- | ---
`enc` | String | The encoding to use for input. This must be a valid java encoding string.

Source:
  - jala/code/XmlRpcRequest.js, line 203

#### setOutputEncoding(enc)

Sets the output encoding to the specified encoding string

##### Parameters:

Name | Type | Description
--- | --- | ---
`enc` | String | The encoding to use for output. This must be a valid java encoding string.

Source:
  - jala/code/XmlRpcRequest.js, line 213

#### setProxy(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:

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

Source:
  - jala/code/XmlRpcRequest.js, line 80

#### setReadTimeout(millis)

Sets the socket timeout to the specified milliseconds.

##### Parameters:

Name | Type | Description
--- | --- | ---
`millis` | Number | The timeout to use as socket timeout

Source:
  - jala/code/XmlRpcRequest.js, line 153

#### setTimeout(millis)

Sets the connection timeout to the specified milliseconds.

##### Parameters:

Name | Type | Description
--- | --- | ---
`millis` | Number | The timeout to use as connection timeout

Source:
  - jala/code/XmlRpcRequest.js, line 144

#### (static) argumentsToString(args)

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`args` | Object | An arguments array

Source:
  - jala/code/XmlRpcRequest.js, line 451

##### Returns:

The arguments array formatted as string

#### (static) convertArgument(obj)

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

##### Parameters:

Name | Type | Description
--- | --- | ---
`obj` | Object | The Javascript object to convert

Source:
  - jala/code/XmlRpcRequest.js, line 370

##### Returns:

The appropriate Java representation of the object

#### (static) convertResult(obj)

Converts a Java object into its appropriate Javascript representation.

##### Parameters:

Name | Type | Description
--- | --- | ---
`obj` | java.lang.Object | The Java object to convert

Source:
  - jala/code/XmlRpcRequest.js, line 412

##### Returns:

The appropriate Javascript representation of the Java object