OverviewSingleDeprecated

jsx3.net

class Service

Object
->jsx3.lang.Object
  ->jsx3.net.Service

All Implemented Interfaces:

jsx3.util.EventDispatcher

class Service
extends jsx3.lang.Object
This class is used in conjunction with the XML Mapping Utility to provide transactional support for those services using XML-based messaging. Support includes those services defined via Schema, XML, XHTML, and WSDL (SOAP). In practice a developer would open General Interface™ Builder to access the XML Mapping Utility. They would then point the utility at a "pattern master" (i.e., WSDL, Schema, XML, etc) and begin using its visual tools to bind application objects to nodes in the XML messages to be sent and received. The output from the Mapping Utility is referred to as a mapping rule set. This rule set is an XML document based upon the Common Exchange Format (CXF) and defines the information necessary to support transactional data mapping. Many of the APIs available to the Service class allow the devloper to dynamically update various static values that were set using the XML Mapping Utility.

Field Summary
static String
ON_ERROR
event type for unsuccessful response
static String
ON_INVALID
Event type published each time a rule with one or more restrictions fails during message generation.
static String
ON_PROCESS_RULE
Event type published each time a mapping rule is used to create a node, locate a node, or map to a node.
static String
ON_SUCCESS
event type for successful response
static String
ON_TIMEOUT
Event type published when the response is still not ready after the specified timeout period.
Constructor Summary
void
init(strRulesURL : String, strOperationName : String, strOutboundURL : String, strInboundURL : String)
instance initializer
Method Summary
void
Deprecated. Renamed to setRequestHeader.
jsx3.xml.Document
Compiles the CXF rules for this service instance to an equivalent XSLT document.
boolean
doCall(bCancelIfInvalid : boolean)
Generates the request message (if applicable) and sends to the remote service.
void
Applies all inbound mappings, using the server response document as the source for the operation.
String
Gets the URL for the service endpoint where the request will be sent
jsx3.xml.Document
Call this method after the service has responded to get a parsed instance of the server's XML response
String
Gets the URL for a "typical", XML-formatted server resonse document.
String
Gets the method for the request.
jsx3.Boolean
Gets the mode (static jsx3.Boolean.FALSE or live jsx3.Boolean.TRUE).
String
Gets the namespace for the server/project to run the service instance within.
void
Deprecated. Renamed to getOperationName.
String
Gets the name of the operation to use within a multi-operation rules file.
jsx3.xml.Document
Call this method after 'doCall' has been called to get a parsed instance of the request document--what was actually sent to the remote service
String
Gets XPath address for the node in the outbound stub document to which to append the generated message.
String | null
Gets URL for the base stub to use for the request message (the XML document to contain the generated document)
String
Gets URL for a 'typical' XML-formatted request document to send to the server; when this is set, the mapper does not even attempt to generate a document.
jsx3.net.Request
Gets the jsx3.net.HttpRequest instance that performs the transaction with the remote service (the transport object for the message).
String
Gets the URL for the rules file to use (a CXF document).
jsx3.xml.Document
Returns the rules document used by the Service instance (a CXF document)
jsx3.app.Server
Returns the server that this service runs in, as set by the setNamespace() method.
jsx3.xml.Document
getServiceMessage(MESSAGETYPE : String, strShellURL : String)
Gets the request message specific to the MESSAGETYPE (input, output, fault).
int
Gets the HTTP response code (i.e.
void
Deprecated. Renamed to getOutboundStubURL.
String
Returns a CR-LF delimited list of supported namespaces and thei related prefix (as defined by the Object, jsx3.net.Service.ns).
String
Gets user name to send as part of the http request (for servers requiring http authentication)
String
Gets password to send as part of the http request (for servers requiring http authentication)
static void
Deprecated.
jsx3.xml.Document
Deprecated. The WSDL is no longer relevant to the Service class as the rules file will contain all information necessary to generate and process the Service interaction.
jsx3.net.Service
Resets the rules tree to default state (with all 'skip' flags removed) from those rules that were skipped during the previous transaction
jsx3.net.Service
Dereferences the parsed rules tree (a jsx3.xml.Document instance) managed by this Service instance, forcing a reload of the document from disk the next time the rules document is requested
jsx3.net.Service
setEndpointURL(strAlternateURL : String)
Sets the URL for the service endpoint where the request will be sent.
void
Sets a parsed instance of the response document as soon as it returns from the server returned from the service; otherwise null
jsx3.net.Service
setInboundURL(strInboundURL : String)
Sets the URL for a "typical", XML-formatted server resonse document.
void
setMethod(METHOD : String)
Sets the method for the request different than the one described in the rules file.
void
Sets the mode (static jsx3.Boolean.FALSE or live jsx3.Boolean.TRUE).
jsx3.net.Service
Sets the namespace for the server/project to run the service instance within.
jsx3.net.Service
setOnError(vntItem : String | Object | Function)
Deprecated. Use jsx3.EventDispatcher interface instead with event type jsx3.net.Service.ON_ERROR.
jsx3.net.Service
Deprecated. Use jsx3.EventDispatcher interface instead with event type jsx3.net.Service.ON_SUCCESS.
void
Deprecated. Renamed to setOperationName.
jsx3.net.Service
setOperationName(strOperationName : String)
Sets the name of the operation to use within a multi-operation rules file.
jsx3.net.Service
Sets the document that will serve as the container for the message generated by doCall and/or getServiceMessage.
jsx3.net.Service
Sets XPath address for the node in the outbound stub document to which to append the generated message.
jsx3.net.Service
Sets the URL to the document that will serve as the container for the message generated by doCall and/or getServiceMessage.
jsx3.net.Service
setOutboundURL(strOutboundURL : String)
Sets the URL for a static XML-formatted request document to send to the Service.
void
setRequestHeader(strName : String, strValue : String)
Sets an HTTP Request header on the request.
jsx3.net.Service
setRulesURL(strRulesURL : String)
Sets the URL for the rules file to use (a CXF document).
void
Deprecated. Renamed to setEndpointURL.
void
setStatus(intStatus : int)
Sets the HTTP response code (i.e.
void
Deprecated. Renamed to setOutboundStubURL.
jsx3.net.Service
setTimeout(intTimeout : int, objHandler : Object | String | function, objFunction : function | String)
Specifies how long to wait for the service to respond before cancelling the call.
jsx3.net.Service
setTimeouts(intResolveTimeout : int, intConnectTimeout : int, intSendTimeout : int, intReceiveTimeout : int)
Deprecated. Due to browser security constraints, this method is no longer used. Use setTimeout instead. This method no longer affects any aspect of the Service call.
jsx3.net.Service
setUserName(strName : String)
Sets the user name to send with the posting (for those sites requiring http authentication)
jsx3.net.Service
setUserPass(strPass : String)
Sets the password to send with the posting (for those sites requiring http authentication)
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf, toString
Field Detail

ON_ERROR

static final String ON_ERROR
event type for unsuccessful response

ON_INVALID

static final String ON_INVALID
Event type published each time a rule with one or more restrictions fails during message generation. The following named properties are available on the event object:

ON_PROCESS_RULE

static final String ON_PROCESS_RULE
Event type published each time a mapping rule is used to create a node, locate a node, or map to a node.

ON_SUCCESS

static final String ON_SUCCESS
event type for successful response

ON_TIMEOUT

static final String ON_TIMEOUT
Event type published when the response is still not ready after the specified timeout period.
Constructor Detail

init

void init(strRulesURL : String, strOperationName : String, strOutboundURL : String, strInboundURL : String)
instance initializer

Parameters:

strRulesURLThe resolved URI for the rules document (a CXF document). Note: since this class is lazily loaded as of v3.2, the preferred method of instantiating this class is by calling the loadResource method on the context server (jsx3.app.Server) instance. This ensures proper URL resolution while also establishing the appropriate server context.
strOperationNamename of operation to call. This is only required if the rules file was generated via a WSDL.
strOutboundURLaddress of a sample outbound message to use as opposed to the one generated by the tool
strInboundURLwhen the project is run in static mode (as defined by the 'project deployment options' dialog), this document is used to simulate a typical server response
Method Detail

addHeader

void addHeader()
Deprecated. Renamed to setRequestHeader.

compile

jsx3.xml.Document compile()
Compiles the CXF rules for this service instance to an equivalent XSLT document. This enables much faster performance than using the DOM-based iterator (default) to convert the XML response document into a CDF Document type. Note that this process only supports the map types CDF Document, CDF Record, and CDF Attribute. Only one CDF Document can be declared per Operation. Otherwise the compilation will fail. All other mapping types will be ignored and will not be converted into an XSLT equivalent. Also note that the order of a set of sibling mapping rules does not proscribe proper processing by way of sequence. This means that any order of sibling mapping rules will result in appropriate processing, regardless of the sibling node order returned from the given service. This facilitates nested record structures in that attributes can first be applied to a given record before child elements (e.g., a 'record') are added. Stated otherwise, any rule that has a descendant rule that would created a nested 'record' node should follow all sibling mapping rules that would create an 'attribute' entity. Call this method immediately before/after doCall for best performance.

Returns:

XSLT document  

doCall

boolean doCall(bCancelIfInvalid : boolean)
Generates the request message (if applicable) and sends to the remote service.

Parameters:

bCancelIfInvalidIf true, the remote service will not be called if the message does not pass validation while being generated.

Returns:

true if the message passed all validation rules while being generated.  

doInboundMap

void doInboundMap()
Applies all inbound mappings, using the server response document as the source for the operation. Although this method is called once automatically, it can be called at any time to reapply the mapping rules. Example usage: var oService = new jsx3.net.Service(); oService.setInboundDocument(objSomeDocumentIManuallyWantToLoad); oService.doInboundMap();

getEndpointURL

String getEndpointURL()
Gets the URL for the service endpoint where the request will be sent

Returns:

 

getInboundDocument

jsx3.xml.Document getInboundDocument()
Call this method after the service has responded to get a parsed instance of the server's XML response

Returns:

 

getInboundURL

String getInboundURL()
Gets the URL for a "typical", XML-formatted server resonse document. This document is then used when the project is run in static mode (as defined by the Project Deployment Options).

Returns:

 

getMethod

String getMethod()
Gets the method for the request. Default is POST

Returns:

one of: GET or POST  

getMode

jsx3.Boolean getMode()
Gets the mode (static jsx3.Boolean.FALSE or live jsx3.Boolean.TRUE).

Returns:

 

getNamespace

String getNamespace()
Gets the namespace for the server/project to run the service instance within. If a namespace isn't provided, the system will look for the first application and use its namespace. If no applications exist, the namespace will be completely ignored.

Returns:

 

getOperation

void getOperation()
Deprecated. Renamed to getOperationName.

getOperationName

String getOperationName()
Gets the name of the operation to use within a multi-operation rules file. Note: Rules created via a WSDL often have multiple named operations. Rules files generated without a WSDL contain no named operations, and instead use a single transaction.

Returns:

 

getOutboundDocument

jsx3.xml.Document getOutboundDocument()
Call this method after 'doCall' has been called to get a parsed instance of the request document--what was actually sent to the remote service

Returns:

 

getOutboundStubPath

String getOutboundStubPath()
Gets XPath address for the node in the outbound stub document to which to append the generated message.

Returns:

Valid XSL path  

getOutboundStubURL

String | null getOutboundStubURL()
Gets URL for the base stub to use for the request message (the XML document to contain the generated document)

Returns:

 

getOutboundURL

String getOutboundURL()
Gets URL for a 'typical' XML-formatted request document to send to the server; when this is set, the mapper does not even attempt to generate a document. Instead, this document is sent directly to the server without any processing. Useful for testing requests that never change

Returns:

 

getRequest

jsx3.net.Request getRequest()
Gets the jsx3.net.HttpRequest instance that performs the transaction with the remote service (the transport object for the message).

Returns:

 

getRulesURL

String getRulesURL()
Gets the URL for the rules file to use (a CXF document). This rules file will be used by the Service instance to generate, send, receive and process XML messages

Returns:

 

getRulesXML

jsx3.xml.Document getRulesXML()
Returns the rules document used by the Service instance (a CXF document)

Returns:

 

getServer

jsx3.app.Server getServer()
Returns the server that this service runs in, as set by the setNamespace() method.

Returns:

 

See Also:

setNamespace()

getServiceMessage

jsx3.xml.Document getServiceMessage(MESSAGETYPE : String, strShellURL : String)
Gets the request message specific to the MESSAGETYPE (input, output, fault). Typically only used for input (outbound) messages, but can be used for simulating a server response for output and fault (in the case of a SOAP transaction, fault) messages

Parameters:

MESSAGETYPEone of: input, output, or fault. If this value is provided, the server will generate test data for all nodes lacking a mapped or scripted value
strShellURLrelative URL to message shell to use as the starting container to put content into. Note that calling setOutboundStubURL or setOutboundStubDocument in conjunction with setOutboundStubPath are preferred to passing this parameter, since they provide much greater control. Also note that this value is stored statically in the rules document when the rules document is first created via the XML Mapping Utility.

Returns:

 

getStatus

int getStatus()
Gets the HTTP response code (i.e., 200, 404, 500, etc). This will be the response code provided by the bound jsx3.net.Request instance used for the transport. However, if setStatus has been called on the Service instance, the value supplied by the developer will be used instead.

Returns:

 

getStubURL

void getStubURL()
Deprecated. Renamed to getOutboundStubURL.

getSupportedNamespaces

String getSupportedNamespaces()
Returns a CR-LF delimited list of supported namespaces and thei related prefix (as defined by the Object, jsx3.net.Service.ns). Any nodes in a rules document (CXF) that implements one of the namespaces listed by this function, should implement the corresponding namespace prefix as also detailed here.

Returns:

 

getUserName

String getUserName()
Gets user name to send as part of the http request (for servers requiring http authentication)

Returns:

 

getUserPass

String getUserPass()
Gets password to send as part of the http request (for servers requiring http authentication)

Returns:

 

getVersion

static void getVersion()
Deprecated.
Gets the release/build for the class (i.e., "2.2.00") @ returns {String}

getWSDL

jsx3.xml.Document getWSDL()
Deprecated. The WSDL is no longer relevant to the Service class as the rules file will contain all information necessary to generate and process the Service interaction.
Gets the parsed WSDL (what was used as the original input to create the rules file being used by this service instance).

Returns:

 

resetRules

jsx3.net.Service resetRules()
Resets the rules tree to default state (with all 'skip' flags removed) from those rules that were skipped during the previous transaction

Returns:

reference to self  

resetRulesTree

jsx3.net.Service resetRulesTree()
Dereferences the parsed rules tree (a jsx3.xml.Document instance) managed by this Service instance, forcing a reload of the document from disk the next time the rules document is requested

Returns:

reference to self  

setEndpointURL

jsx3.net.Service setEndpointURL(strAlternateURL : String)
Sets the URL for the service endpoint where the request will be sent. Overrides the endpoint specified in the rules file.

Parameters:

strAlternateURL

Returns:

reference to self  

setInboundDocument

void setInboundDocument(objXML : jsx3.xml.Document)
Sets a parsed instance of the response document as soon as it returns from the server returned from the service; otherwise null

Parameters:

objXML

setInboundURL

jsx3.net.Service setInboundURL(strInboundURL : String)
Sets the URL for a "typical", XML-formatted server resonse document. This document is then used when the project is run in static mode (as defined by the Project Settings dialog). Overrides the static setting in the rules file.

Parameters:

strInboundURLAlternate URL for the "typical" Service response. Note that this URL will be resolved relative to the context server. For example, if the project directory for the context server is 'test', then the following inputs (all of which are valid) are equivalent: jsxapp://test/xml/typical.xml, and xml/typical.xml, and JSXAPPS/test/xml/typical.xml

Returns:

reference to self 

See Also:

setMode()

setMethod

void setMethod(METHOD : String)
Sets the method for the request different than the one described in the rules file.

Parameters:

METHODone of: GET or POST

setMode

void setMode(MODE : jsx3.Boolean)
Sets the mode (static jsx3.Boolean.FALSE or live jsx3.Boolean.TRUE). Overrides the default setting for the context Server instance within which this Service instnace is running. (NOTE: This setting is accessible at the server level via the Project Settings dialog.) Setting this value to jsx3.Boolean.FALSE, forces a test document to be used to simulate a "typical" server response, instead of actually sending a request to a remote service. This is useful when setting up test environments as well as providing "live" interactions when the remote server may not be available.

Parameters:

MODE

See Also:

setInboundURL()

setNamespace

jsx3.net.Service setNamespace(namespace : jsx3.app.Server | String)
Sets the namespace for the server/project to run the service instance within.

Parameters:

namespacethe server (preferred) or the namespace of the server.

Returns:

this object  

setOnError

jsx3.net.Service setOnError(vntItem : String | Object | Function)
Deprecated. Use jsx3.EventDispatcher interface instead with event type jsx3.net.Service.ON_ERROR.
sets the script that will fire after the service has failed; if a soap fault envelope is returned, this will be processed as would any mapped tree. Allows for object repaints, cleanup, etc.

Parameters:

vntItemeither a script (as string) to execute via eval or a function that will be notified. Note: this function will receive a single parameter, a reference to this jsx3.net.Service instance

Returns:

reference to self 

setOnSuccess

jsx3.net.Service setOnSuccess(vntItem : String | Object | Function)
Deprecated. Use jsx3.EventDispatcher interface instead with event type jsx3.net.Service.ON_SUCCESS.
Sets the script that will fire after the service has finished an inbound mapping or a function to callback to; allows for object repaints, cleanup, etc

Parameters:

vntItemeither a script (as string) to execute via eval or a function that will be notified when the service call completes. Note: this function will receive a single parameter, a reference to this jsx3.net.Service instance

Returns:

reference to self 

setOperation

void setOperation()
Deprecated. Renamed to setOperationName.

setOperationName

jsx3.net.Service setOperationName(strOperationName : String)
Sets the name of the operation to use within a multi-operation rules file. Note: Rules created via a WSDL often have multiple operations

Parameters:

strOperationNameoperation name

Returns:

reference to self  

setOutboundStubDocument

jsx3.net.Service setOutboundStubDocument(objDocument : jsx3.xml.Document)
Sets the document that will serve as the container for the message generated by doCall and/or getServiceMessage. This is a useful way to dynamically assemble documents by chaining multiple service instances, using the output from one service as the input to another. For example, when a SOAP Envelope requires both a SOAP Header as well as a SOAP Body, this method allows the Envelope to be assembled via a two-step process of first adding mapped content to the Body, followed by a call to add mapped content to the Header. Note that this method takes precedence over the static stub document url referenced in the rules file as well as any call to setOutboundStubURL. Use this method in conjunction with setOutboundStubPath to point to theer, a reference to this jsx3.net.Service instance

Returns:

reference to self 

setOnSuccess

jsx3.net.Service setOnSuccess(vntItem : String | Object | Function)
Deprecated. Use jsx3.EventDispatcher interface instead with event type jsx3.net.Service.ON_SUCCESS.
Sets the script that will fire after the service has finished an inbound mapping or a function to callback to; allows for object repaints, cleanup, etc

Parameters:

vntItemeither a script (as string) to execute via eval or a function that will be notified when the service call completes. Note: this function will receive a single parameter, a reference to this jsx3.net.Service instance

Returns:

reference to self 

setOperation

void setOperation()
Deprecated. Renamed to setOperationName.

setOperationName

jsx3.net.Service setOperationName(strOperationName : String)
Sets the name of the operation to use within a multi-operation rules file. Note: Rules created via a WSDL often have multiple operations

Parameters:

strOperationNameoperation name

Returns:

reference to self  

setOutboundStubDocument

jsx3.net.Service setOutboundStubDocument(objDocument : jsx3.xml.Document)
Sets the document that will serve as the container for the message generated by doCall and/or getServiceMessage. This is a useful way to dynamically assemble documents by chaining multiple service instances, using the output from one service as the input to another. For example, when a SOAP Envelope requires both a SOAP Header as well as a SOAP Body, this method allows the Envelope to be assembled via a two-step process of first adding mapped content to the Body, followed by a call to add mapped content to the Header. Note that this method takes precedence over the static stub document url referenced in the rules file as well as any call to setOutboundStubURL. Use this method in conjunction with setOutboundStubPath to point to the specific location in the document where the generated message should be appended.

Parameters:

objDocument

Returns:

reference to self 

See Also:

setOutboundStubPath(), setOutboundStubURL()

setOutboundStubPath

jsx3.net.Service setOutboundStubPath(strPath : String)
Sets XPath address for the node in the outbound stub document to which to append the generated message. Overrides the static setting in the rules file.

Parameters:

strPathValid XSL path. For example, /SOAP-ENV:Envelope/SOAP-ENV:Body

Returns:

reference to self 

See Also:

setOutboundStubDocument(), setOutboundStubURL()

setOutboundStubURL

jsx3.net.Service setOutboundStubURL(strURL : String)
Sets the URL to the document that will serve as the container for the message generated by doCall and/or getServiceMessage. Overrides the static setting stored in the rules file. Use this method in conjunction with setOutboundStubPath to point to the specific location in the document where the generated message should be appended.

Parameters:

strURLURL for the document. Note that this URL will be resolved relative to the context server. For example, if the project directory for the context server is 'test', then the following inputs (all of which are valid) are equivalent: jsxapp://test/xml/typical.xml, and xml/typical.xml, and JSXAPPS/test/xml/typical.xml

Returns:

reference to self 

See Also:

setOutboundStubPath()

setOutboundURL

jsx3.net.Service setOutboundURL(strOutboundURL : String)
Sets the URL for a static XML-formatted request document to send to the Service. Note that when this is set, the mapper does not even attempt to generate a request document via the rules file. Instead, the static request document is sent directly to the remote Service without any processing. This is useful for requests that never change or as a means to test whether a Service is working, using a known, valid input.

Parameters:

strOutboundURLAlternate URL for the static request to send. Note that this URL will be resolved relative to the context server. For example, if the project directory for the context server is 'test', then the following inputs (all of which are valid) are equivalent: jsxapp://test/xml/typical.xml, and xml/typical.xml, and JSXAPPS/test/xml/typical.xml

Returns:

reference to self  

setRequestHeader

void setRequestHeader(strName : String, strValue : String)
Sets an HTTP Request header on the request. Set before calling, doCall()

Parameters:

strNamename for header parameter
strValuevalue for the header parameter

setRulesURL

jsx3.net.Service setRulesURL(strRulesURL : String)
Sets the URL for the rules file to use (a CXF document). This rules file will be used by the Service instance to generate, send, receive and process XML messages

Parameters:

strRulesURL

Returns:

reference to self  

setServiceURL

void setServiceURL()
Deprecated. Renamed to setEndpointURL.

setStatus

void setStatus(intStatus : int)
Sets the HTTP response code (i.e., 200, 404, 500, etc). Typically, the Service instance determines this value by querying the bound request instance (jsx3.net.Request) returned by the method, [service_instance].getRequest(). However, calling this method will override normal operation by forcing a valid/invalid state that affects methdods relying on the HTTP status such as doInboundMap. This is particularly useful for SOAP services that provide alternate processing instructions and mappings when a Fault occurs as well as when running tests in Static mode.

Parameters:

intStatus

setStubURL

void setStubURL()
Deprecated. Renamed to setOutboundStubURL.

setTimeout

Parameters:

intStatus

setStubURL

void setStubURL()
Deprecated. Renamed to setOutboundStubURL.

setTimeout

jsx3.net.Service setTimeout(intTimeout : int, objHandler : Object | String | function, objFunction : function | String)
Specifies how long to wait for the service to respond before cancelling the call. Subscribes to the ON_TIMEOUT event

Parameters:

intTimeoutnumber of milliseconds to wait befor publishing the ON_TIMEOUT event.
objHandlerif an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
objFunctionif objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance

Returns:

reference to self  

setTimeouts

jsx3.net.Service setTimeouts(intResolveTimeout : int, intConnectTimeout : int, intSendTimeout : int, intReceiveTimeout : int)
Deprecated. Due to browser security constraints, this method is no longer used. Use setTimeout instead. This method no longer affects any aspect of the Service call.
Specifies timeout settings for resolving the domain name, establishing the connection to the server, sending the data, and receiving the response. The timeout parameters of the setTimeouts method are specified in milliseconds, so a value of 1000 would represent 1 second. A value of zero represents an infinite timeout. There are four separate timeout parameters: resolveTimeout, connectTimeout, sendTimeout, and receiveTimeout. When calling the setTimeouts method, all four values must be specified. The timeouts are applied at the Winsock layer.

Parameters:

intResolveTimeoutThe value is applied to mapping host names (such as "www.microsoft.com") to IP addresses; the default value is infinite, meaning no timeout.
intConnectTimeoutThe value is applied to establishing a communication socket with the target server, with a default timeout value of 60 seconds.
intSendTimeoutThe value applies to sending an individual packet of request data (if any) on the communication socket to the target server. A large request sent to a server will normally be broken up into multiple packets; the send timeout applies to sending each packet individually. The default value is 5 minutes.
intReceiveTimeoutThe value applies to receiving a packet of response data from the target server. Large responses will be broken up into multiple packets; the receive timeout applies to fetching each packet of data off the socket. The default value is 60 minutes.

Returns:

reference to self 

setUserName

jsx3.net.Service setUserName(strName : String)
Sets the user name to send with the posting (for those sites requiring http authentication)

Parameters:

strNameuser name

Returns:

reference to self  

setUserPass

jsx3.net.Service setUserPass(strPass : String)
Sets the password to send with the posting (for those sites requiring http authentication)

Parameters:

strPasspassword for user

Returns:

reference to self