OData Bean
Properties Methods Events Configuration Settings Errors
The OData component implements the Open Data Protocol (OData). It can be used to query, parse, and update/modify data contained within an OData service.
Syntax
IPWorks.Odata
Remarks
The OData component allows you to easily query OData services and create, update, and delete entries within a service. To query a service, you can set the ServiceRootURI to the service's root URI and ResourcePath to the collection within the service that you wish to query. Optionally you can set the Query*** properties to filter the results. QueryService can then be called to retrieve the results (which can be viewed via the Entry*** properties).
OData1.ServiceRootURI = "http://services.odata.org/OData/OData.svc" OData1.ResourcePath = "Products" OData1.QueryService()
To create a new entry, you can set the ServiceRootURI to the service's root URI and ResourcePath to the collection within the service that you wish to add the entry to. The Entry*** properties can be set to the values you wish to use to create the entry. CreateEntry can then be called to create the entry.
OData1.ServiceRootURI = "http://services.odata.org/OData/OData.svc" OData1.ResourcePath = "Products" OData1.EntryProperties OData1.CreateEntry()
If you wish to update an entry, you can set the ServiceRootURI to the service's root URI and ResourcePath to the specific entry you wish to update. The Entry*** properties can be set to the values you wish to update. UpdateEntry can then be called to update the entry.
OData1.ServiceRootURI = "http://services.odata.org/OData/OData.svc" OData1.ResourcePath = "Products(1)" // Index 1 is the "Name" property. OData1.EntryProperties[1].Value = "MyNewName" OData1.UpdateEntry()
Deleting an entry requires that you first set the ServiceRootURI to the service's root URI and ResourcePath to the specific entry you wish to delete. DeleteEntry can then be called to delete the entry.
OData1.ServiceRootURI = "http://services.odata.org/OData/OData.svc" OData1.ResourcePath = "Products(1)" OData1.DeleteEntry()
In addition to querying a service and manipulating its containing data, the OData component also allows you to retrieve the schema (metadata document) to determine the structure of a service. After setting ServiceRootURI to the root URI of the service, GetSchema can be called to retrieve the metadata document. The Schema*** properties will be populated upon successful retrieval of the metadata document allowing you to identify the structure of the service.
OData1.ServiceRootURI = "http://services.odata.org/OData/OData.svc" OData1.GetSchema()
Property List
The following is the full list of the properties of the bean with short descriptions. Click on the links for further details.
Authorization | The Authorization string to be sent to the server. |
AuthScheme | The authentication scheme to use when server authorization is required. |
Channel | The feed elements of a feed. |
Cookies | Collection of cookies. |
EntryAuthor | The Author of the current entry in an OData feed. |
EntryCount | The number of entries contained within an OData feed. |
EntryETag | The ETag of the current entry in an OData feed. |
EntryId | The ID of the current entry in an OData feed. |
EntryIndex | The index of the current entry in an OData feed. |
EntryLinks | A collection of links in the current OData entry. |
EntryProperties | A collection of elements in the current OData entry. |
EntrySummary | The Summary of the current entry in an OData feed. |
EntryTitle | The Title of the current entry in an OData feed. |
EntryUpdated | The Date-Time when current entry in an OData feed was updated. |
EntryXML | The raw XML of the current entry in an OData feed. |
Firewall | A set of properties related to firewall access. |
Idle | The current status of the component. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
OtherHeaders | Other headers as determined by the user (optional). |
OtherQueryOptions | Additional Query Options to be used when querying a service. |
ParsedHeaders | Collection of headers returned from the last request. |
Password | A password if authentication is to be used. |
Proxy | A set of properties related to proxy access. |
QueryFilter | Selects only the entries that satisfy the specified filter (expression). |
QueryOrderBy | The value used to order entries when querying a service. |
QuerySelect | Selects only the specified properties to be returned in an entry when querying a service. |
QuerySkip | The number of entries to skip when querying a service. |
QuerySkipToken | Token given by an OData server when the last query result collection is too large. |
QueryTop | Selects the first N entries when querying a service. |
ResourcePath | The Resource Path of an OData service. |
SchemaAssociation | The navigation properties and their corresponding associations contained within an entity of a service schema. |
SchemaAssociationCount | The number of navigation properties contained within an OData schema entity. |
SchemaAssociationIndex | The index of the current navigation property in an OData schema entity. |
SchemaEntity | The entities contained within a service schema. |
SchemaEntityCount | The number of entities contained within an OData schema. |
SchemaEntityIndex | The index of the current entity in an OData schema. |
SchemaKeys | The keys of a schema entity. |
SchemaProperty | The properties contained within an entity of a service schema. |
SchemaPropertyCount | The number of properties contained within an OData schema entity. |
SchemaPropertyIndex | The index of the current property in an OData schema entity. |
SchemaTypeField | The fields (properties) contained within a complex type. |
SchemaTypeFieldCount | The number of properties contained within an OData schema complex type. |
SchemaTypeFieldIndex | The index of the current field (property) in an OData schema complex type. |
ServiceRootURI | The root URI of an OData service. |
Timeout | A timeout for the component. |
TransferredData | The contents of the last response from the server. |
User | A user name if authentication is to be used. |
XAttributes | A collection of attributes of the current element. |
XChildren | Collection of child elements of the current element. |
XElement | The name of the current element. |
XNamespace | The namespace of the current element. |
XParent | The parent of the current element. |
XPath | Provides a way to point to a specific element in the document. |
XPrefix | The prefix of the current element. |
XSubTree | A snapshot of the current element in the document. |
XText | The text of the current element. |
Method List
The following is the full list of the methods of the bean with short descriptions. Click on the links for further details.
config | Sets or retrieves a configuration setting . |
createEntry | Creates a new entry within the specified OData service resource. |
customRequest | Sends a request to the specified URL using the HTTP Method and Post Data provided. |
deleteEntry | Deletes an entry within an OData service resource. |
getEntryProperty | Get an OData entry property. |
getSchema | Retrieves the schema for a service. |
hasXPath | Determines whether a specific element exists in the document. |
queryService | Queries an OData service using the specified parameters. |
reset | Reset all properties of the component. |
setEntryProperty | Set an OData entry property. |
setSchemaEntity | Sets the schema entity. |
setSchemaProperty | Sets the schema property. |
setSchemaType | Sets the schema type. |
updateEntry | Update an OData entry. |
updateProperty | Update an OData entry property. |
Event List
The following is the full list of the events fired by the bean with short descriptions. Click on the links for further details.
Connected | Fired immediately after a connection completes (or fails). |
Disconnected | Fired when a connection is closed. |
EndTransfer | Fired when a document finishes transferring. |
Entity | Fired once for each entity retrieved. |
Entry | Fired once for each entry retrieved. |
Error | Information about errors during data delivery. |
Header | Fired every time a header line comes in. |
Property | Fired once for each property found within an entity. |
SetCookie | Fired for every cookie set by the server. |
StartTransfer | Fired when a document starts transferring (after the headers). |
Status | Fired when the HTTP status line is received from the server. |
Transfer | Fired while a document transfers (delivers document). |
Configuration Settings
The following is a list of configuration settings for the bean with short descriptions. Click on the links for further details.
EncodeResourcePath | Whether the ResourcePath is URL encoded. |
NameAndEmailFormat | Determines how the data of the name and e-mail properties will be formatted. |
TransferredHeaders | The full set of headers as received from the server. |
AcceptEncoding | Used to tell the server which types of content encodings the client supports. |
AllowHTTPCompression | This property enables HTTP compression for receiving data. |
AllowIdenticalRedirectURL | Allow redirects to the same URL. |
Append | Whether to append data to LocalFile. |
Authorization | The Authorization string to be sent to the server. |
BytesTransferred | Contains the number of bytes transferred in the response data. |
EncodeURL | If set to true the URL will be encoded by the component. |
FollowRedirects | Determines what happens when the server issues a redirect. |
GetOn302Redirect | If set to true the component will perform a GET on the new location. |
HTTPVersion | The version of HTTP used by the component. |
IfModifiedSince | A date determining the maximum age of the desired document. |
KeepAlive | Determines whether the HTTP connection is closed after completion of the request. |
MaxRedirectAttempts | Limits the number of redirects that are followed in a request. |
OtherHeaders | Other headers as determined by the user (optional). |
ProxyAuthorization | The authorization string to be sent to the proxy server. |
ProxyAuthScheme | The authorization scheme to be used for the proxy. |
ProxyPassword | A password if authentication is to be used for the proxy. |
ProxyPort | Port for the proxy server (default 80). |
ProxyServer | Name or IP address of a proxy server (optional). |
ProxyUser | A user name if authentication is to be used for the proxy. |
TransferredDataLimit | The maximum number of incoming bytes to be stored by the component. |
TransferredHeaders | The full set of headers as received from the server. |
UseChunkedEncoding | Enables or Disables HTTP chunked encoding for transfers. |
ChunkSize | Specifies the chunk size in bytes when using chunked encoding. |
UserAgent | Information about the user agent (browser). |
KerberosSPN | The Service Principal Name for the Kerberos Domain Controller. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The TCP port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
RecordLength | The length of received data records. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
UseIPv6 | Whether to use IPv6. |
TcpNoDelay | Whether or not to delay when sending packets. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
CodePage | The system code page used for Unicode to Multibyte translations. |