VoltoWFO Web Form Objects Component
Introduction
User Guide
Object Model
Technical Reference
Download
Buy a License
Other Volto Components
|
|
|
|
| Product Name |
VoltoWFO Web Form Objects Component |
| Function |
Automates processing of web forms |
| File Name |
VoltoWFO.dll |
| File Size |
108.0KB (110,592 bytes) |
| Current Version |
V1.0 |
| Release Date |
12-APR-2002 |
| Component Type |
ActiveX DLL |
| ProgID |
VoltoWFO.WFO |
| CLSID |
B1788D0E-C153-4E9A-BE98-F29E012301D0 |
| DLL Base Address |
&H48300000 |
| Prerequisites |
Visual Basic 6.0 runtime |
| License Price |
$19.95 |
|
|
|
|
WFO
This object provides methods and properties to create forms as FormObject objects.
The following table describes the object's methods:
| Method | Description |
| CreateForm |
Creates a FormObject object. |
| ProductLicense |
Enables unrestricted product functionality. |
| ProxySettings |
Configures HTTP proxy server settings. |
The following table describes the object's properties:
| Property | Description |
| FormObjects |
Collection of FormObject objects. |
| ProductVersion |
Version number of this component. |
| Timeout |
Timeout for HTTP form submission. |
| UserAgent |
User Agent identification sent with HTTP requests. |
FormObjects
This is a collection of FormObject objects representing Forms.
The following table describes the object's methods:
| Method | Description |
| Add |
Adds a FormObject object to the collection. |
| Count |
Returns the number of FormObject objects in the collection. |
| Item |
Returns a specific FormObject object. |
| Remove |
Removes a specific FormObject object from the collection. |
FormObject
This object represents a Form and provides methods and properties to add items to the Form as
FormItem objects and to submit the form. Multiple FormObject objects can be created
in the FormObjects collection of the WFO object.
The following table describes the object's methods:
| Method | Description |
| CreateItem |
Creates a FormItem object. |
| Submit |
Submits a Form. |
The following table describes the object's properties:
| Property | Description |
| FormItems |
Collection of FormItem objects. |
| HTTPstatus |
HTTP status returned after submitting a Form. |
| ID |
The Form identifier. |
| Method |
The method to be used to submit the Form. |
| Response |
The server response after submitting a Form. |
| URL |
The URL to which the Form is to be submitted. |
FormItems
This is a collection of FormItem objects representing items on a Form.
The following table describes the object's methods:
| Method | Description |
| Add |
Adds a FormItem object to the collection. |
| Count |
Returns the number of FormItem objects in the collection. |
| Item |
Returns a specific FormItem object. |
| Remove |
Removes a specific FormItem object from the collection. |
FormItem
This object represents an item on a Form. Multiple FormItem objects can be created in
the FormItems collection of a FormObject object.
The following table describes the object's properties:
| Property | Description |
| ID |
The Form item identifier. |
| Value |
The Form item value. |
|
|
|
Add
Adds an object to a collection.
Syntax
object.Add obj
The Add method has the following parts:
| Part |
Description |
| object |
A FormObjects or FormItems collection. |
| obj |
A FormObject or FormItem object. |
Count
Returns the number of objects in a collection.
Syntax
object.Count
The Count method has the following parts:
| Part |
Description |
| object |
A FormObjects or FormItems collection. |
CreateForm
Creates and returns a new FormObject object. Each object consists of an ID, a URL and an
HTTP method.
Syntax
object.CreateForm (ID, Method, URL)
The CreateForm method has the following parts:
| Part |
Description |
| object |
An instance of the WFO object. |
| ID |
The ID for the new FormObject object. |
| Method |
The HTTP method by which the form represented by the new FormObject is
to be submitted. This is one of the WFOMethods submit method constants. Valid values
are:
| Constant |
Value |
Description |
| mPost |
1 |
POST method. |
| mGet |
2 |
GET method. |
|
| URL |
The URL to which the form represented by the new FormItem object will be
submitted when calling the Submit method. |
Remarks
When submitting a form with the POST method, the data will be sent as URL-encoded form data. When
submitting as form with the GET method, the form data will be included as a query string following
the URL.
CreateItem
Creates and returns a new FormItem object. Each object consists of an ID and Value.
Syntax
object.CreateItem (ID, Value)
The CreateItem method has the following parts:
| Part |
Description |
| object |
A FormObject object. |
| ID |
The ID for the new FormItem object. |
| Value |
The value for the new FormItem object. |
Item
Returns a specific member of a collection either by position or by key. Either a
FormObject or FormItem object is returned.
Syntax
object.Item (Index)
The Item method has the following parts:
| Part |
Description |
| object |
A FormObjects or FormItems collection. |
| Index |
An expression that specifies the position of a member of the collection. If a
numeric expression, Index must be a number from 1 to the value of the collection's
Count property. If a string expression, Index must correspond to the ID
property of a member of the collection. |
Remarks
If the value provided as Index doesn’t match any existing member of the collection, an error
occurs.
The Item method is the default method for a collection. Therefore, the following lines of code
are equivalent:
Print objWFO.FormObjects(1).ID
Print objWFO.FormObjects.Item(1).ID
ProductLicense
Unlocks full component functionality when a valid Serial Number and License Key pair is
given. The Serial Number and License Key, together with a license file, are provided when
purchasing a license for this component. Returns a boolean value - true if a valid
Serial Number and License Key were entered, or false otherwise.
Syntax
object.ProductLicense (SerialNo, LicenseKey)
The ProductLicense method has the following parts:
| Part |
Description |
| object |
A WFO object. |
| SerialNo |
String value specifying a valid Serial Number. |
| LicenseKey |
String value specifying a valid License Key. |
Remarks
Call this method once only, immediately after creating the object, in order to
unlock full component functionality. If you do not make a successful call to this
method, then only restricted, evaluation mode functionality will be available.
Note that the license file provided to licensed users must be present in the
same directory as that in which the component has been installed. This file must also
be distributed with compiled applications and copied to the appropriate directory by
the application's setup utility.
ProxySettings
Configures the settings for connections via an HTTP Proxy Server.
Syntax
object.ProxySettings ProxyServer, ProxyPort [,ProxyUserName] [,ProxyPassword]
The ProxySettings method has the following parts:
| Part |
Description |
| object |
A WFO object. |
| ProxyServer |
Required. Value specifying the proxy server address. Note: Leave this blank if not
connecting via a proxy server - if this value is not null, VoltoWFO will attempt to connect via the
specified proxy. |
| ProxyPort |
Required. Value specifying the proxy server port. Default value is 80. |
| ProxyUserName |
Optional. String value specifying the username required to access a proxy server. Set
this value for proxy servers that require authentication. |
| ProxyPassword |
Optional. String value specifying the password required to access a proxy server. Set
this value for proxy servers that require authentication. |
Remove
Removes a specific member of a collection.
Syntax
object.Remove Index
The Remove method has the following parts:
| Part |
Description |
| object |
A FormObjects or FormItems collection. |
| Index |
An expression that specifies the position of a member of the collection. If a
numeric expression, Index must be a number from 1 to the value of the collection's
Count property. If a string expression, Index must correspond to the ID
property of a member of the collection. |
Submit
Submits a form.
Syntax
object.Submit
The Submit method has the following parts:
| Part |
Description |
| object |
A FormObject object representing the form to be submitted. |
|
|
|
HTTPStatus
Returns the HTTP status code and text returned by the web server following a form submission
using the Submit method.
Syntax
object.HTTPStatus
The HTTPStatus property has the following parts:
| Part | Description |
| object |
A FormObject object. |
ID
Sets or returns the ID of a FormObject or FormItem object.
Syntax
object.ID [= strID]
The Timeout property has the following parts:
| Part | Description |
| object |
A FormObject or FormItem object. |
| strID |
Value specifying the ID. |
Method
Sets or returns the HTTP method by which a form represented by a FormObject is to
be submitted.
Syntax
object.ID [= method]
The Method property has the following parts:
| Part | Description |
| object |
A FormObject object. |
| method |
Value specifying the method. This is one of the WFOMethods submit method
constants. Valid values are:
| Constant |
Value |
Description |
| mPost |
1 |
POST method. |
| mGet |
2 |
GET method. |
|
ProductVersion
Returns the version of the component. This is a string in the format "MM.mm.RR" where MM is the
major version number, mm is the minor version number and RR is the revision number.
e.g: "02.00.01".
Syntax
object.ProductVersion
The ProductVersion property has the following parts:
| Part | Description |
| object |
A WFO object. |
Response
Returns the body of the HTTP data returned by the web server following a form submission
using the Submit method.
Syntax
object.Response
The Response property has the following parts:
| Part | Description |
| object |
A FormObject object. |
Timeout
Sets the timeout (in seconds) for form submissions using the Submit method. If no response
is received from the server within the timeout period, an ERR_TIMEOUT error is raised.
Syntax
object.Timeout [= wfoTimeout]
The Timeout property has the following parts:
| Part | Description |
| object |
A WFO object. |
| wfoTimeout |
Value specifying the connection timeout in seconds. |
URL
Sets or returns the URL to which the form represented by a FormItem object will be
submitted when calling the Submit method.
Syntax
object.URL [= strURL]
The URL property has the following parts:
| Part | Description |
| object |
A FormObject object. |
| strURL |
Value specifying the URL. |
UserAgent
Sets the User Agent identification in HTTP headers sent when submitting forms.
Syntax
object.UserAgent [= wfoUserAgent]
The UserAgent property has the following parts:
| Part | Description |
| object |
A WFO object. |
| wfoUserAgent |
String value specifying the value of the HTTP UserAgent header. |
Note: Some HTTP Proxy Servers restrict access to certain browser types only and identify the
calling browser by checking the contents of the HTTP User-Agent header. This property provides
a way of making HTTP calls from the component look as though they are coming from a standard
browser. By default, the component sends the following User-Agent header:
Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)
Value
Sets or returns the value of a form item represented by a FormItem object.
Syntax
object.Value [= strValue]
The Value property has the following parts:
| Part | Description |
| object |
A FormItem object. |
| strValue |
The value of the form item. |
|
|
|
Various errors may be raised when creating or submitting forms. Error constants
are available as WFOErrorConstants and valid values are:
| Error |
Number |
Description |
| ERR_TIMEOUT |
1 |
Connection timed out |
| ERR_CANTCONNECT |
2 |
Can not connect to remote host |
| ERR_BUSY |
3 |
Invalid operation at current state |
| ERR_WINSOCK |
4 |
Winsock unavailable |
| ERR_MISSINGID |
5 |
ID can not be null |
| ERR_DUPLICATEID |
6 |
ID already exists |
| ERR_INVALIDOBJECT |
7 |
Invalid object reference or index |
|
© Copyright 2005 VOLTO.COM
|