IP*Works! V9

ipworks
Class Odata

java.lang.Object
  extended by ipworks.Odata

public class Odata
extends java.lang.Object

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.

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() 


Field Summary
static int authBasic
           
static int authDigest
           
static int authNegotiate
           
static int authNone
           
static int authNtlm
           
static int authOAuth
           
static int authProprietary
           
 
Constructor Summary
Odata()
          Creates an instance of Odata Bean.
Odata(java.lang.String runtimeLicense)
          Creates an instance of Odata Bean with specified run-time license.
 
Method Summary
 void addOdataEventListener(OdataEventListener l)
           
 java.lang.String config(java.lang.String configurationString)
          Sets or retrieves a configuration setting.
 void createEntry()
          Creates a new entry within the specified OData service resource.
 void customRequest(java.lang.String HTTPMethod, java.lang.String URL, java.lang.String postData)
          Sends a request to the specified URL using the HTTP Method and Post Data provided.
 void deleteEntry()
          Deletes an entry within an OData service resource.
 java.lang.String getAuthorization()
          The Authorization string to be sent to the server.
 int getAuthScheme()
          The authentication scheme to use when server authorization is required.
 AtomChannel getChannel()
          The feed elements of a feed.
 HTTPCookieList getCookies()
          Collection of cookies.
 java.lang.String getEntryAuthor()
          The Author of the current entry in an OData feed.
 int getEntryCount()
          The number of entries contained within an OData feed.
 java.lang.String getEntryETag()
          The ETag of the current entry in an OData feed.
 java.lang.String getEntryId()
          The ID of the current entry in an OData feed.
 int getEntryIndex()
          The index of the current entry in an OData feed.
 ODataEntryLinkList getEntryLinks()
          A collection of links in the current OData entry.
 ODataEntryPropertyList getEntryProperties()
          A collection of elements in the current OData entry.
 java.lang.String getEntryProperty(java.lang.String XPath)
          Get an OData entry property.
 java.lang.String getEntrySummary()
          The Summary of the current entry in an OData feed.
 java.lang.String getEntryTitle()
          The Title of the current entry in an OData feed.
 java.lang.String getEntryUpdated()
          The Date-Time when current entry in an OData feed was updated.
 java.lang.String getEntryXML()
          The raw XML of the current entry in an OData feed.
 Firewall getFirewall()
          A set of properties related to firewall access.
 java.lang.String getLocalHost()
          The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
 java.lang.String getOtherHeaders()
          Other headers as determined by the user (optional).
 java.lang.String getOtherQueryOptions()
          Additional Query Options to be used when querying a service.
 HeaderList getParsedHeaders()
          Collection of headers returned from the last request.
 java.lang.String getPassword()
          A password if authentication is to be used.
 Proxy getProxy()
          A set of properties related to proxy access.
 java.lang.String getQueryFilter()
          Selects only the entries that satisfy the specified filter (expression).
 java.lang.String getQueryOrderBy()
          The value used to order entries when querying a service.
 java.lang.String getQuerySelect()
          Selects only the specified properties to be returned in an entry when querying a service.
 java.lang.String getQuerySkip()
          The number of entries to skip when querying a service.
 java.lang.String getQuerySkipToken()
          Token given by an OData server when the last query result collection is too large.
 java.lang.String getQueryTop()
          Selects the first N entries when querying a service.
 java.lang.String getResourcePath()
          The Resource Path of an OData service.
 void getSchema()
          Retrieves the schema for a service.
 ODataSchemaAssociation getSchemaAssociation()
          The navigation properties and their corresponding associations contained within an entity of a service schema.
 int getSchemaAssociationCount()
          The number of navigation properties contained within an OData schema entity.
 int getSchemaAssociationIndex()
          The index of the current navigation property in an OData schema entity.
 ODataSchemaEntity getSchemaEntity()
          The entities contained within a service schema.
 int getSchemaEntityCount()
          The number of entities contained within an OData schema.
 int getSchemaEntityIndex()
          The index of the current entity in an OData schema.
 java.lang.String[] getSchemaKeys()
          The keys of a schema entity.
 ODataSchemaProperty getSchemaProperty()
          The properties contained within an entity of a service schema.
 int getSchemaPropertyCount()
          The number of properties contained within an OData schema entity.
 int getSchemaPropertyIndex()
          The index of the current property in an OData schema entity.
 ODataSchemaProperty getSchemaTypeField()
          The fields (properties) contained within a complex type.
 int getSchemaTypeFieldCount()
          The number of properties contained within an OData schema complex type.
 int getSchemaTypeFieldIndex()
          The index of the current field (property) in an OData schema complex type.
 java.lang.String getServiceRootURI()
          The root URI of an OData service.
 int getTimeout()
          A timeout for the bean.
 byte[] getTransferredData()
          The contents of the last response from the server.
 java.lang.String getUser()
          A user name if authentication is to be used.
 XMLAttributeList getXAttributes()
          A collection of attributes of the current element.
 XMLElementList getXChildren()
          Collection of child elements of the current element.
 java.lang.String getXElement()
          The name of the current element.
 java.lang.String getXNamespace()
          The namespace of the current element.
 java.lang.String getXParent()
          The parent of the current element.
 java.lang.String getXPath()
          Provides a way to point to a specific element in the document.
 java.lang.String getXPrefix()
          The prefix of the current element.
 java.lang.String getXSubTree()
          A snapshot of the current element in the document.
 java.lang.String getXText()
          The text of the current element.
 boolean hasXPath(java.lang.String xpath)
          Determines whether a specific element exists in the document.
 boolean isIdle()
          The current status of the component.
 void queryService()
          Queries an OData service using the specified parameters.
 void removeOdataEventListener(OdataEventListener l)
           
 void reset()
          Reset all properties of the bean.
 void setAuthorization(java.lang.String authorization)
          The Authorization string to be sent to the server.
 void setAuthScheme(int authScheme)
          The authentication scheme to use when server authorization is required.
 void setChannel(AtomChannel channel)
          The feed elements of a feed.
 void setEntryAuthor(java.lang.String entryAuthor)
          The Author of the current entry in an OData feed.
 void setEntryETag(java.lang.String entryETag)
          The ETag of the current entry in an OData feed.
 void setEntryId(java.lang.String entryId)
          The ID of the current entry in an OData feed.
 void setEntryIndex(int entryIndex)
          The index of the current entry in an OData feed.
 void setEntryProperty(java.lang.String XPath, java.lang.String value)
          Set an OData entry property.
 void setEntrySummary(java.lang.String entrySummary)
          The Summary of the current entry in an OData feed.
 void setEntryTitle(java.lang.String entryTitle)
          The Title of the current entry in an OData feed.
 void setEntryXML(java.lang.String entryXML)
          The raw XML of the current entry in an OData feed.
 void setFirewall(Firewall firewall)
          A set of properties related to firewall access.
 void setLocalHost(java.lang.String localHost)
          The name of the local host or user-assigned IP interface through which connections are initiated or accepted.
 void setOtherHeaders(java.lang.String otherHeaders)
          Other headers as determined by the user (optional).
 void setOtherQueryOptions(java.lang.String otherQueryOptions)
          Additional Query Options to be used when querying a service.
 void setPassword(java.lang.String password)
          A password if authentication is to be used.
 void setProxy(Proxy proxy)
          A set of properties related to proxy access.
 void setQueryFilter(java.lang.String queryFilter)
          Selects only the entries that satisfy the specified filter (expression).
 void setQueryOrderBy(java.lang.String queryOrderBy)
          The value used to order entries when querying a service.
 void setQuerySelect(java.lang.String querySelect)
          Selects only the specified properties to be returned in an entry when querying a service.
 void setQuerySkip(java.lang.String querySkip)
          The number of entries to skip when querying a service.
 void setQuerySkipToken(java.lang.String querySkipToken)
          Token given by an OData server when the last query result collection is too large.
 void setQueryTop(java.lang.String queryTop)
          Selects the first N entries when querying a service.
 void setResourcePath(java.lang.String resourcePath)
          The Resource Path of an OData service.
 void setSchemaAssociationIndex(int schemaAssociationIndex)
          The index of the current navigation property in an OData schema entity.
 void setSchemaEntity(java.lang.String name)
          Sets the schema entity.
 void setSchemaEntityIndex(int schemaEntityIndex)
          The index of the current entity in an OData schema.
 void setSchemaProperty(java.lang.String name)
          Sets the schema property.
 void setSchemaPropertyIndex(int schemaPropertyIndex)
          The index of the current property in an OData schema entity.
 void setSchemaType(java.lang.String name)
          Sets the schema type.
 void setSchemaTypeFieldIndex(int schemaTypeFieldIndex)
          The index of the current field (property) in an OData schema complex type.
 void setServiceRootURI(java.lang.String serviceRootURI)
          The root URI of an OData service.
 void setTimeout(int timeout)
          A timeout for the bean.
 void setUser(java.lang.String user)
          A user name if authentication is to be used.
 void setXPath(java.lang.String XPath)
          Provides a way to point to a specific element in the document.
 void updateEntry()
          Update an OData entry.
 void updateProperty(java.lang.String XPath, java.lang.String value)
          Update an OData entry property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

authBasic

public static final int authBasic
See Also:
Constant Field Values

authDigest

public static final int authDigest
See Also:
Constant Field Values

authProprietary

public static final int authProprietary
See Also:
Constant Field Values

authNone

public static final int authNone
See Also:
Constant Field Values

authNtlm

public static final int authNtlm
See Also:
Constant Field Values

authNegotiate

public static final int authNegotiate
See Also:
Constant Field Values

authOAuth

public static final int authOAuth
See Also:
Constant Field Values
Constructor Detail

Odata

public Odata()
Creates an instance of Odata Bean.


Odata

public Odata(java.lang.String runtimeLicense)
Creates an instance of Odata Bean with specified run-time license.

Method Detail

getAuthorization

public java.lang.String getAuthorization()
The Authorization string to be sent to the server.

If the Authorization property contains a non-empty string, an Authorization HTTP request header is added to the request. This header conveys Authorization information to the server.

A common use for this property is to specify OAuth authorization string.

This property is provided so that the HTTP bean can be extended with other security schemes in addition to the authorization schemes already implemented by the bean.

The AuthScheme property defines the authentication scheme used. In the case of HTTP Basic Authentication (default), every time User and Password are set, they are Base64 encoded, and the result is put in the Authorization property in the form "Basic [encoded-user-password]".


setAuthorization

public void setAuthorization(java.lang.String authorization)
                      throws IPWorksException
The Authorization string to be sent to the server.

If the Authorization property contains a non-empty string, an Authorization HTTP request header is added to the request. This header conveys Authorization information to the server.

A common use for this property is to specify OAuth authorization string.

This property is provided so that the HTTP bean can be extended with other security schemes in addition to the authorization schemes already implemented by the bean.

The AuthScheme property defines the authentication scheme used. In the case of HTTP Basic Authentication (default), every time User and Password are set, they are Base64 encoded, and the result is put in the Authorization property in the form "Basic [encoded-user-password]".

Throws:
IPWorksException

getAuthScheme

public int getAuthScheme()
The authentication scheme to use when server authorization is required.

This property will tell the bean which type of authorization to perform when the User and Password properties are set.

This property should be set to authNone (3) when no authentication is to be performed.

By default, this property is authBasic (0), and if the User and Password properties are set, the bean will attempt basic authentication. If AuthScheme is set to authDigest (1), authNtlm (4) or authNegotiate (5), digest, NTLM or Negotiate authentication will be attempted instead.

If AuthScheme is set to authProprietary (2) then the authorization token must be supplied through Authorization property.

If AuthScheme is set to authOAuth (6) then the authorization string must be supplied through Authorization property.

Note that, if you set the Authorization property and AuthScheme is not authProprietary or authOAuth, the AuthScheme will be set automatically to authProprietary (2) by the control.

For security purposes, changing the value of this property will cause the bean to clear the values of User , Password and Authorization .


setAuthScheme

public void setAuthScheme(int authScheme)
                   throws IPWorksException
The authentication scheme to use when server authorization is required.

This property will tell the bean which type of authorization to perform when the User and Password properties are set.

This property should be set to authNone (3) when no authentication is to be performed.

By default, this property is authBasic (0), and if the User and Password properties are set, the bean will attempt basic authentication. If AuthScheme is set to authDigest (1), authNtlm (4) or authNegotiate (5), digest, NTLM or Negotiate authentication will be attempted instead.

If AuthScheme is set to authProprietary (2) then the authorization token must be supplied through Authorization property.

If AuthScheme is set to authOAuth (6) then the authorization string must be supplied through Authorization property.

Note that, if you set the Authorization property and AuthScheme is not authProprietary or authOAuth, the AuthScheme will be set automatically to authProprietary (2) by the control.

For security purposes, changing the value of this property will cause the bean to clear the values of User , Password and Authorization .

Throws:
IPWorksException

getChannel

public AtomChannel getChannel()
The feed elements of a feed.

This property contains the "feed" elements of an ATOM feed. The Channel property has fields which contain values for sub-elements of the "feed" element.


setChannel

public void setChannel(AtomChannel channel)
                throws IPWorksException
The feed elements of a feed.

This property contains the "feed" elements of an ATOM feed. The Channel property has fields which contain values for sub-elements of the "feed" element.

Throws:
IPWorksException

getCookies

public HTTPCookieList getCookies()
Collection of cookies.

This property contains a collection of cookies. To add cookies to outgoing HTTP requests, add cookies (of type httpcookie ) to this collection.

To see cookies that are set by the server, use the SetCookie event, which displays the cookies and their properties as set by the server. Those cookies are also added to Cookies .

MaxHTTPCookies can be used to control the maximum number of cookies saved.

This collection is indexed from 0 to size - 1.


getEntryAuthor

public java.lang.String getEntryAuthor()
The Author of the current entry in an OData feed.

This property contains the author of the specified entry within an OData feed. This value will be populated once EntryIndex is set (provided that an author can be found).


setEntryAuthor

public void setEntryAuthor(java.lang.String entryAuthor)
                    throws IPWorksException
The Author of the current entry in an OData feed.

This property contains the author of the specified entry within an OData feed. This value will be populated once EntryIndex is set (provided that an author can be found).

Throws:
IPWorksException

getEntryCount

public int getEntryCount()
The number of entries contained within an OData feed.

This property is updated to reflect the total number of entries returned within a response (whether you are retrieving a feed/entry or making changes to a feed/entry).


getEntryETag

public java.lang.String getEntryETag()
The ETag of the current entry in an OData feed.

This property is used to obtain the ETag of the specified entry within an OData feed and will be populated once EntryIndex is set.

This property is also used when retrieving, updating or deleting an entry. When EntryETag contains a non-empty string, an "If-None-Match" header will be sent with the entered value when QueryService is called. When DeleteEntry or UpdateEntry is called, an "If-Match" header will be sent with the entered value.


setEntryETag

public void setEntryETag(java.lang.String entryETag)
                  throws IPWorksException
The ETag of the current entry in an OData feed.

This property is used to obtain the ETag of the specified entry within an OData feed and will be populated once EntryIndex is set.

This property is also used when retrieving, updating or deleting an entry. When EntryETag contains a non-empty string, an "If-None-Match" header will be sent with the entered value when QueryService is called. When DeleteEntry or UpdateEntry is called, an "If-Match" header will be sent with the entered value.

Throws:
IPWorksException

getEntryId

public java.lang.String getEntryId()
The ID of the current entry in an OData feed.

This property contains the ID of the specified entry within an OData feed. This value will be populated once EntryIndex is set (provided that an ID can be found).


setEntryId

public void setEntryId(java.lang.String entryId)
                throws IPWorksException
The ID of the current entry in an OData feed.

This property contains the ID of the specified entry within an OData feed. This value will be populated once EntryIndex is set (provided that an ID can be found).

Throws:
IPWorksException

getEntryIndex

public int getEntryIndex()
The index of the current entry in an OData feed.

This property is used to specify an entry within a retrieved OData feed. Once set, EntryAuthor , EntryETag , EntryTitle , EntrySummary , EntryUpdated , EntryLinks , EntryProperties and ResourcePath will be populated with their respective values found within the entry.

This property takes index values from 0 to EntryCount -1.

Setting EntryIndex to -1 will clear the entries contained by the component and will also reset EntryProperties and EntryCount .


setEntryIndex

public void setEntryIndex(int entryIndex)
                   throws IPWorksException
The index of the current entry in an OData feed.

This property is used to specify an entry within a retrieved OData feed. Once set, EntryAuthor , EntryETag , EntryTitle , EntrySummary , EntryUpdated , EntryLinks , EntryProperties and ResourcePath will be populated with their respective values found within the entry.

This property takes index values from 0 to EntryCount -1.

Setting EntryIndex to -1 will clear the entries contained by the component and will also reset EntryProperties and EntryCount .

Throws:
IPWorksException

getEntryLinks

public ODataEntryLinkList getEntryLinks()
A collection of links in the current OData entry.

This is a collection of links (referred to as Navigation Properties) in the current OData entry, as specified by EntryIndex . When EntryIndex is set, all of the elements in the entry are stored as ODataEntryLink types in this collection.


getEntryProperties

public ODataEntryPropertyList getEntryProperties()
A collection of elements in the current OData entry.

This is a collection of elements in the current OData entry, as specified by EntryIndex . When EntryIndex is set, all of the elements in the entry are stored as ODataEntryProperty types in this collection.


getEntrySummary

public java.lang.String getEntrySummary()
The Summary of the current entry in an OData feed.

This property contains the Summary of the specified entry within an OData feed. This value will be populated once EntryIndex is set (provided that a Summary can be found).


setEntrySummary

public void setEntrySummary(java.lang.String entrySummary)
                     throws IPWorksException
The Summary of the current entry in an OData feed.

This property contains the Summary of the specified entry within an OData feed. This value will be populated once EntryIndex is set (provided that a Summary can be found).

Throws:
IPWorksException

getEntryTitle

public java.lang.String getEntryTitle()
The Title of the current entry in an OData feed.

This property contains the Title of the specified entry within an OData feed. This value will be populated once EntryIndex is set (provided that a Title can be found).


setEntryTitle

public void setEntryTitle(java.lang.String entryTitle)
                   throws IPWorksException
The Title of the current entry in an OData feed.

This property contains the Title of the specified entry within an OData feed. This value will be populated once EntryIndex is set (provided that a Title can be found).

Throws:
IPWorksException

getEntryUpdated

public java.lang.String getEntryUpdated()
The Date-Time when current entry in an OData feed was updated.

This property contains the Date-Time when the specified entry within an OData feed was updated. This value will be populated once EntryIndex is set (provided that a Title can be found).


getEntryXML

public java.lang.String getEntryXML()
The raw XML of the current entry in an OData feed.

This property contains the raw XML of the specified entry within an OData feed. This value will be populated once EntryIndex is set.


setEntryXML

public void setEntryXML(java.lang.String entryXML)
                 throws IPWorksException
The raw XML of the current entry in an OData feed.

This property contains the raw XML of the specified entry within an OData feed. This value will be populated once EntryIndex is set.

Throws:
IPWorksException

getFirewall

public Firewall getFirewall()
A set of properties related to firewall access.

This is a Firewall type property which contains fields describing the firewall through which the bean will attempt to connect.


setFirewall

public void setFirewall(Firewall firewall)
                 throws IPWorksException
A set of properties related to firewall access.

This is a Firewall type property which contains fields describing the firewall through which the bean will attempt to connect.

Throws:
IPWorksException

isIdle

public boolean isIdle()
The current status of the component.

Idle will be False if the component is currently busy (communicating and/or waiting for an answer), and True at all other times.


getLocalHost

public java.lang.String getLocalHost()
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

The LocalHost property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.


setLocalHost

public void setLocalHost(java.lang.String localHost)
                  throws IPWorksException
The name of the local host or user-assigned IP interface through which connections are initiated or accepted.

The LocalHost property contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.

In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean is connected, the LocalHost property shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

NOTE: LocalHost is not persistent. You must always set it in code, and never in the property window.

Throws:
IPWorksException

getOtherHeaders

public java.lang.String getOtherHeaders()
Other headers as determined by the user (optional).

This property can be set to a string of headers to be appended to the HTTP request headers created from other properties like ContentType , From , etc.

The headers must be of the format "header: value" as described in the HTTP specifications. Header lines should be separated by CRLF ("\\r\\n") .

Use this property with caution. If this property contains invalid headers, HTTP requests may fail.

This property is useful for extending the functionality of the bean beyond what is provided.


setOtherHeaders

public void setOtherHeaders(java.lang.String otherHeaders)
                     throws IPWorksException
Other headers as determined by the user (optional).

This property can be set to a string of headers to be appended to the HTTP request headers created from other properties like ContentType , From , etc.

The headers must be of the format "header: value" as described in the HTTP specifications. Header lines should be separated by CRLF ("\\r\\n") .

Use this property with caution. If this property contains invalid headers, HTTP requests may fail.

This property is useful for extending the functionality of the bean beyond what is provided.

Throws:
IPWorksException

getOtherQueryOptions

public java.lang.String getOtherQueryOptions()
Additional Query Options to be used when querying a service.

This property allows you to specify additional query options that will be used when accessing a service. Query options consist of name-value pairs and multiple entries should be separated with an '&' (i.e. name1=value1&name2=value2).

Note all specified values will be appended (unaltered) to the end of the URL (generated by the combination of ServiceRootURI , ResourcePath and any Query*** properties specified).


setOtherQueryOptions

public void setOtherQueryOptions(java.lang.String otherQueryOptions)
                          throws IPWorksException
Additional Query Options to be used when querying a service.

This property allows you to specify additional query options that will be used when accessing a service. Query options consist of name-value pairs and multiple entries should be separated with an '&' (i.e. name1=value1&name2=value2).

Note all specified values will be appended (unaltered) to the end of the URL (generated by the combination of ServiceRootURI , ResourcePath and any Query*** properties specified).

Throws:
IPWorksException

getParsedHeaders

public HeaderList getParsedHeaders()
Collection of headers returned from the last request.

This property contains a collection of headers returned from the last request. Whenever headers are returned from the server, the headers are parsed into a collection of headers. Each header in this collection contains information describing that header.

MaxHeaders can be used to control the maximum number of headers saved.

This collection is indexed from 0 to size - 1.


getPassword

public java.lang.String getPassword()
A password if authentication is to be used.

This property contains a password if authentication is to be used. If AuthScheme is set to HTTP Basic Authentication, The User and Password are Base64 encoded and the result is put in the Authorization config setting in the form "Basic [encoded-user-password]".

If AuthScheme is set to HTTP Digest Authentication, the User and Password properties are used to respond to the HTTP Digest Authentication challenge from the server.

If AuthScheme is set to NTLM, NTLM authentication will be attempted. If AuthScheme is set to NTLM and User and Password are empty, the bean will attempt to authenticate using the current user's credentials.


setPassword

public void setPassword(java.lang.String password)
                 throws IPWorksException
A password if authentication is to be used.

This property contains a password if authentication is to be used. If AuthScheme is set to HTTP Basic Authentication, The User and Password are Base64 encoded and the result is put in the Authorization config setting in the form "Basic [encoded-user-password]".

If AuthScheme is set to HTTP Digest Authentication, the User and Password properties are used to respond to the HTTP Digest Authentication challenge from the server.

If AuthScheme is set to NTLM, NTLM authentication will be attempted. If AuthScheme is set to NTLM and User and Password are empty, the bean will attempt to authenticate using the current user's credentials.

Throws:
IPWorksException

getProxy

public Proxy getProxy()
A set of properties related to proxy access.

This property contains fields describing the proxy through which the bean will attempt to connect.


setProxy

public void setProxy(Proxy proxy)
              throws IPWorksException
A set of properties related to proxy access.

This property contains fields describing the proxy through which the bean will attempt to connect.

Throws:
IPWorksException

getQueryFilter

public java.lang.String getQueryFilter()
Selects only the entries that satisfy the specified filter (expression).

This property allows you to specify a filter (expression) in which only the entries that satisfy it will be returned.

Below are the operators supported in the expression language.

Logical Operators

Operator \011\011 Description \011\011
Example
eq \011Equal\011\011\011\011\011\011\011\011\011\011
"City eq 'Durham'"
ne \011Not Equal\011\011\011\011\011\011\011\011
"City ne 'North Carolina'"
gt \011Greater Than\011\011\011\011\011\011
"Price gt 20"
ge \011Greater Than or Equal\011\011
"Price ge 10"
lt \011Less Than\011\011\011\011\011\011\011\011
"Price lt 20"
le \011Less Than Or Equal\011\011\011
"Price le 100"
and \011Logical And\011\011\011\011\011\011\011
"Price le 200 and Price gt 3.5 "
or \011Logical Or\011\011\011\011\011\011\011
"Price le 3.5 or Price gt 200"
not\011\011Logical Not\011\011\011\011\011\011\011
"not endswith(Description,'milk')"

Arithmetic Operators

Operator \011\011 Description \011\011
Example
addAddition\011\011\011\011\011
"Price add 5 gt 10"
subSubtraction\011\011\011\011
"Price sub 5 gt 10"
mulMultiplication\011\011
"Price mul 2 gt 2000"
divDivision\011\011\011\011\011
"Price div 2 gt 4"
modModulo\011\011\011\011\011\011
"Price mod 2 eq 0"

Grouping Operators

Operator \011\011 Description \011\011
Example
( )Precedence Grouping\011\011
"(Price sub 5) gt 10 "

Below are the functions supported in the expression language.

String Functions

Function \011\011
Example
bool substringof(string po, string p1) \011\011\011\011\011\011\011\011\011
"substringof('Alfreds', CompanyName) eq true"
bool endswith(string p0, string p1) \011\011\011\011\011\011\011\011\011\011
"endswith(CompanyName, 'Futterkiste') eq true"
bool startswith(string p0, string p1) \011\011\011\011\011\011\011\011\011
"startswith(CompanyName, 'Alfr') eq true"
int length(string p0) \011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011
"length(CompanyName) eq 19"
int indexof(string p0, string p1) \011\011\011\011\011\011\011\011\011\011\011\011
"indexof(CompanyName, 'lfreds') eq 1"
string replace(string p0, string find, string replace) \011
"replace(CompanyName, ' ', '') eq 'AlfredsFutterkiste'"
string substring(string p0, int pos) \011\011\011\011\011\011\011\011\011\011
"substring(CompanyName, 1) eq 'lfreds Futterkiste'"
string substring(string p0, int pos, int length) \011\011\011\011
"substring(CompanyName, 1, 2) eq 'lf'"
string tolower(string p0) \011\011\011\011\011\011\011\011\011\011\011\011\011\011\011
"tolower(CompanyName) eq 'alfreds futterkiste'"
string toupper(string p0) \011\011\011\011\011\011\011\011\011\011\011\011\011\011\011
"toupper(CompanyName) eq 'ALFREDS FUTTERKISTE'"
string trim(string p0) \011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011
"trim(CompanyName) eq 'Alfreds Futterkiste'"
string concat(string p0, string p1) \011\011\011\011\011\011\011\011\011\011
"concat(concat(City, ', '), Country) eq 'Berlin, Germany'"

Date Functions

Function \011\011
Example
int day(DateTime p0) \011\011
"day(BirthDate) eq 8"
int hour(DateTime p0) \011
"hour(BirthDate) eq 0"
int minute(DateTime p0) \011
"minute(BirthDate) eq 0"
int month(DateTime p0) \011
"month(BirthDate) eq 12"
int second(DateTime p0)
"second(BirthDate) eq 0"
int year(DateTime p0) \011
"year(BirthDate) eq 1948"

Math Functions

Function \011\011
Example
double round(double p0) \011\011
"round(Freight) eq 32"
decimal round(decimal p0) \011
"round(Freight) eq 32"
double floor(double p0) \011\011
"round(Freight) eq 32"
decimal floor(decimal p0) \011
"floor(Freight) eq 32"
double ceiling(double p0) \011
"ceiling(Freight) eq 33"
decimal ceiling(decimal p0)
"floor(Freight) eq 33"

Type Functions

Function \011\011
Example
bool IsOf(type p0) \011\011\011\011\011\011\011\011
"isof('NorthwindModel.Order')"
bool IsOf(expression p0, type p1)
"isof(ShipCountry, 'Edm.String')"


setQueryFilter

public void setQueryFilter(java.lang.String queryFilter)
                    throws IPWorksException
Selects only the entries that satisfy the specified filter (expression).

This property allows you to specify a filter (expression) in which only the entries that satisfy it will be returned.

Below are the operators supported in the expression language.

Logical Operators

Operator \011\011 Description \011\011
Example
eq \011Equal\011\011\011\011\011\011\011\011\011\011
"City eq 'Durham'"
ne \011Not Equal\011\011\011\011\011\011\011\011
"City ne 'North Carolina'"
gt \011Greater Than\011\011\011\011\011\011
"Price gt 20"
ge \011Greater Than or Equal\011\011
"Price ge 10"
lt \011Less Than\011\011\011\011\011\011\011\011
"Price lt 20"
le \011Less Than Or Equal\011\011\011
"Price le 100"
and \011Logical And\011\011\011\011\011\011\011
"Price le 200 and Price gt 3.5 "
or \011Logical Or\011\011\011\011\011\011\011
"Price le 3.5 or Price gt 200"
not\011\011Logical Not\011\011\011\011\011\011\011
"not endswith(Description,'milk')"

Arithmetic Operators

Operator \011\011 Description \011\011
Example
addAddition\011\011\011\011\011
"Price add 5 gt 10"
subSubtraction\011\011\011\011
"Price sub 5 gt 10"
mulMultiplication\011\011
"Price mul 2 gt 2000"
divDivision\011\011\011\011\011
"Price div 2 gt 4"
modModulo\011\011\011\011\011\011
"Price mod 2 eq 0"

Grouping Operators

Operator \011\011 Description \011\011
Example
( )Precedence Grouping\011\011
"(Price sub 5) gt 10 "

Below are the functions supported in the expression language.

String Functions

Function \011\011
Example
bool substringof(string po, string p1) \011\011\011\011\011\011\011\011\011
"substringof('Alfreds', CompanyName) eq true"
bool endswith(string p0, string p1) \011\011\011\011\011\011\011\011\011\011
"endswith(CompanyName, 'Futterkiste') eq true"
bool startswith(string p0, string p1) \011\011\011\011\011\011\011\011\011
"startswith(CompanyName, 'Alfr') eq true"
int length(string p0) \011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011
"length(CompanyName) eq 19"
int indexof(string p0, string p1) \011\011\011\011\011\011\011\011\011\011\011\011
"indexof(CompanyName, 'lfreds') eq 1"
string replace(string p0, string find, string replace) \011
"replace(CompanyName, ' ', '') eq 'AlfredsFutterkiste'"
string substring(string p0, int pos) \011\011\011\011\011\011\011\011\011\011
"substring(CompanyName, 1) eq 'lfreds Futterkiste'"
string substring(string p0, int pos, int length) \011\011\011\011
"substring(CompanyName, 1, 2) eq 'lf'"
string tolower(string p0) \011\011\011\011\011\011\011\011\011\011\011\011\011\011\011
"tolower(CompanyName) eq 'alfreds futterkiste'"
string toupper(string p0) \011\011\011\011\011\011\011\011\011\011\011\011\011\011\011
"toupper(CompanyName) eq 'ALFREDS FUTTERKISTE'"
string trim(string p0) \011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011\011
"trim(CompanyName) eq 'Alfreds Futterkiste'"
string concat(string p0, string p1) \011\011\011\011\011\011\011\011\011\011
"concat(concat(City, ', '), Country) eq 'Berlin, Germany'"

Date Functions

Function \011\011
Example
int day(DateTime p0) \011\011
"day(BirthDate) eq 8"
int hour(DateTime p0) \011
"hour(BirthDate) eq 0"
int minute(DateTime p0) \011
"minute(BirthDate) eq 0"
int month(DateTime p0) \011
"month(BirthDate) eq 12"
int second(DateTime p0)
"second(BirthDate) eq 0"
int year(DateTime p0) \011
"year(BirthDate) eq 1948"

Math Functions

Function \011\011
Example
double round(double p0) \011\011
"round(Freight) eq 32"
decimal round(decimal p0) \011
"round(Freight) eq 32"
double floor(double p0) \011\011
"round(Freight) eq 32"
decimal floor(decimal p0) \011
"floor(Freight) eq 32"
double ceiling(double p0) \011
"ceiling(Freight) eq 33"
decimal ceiling(decimal p0)
"floor(Freight) eq 33"

Type Functions

Function \011\011
Example
bool IsOf(type p0) \011\011\011\011\011\011\011\011
"isof('NorthwindModel.Order')"
bool IsOf(expression p0, type p1)
"isof(ShipCountry, 'Edm.String')"

Throws:
IPWorksException

getQueryOrderBy

public java.lang.String getQueryOrderBy()
The value used to order entries when querying a service.

This property allows you to specify a value by which the returned entries will be order after a call to QueryService .

Note: You can specify the order by which the entries are sorted (either ascending or descending) by appending " asc" or " desc" (respectively) to your OrderBy value. For example, if you want to sort the entries by 'Rating' in descending order you would set QueryOrderBy to "Rating desc". If a specific order ('asc' or 'desc') is not specified, the entries will be returned in ascending order.


setQueryOrderBy

public void setQueryOrderBy(java.lang.String queryOrderBy)
                     throws IPWorksException
The value used to order entries when querying a service.

This property allows you to specify a value by which the returned entries will be order after a call to QueryService .

Note: You can specify the order by which the entries are sorted (either ascending or descending) by appending " asc" or " desc" (respectively) to your OrderBy value. For example, if you want to sort the entries by 'Rating' in descending order you would set QueryOrderBy to "Rating desc". If a specific order ('asc' or 'desc') is not specified, the entries will be returned in ascending order.

Throws:
IPWorksException

getQuerySelect

public java.lang.String getQuerySelect()
Selects only the specified properties to be returned in an entry when querying a service.

This property allows you to specify the specific properties you want returned within an entry when calling QueryService . The specified value should be a comma-separated list of properties (provided you wish to have more than one property returned). For example, if you wish to only have the 'Name' and 'Price' of each item returned you can set QuerySelect to "Name,Price".

Note the specified values can be a property name, navigation property name ( Title ) or the "*" character (which returns all the properties for each entry).


setQuerySelect

public void setQuerySelect(java.lang.String querySelect)
                    throws IPWorksException
Selects only the specified properties to be returned in an entry when querying a service.

This property allows you to specify the specific properties you want returned within an entry when calling QueryService . The specified value should be a comma-separated list of properties (provided you wish to have more than one property returned). For example, if you wish to only have the 'Name' and 'Price' of each item returned you can set QuerySelect to "Name,Price".

Note the specified values can be a property name, navigation property name ( Title ) or the "*" character (which returns all the properties for each entry).

Throws:
IPWorksException

getQuerySkip

public java.lang.String getQuerySkip()
The number of entries to skip when querying a service.

This property allows you to specify the number of entries to skip (from the top of the list) when calling QueryService . Therefore when this property set, only the remaining entries (starting with entry N+1) will be returned. The specified value should not be a value less than 0.

By default, the service you are querying will sort the entries using a scheme selected by the OData service you are querying. However you can use QueryOrderBy to specify how the entries should be sorted prior to skipping the top N items.

This property can be used in conjunction with QueryOrderBy and QueryTop to select specific entries. For example, if you wanted to select the third and fourth highest rated item you would set QueryOrderBy to "Rating desc" (to order the items by Rating from highest to lowest), set QuerySkip to "2" (to skip the first and second items), and finally set QueryTop to "2" (to only return the third and fourth items).


setQuerySkip

public void setQuerySkip(java.lang.String querySkip)
                  throws IPWorksException
The number of entries to skip when querying a service.

This property allows you to specify the number of entries to skip (from the top of the list) when calling QueryService . Therefore when this property set, only the remaining entries (starting with entry N+1) will be returned. The specified value should not be a value less than 0.

By default, the service you are querying will sort the entries using a scheme selected by the OData service you are querying. However you can use QueryOrderBy to specify how the entries should be sorted prior to skipping the top N items.

This property can be used in conjunction with QueryOrderBy and QueryTop to select specific entries. For example, if you wanted to select the third and fourth highest rated item you would set QueryOrderBy to "Rating desc" (to order the items by Rating from highest to lowest), set QuerySkip to "2" (to skip the first and second items), and finally set QueryTop to "2" (to only return the third and fourth items).

Throws:
IPWorksException

getQuerySkipToken

public java.lang.String getQuerySkipToken()
Token given by an OData server when the last query result collection is too large.

When a returned result collection is very large, it is not uncommon for the results to be broken up into multiple pages. When this occurs a Skip Token is returned in the response and the component will populate QuerySkipToken with the returned value. Calling QueryService again will return the next page of results.


setQuerySkipToken

public void setQuerySkipToken(java.lang.String querySkipToken)
                       throws IPWorksException
Token given by an OData server when the last query result collection is too large.

When a returned result collection is very large, it is not uncommon for the results to be broken up into multiple pages. When this occurs a Skip Token is returned in the response and the component will populate QuerySkipToken with the returned value. Calling QueryService again will return the next page of results.

Throws:
IPWorksException

getQueryTop

public java.lang.String getQueryTop()
Selects the first N entries when querying a service.

This property allows you to specify the number of entries (taken from the top of the list) to be returned when calling QueryService . The specified value should not be a value less than 0.

By default, the service you are querying will sort the entries using a scheme selected by the OData service you are querying. However you can use QueryOrderBy to specify how the entries should be sorted prior to selecting the top N items.


setQueryTop

public void setQueryTop(java.lang.String queryTop)
                 throws IPWorksException
Selects the first N entries when querying a service.

This property allows you to specify the number of entries (taken from the top of the list) to be returned when calling QueryService . The specified value should not be a value less than 0.

By default, the service you are querying will sort the entries using a scheme selected by the OData service you are querying. However you can use QueryOrderBy to specify how the entries should be sorted prior to selecting the top N items.

Throws:
IPWorksException

getResourcePath

public java.lang.String getResourcePath()
The Resource Path of an OData service.

This property contains the resource path of an OData service and is used in conjunction with ServiceRootURI ( ServiceRootURI / ResourcePath ) to query feeds and modify entries.

This property will be populated when EntryIndex is set. You can change the value if you wish to send the request to a different Resource Path.

For example, a valid ResourcePath for the OData sample service is: "Products".


setResourcePath

public void setResourcePath(java.lang.String resourcePath)
                     throws IPWorksException
The Resource Path of an OData service.

This property contains the resource path of an OData service and is used in conjunction with ServiceRootURI ( ServiceRootURI / ResourcePath ) to query feeds and modify entries.

This property will be populated when EntryIndex is set. You can change the value if you wish to send the request to a different Resource Path.

For example, a valid ResourcePath for the OData sample service is: "Products".

Throws:
IPWorksException

getSchemaAssociation

public ODataSchemaAssociation getSchemaAssociation()
The navigation properties and their corresponding associations contained within an entity of a service schema.

This property is used to obtain the navigation properties and their corresponding associations contained within an entity (specified by SchemaEntityIndex ) of a service schema. This property is populated after setting SchemaAssociationIndex .


getSchemaAssociationCount

public int getSchemaAssociationCount()
The number of navigation properties contained within an OData schema entity.

This property is updated to reflect the total number of navigation properties within the schema entity specified by SchemaEntityIndex .


getSchemaAssociationIndex

public int getSchemaAssociationIndex()
The index of the current navigation property in an OData schema entity.

This property is used to specify a navigation property within an entity (specified by SchemaEntityIndex ). Once set, SchemaAssociation will be populated.


setSchemaAssociationIndex

public void setSchemaAssociationIndex(int schemaAssociationIndex)
                               throws IPWorksException
The index of the current navigation property in an OData schema entity.

This property is used to specify a navigation property within an entity (specified by SchemaEntityIndex ). Once set, SchemaAssociation will be populated.

Throws:
IPWorksException

getSchemaEntity

public ODataSchemaEntity getSchemaEntity()
The entities contained within a service schema.

This property is used to obtain the entities of a service schema. This property is populated after setting SchemaEntityIndex .


getSchemaEntityCount

public int getSchemaEntityCount()
The number of entities contained within an OData schema.

This property is updated to reflect the total number of entities within a schema (retrieved via GetSchema ).


getSchemaEntityIndex

public int getSchemaEntityIndex()
The index of the current entity in an OData schema.

This property is used to specify an entity within a retrieved OData schema. Once set, SchemaEntity will be populated.


setSchemaEntityIndex

public void setSchemaEntityIndex(int schemaEntityIndex)
                          throws IPWorksException
The index of the current entity in an OData schema.

This property is used to specify an entity within a retrieved OData schema. Once set, SchemaEntity will be populated.

Throws:
IPWorksException

getSchemaKeys

public java.lang.String[] getSchemaKeys()
The keys of a schema entity.

This property is used to obtain the key(s) contained within an entity of a service schema and is populated after setting SchemaEntityIndex .

Note: A Key value maps to a property of the entity, details of which can be retrieved via SchemaProperty .


getSchemaProperty

public ODataSchemaProperty getSchemaProperty()
The properties contained within an entity of a service schema.

This property is used to obtain the properties contained within an entity (specified by SchemaEntityIndex ) of a service schema. This property is populated after setting SchemaPropertyIndex .

Note: In reference to a database structure, a property would be a column.


getSchemaPropertyCount

public int getSchemaPropertyCount()
The number of properties contained within an OData schema entity.

This property is updated to reflect the total number of properties within the schema entity specified by SchemaEntityIndex .


getSchemaPropertyIndex

public int getSchemaPropertyIndex()
The index of the current property in an OData schema entity.

This property is used to specify a property within an entity (specified by SchemaEntityIndex ). Once set, SchemaProperty will be populated.


setSchemaPropertyIndex

public void setSchemaPropertyIndex(int schemaPropertyIndex)
                            throws IPWorksException
The index of the current property in an OData schema entity.

This property is used to specify a property within an entity (specified by SchemaEntityIndex ). Once set, SchemaProperty will be populated.

Throws:
IPWorksException

getSchemaTypeField

public ODataSchemaProperty getSchemaTypeField()
The fields (properties) contained within a complex type.

This property is used to obtain the fields (properties) contained within a complex type.

It is populated when navigating an entity's properties via SchemaPropertyIndex or by explicitly setting the complex type name via SetSchemaType .


getSchemaTypeFieldCount

public int getSchemaTypeFieldCount()
The number of properties contained within an OData schema complex type.

This property is updated to reflect the total number of fields (properties) within the schema complex type of a property. This is populated when navigating an entity's properties via SchemaPropertyIndex or by explicitly setting the type via SetSchemaType .


getSchemaTypeFieldIndex

public int getSchemaTypeFieldIndex()
The index of the current field (property) in an OData schema complex type.

This property is used to specify a field (property) within a complex type. Once set, SchemaTypeField will be populated.


setSchemaTypeFieldIndex

public void setSchemaTypeFieldIndex(int schemaTypeFieldIndex)
                             throws IPWorksException
The index of the current field (property) in an OData schema complex type.

This property is used to specify a field (property) within a complex type. Once set, SchemaTypeField will be populated.

Throws:
IPWorksException

getServiceRootURI

public java.lang.String getServiceRootURI()
The root URI of an OData service.

This property contains the root URI of an OData service. This value is used in conjunction with ResourcePath ( ServiceRootURI / ResourcePath ) to query feeds and modify entries.

For example, the ServiceRootURI of the OData sample service is: "http://services.odata.org/OData/OData.svc/".


setServiceRootURI

public void setServiceRootURI(java.lang.String serviceRootURI)
                       throws IPWorksException
The root URI of an OData service.

This property contains the root URI of an OData service. This value is used in conjunction with ResourcePath ( ServiceRootURI / ResourcePath ) to query feeds and modify entries.

For example, the ServiceRootURI of the OData sample service is: "http://services.odata.org/OData/OData.svc/".

Throws:
IPWorksException

getTimeout

public int getTimeout()
A timeout for the bean.

If the Timeout property is set to 0, all operations will run uninterrupted until successful completion or an error condition is encountered.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an exception.

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when any amount of data is successfully sent or received.

Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by the AbsoluteTimeout configuration setting.

The default value for the Timeout property is 60 (seconds).


setTimeout

public void setTimeout(int timeout)
                throws IPWorksException
A timeout for the bean.

If the Timeout property is set to 0, all operations will run uninterrupted until successful completion or an error condition is encountered.

If Timeout is set to a positive value, the bean will wait for the operation to complete before returning control.

The bean will use DoEvents to enter an efficient wait loop during any potential waiting period, making sure that all system events are processed immediately as they arrive. This ensures that the host application does not "freeze" and remains responsive.

If Timeout expires, and the operation is not yet complete, the bean throws an exception.

Please note that by default, all timeouts are inactivity timeouts , i.e. the timeout period is extended by Timeout seconds when any amount of data is successfully sent or received.

Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum of Timeout seconds since the beginning of the operation, without extending the timeout period during communications.

This behavior is controlled by the AbsoluteTimeout configuration setting.

The default value for the Timeout property is 60 (seconds).

Throws:
IPWorksException

getTransferredData

public byte[] getTransferredData()
The contents of the last response from the server.

This property is used to get the data of the last response from the server.

TransferredData will be populated after a successful QueryService or CustomRequest call, provided that LocalFile is not set. If LocalFile is set, the object data will be written to the file specified.


getUser

public java.lang.String getUser()
A user name if authentication is to be used.

This property contains a user name if authentication is to be used. If AuthScheme is set to HTTP Basic Authentication, The User and Password are Base64 encoded and the result is put in the Authorization property in the form "Basic [encoded-user-password]".

If AuthScheme is set to HTTP Digest Authentication, the User and Password properties are used to respond to the HTTP Digest Authentication challenge from the server.

If AuthScheme is set to NTLM, NTLM authentication will be attempted. If AuthScheme is set to NTLM and User and Password are empty, the bean will attempt to authenticate using the current user's credentials.


setUser

public void setUser(java.lang.String user)
             throws IPWorksException
A user name if authentication is to be used.

This property contains a user name if authentication is to be used. If AuthScheme is set to HTTP Basic Authentication, The User and Password are Base64 encoded and the result is put in the Authorization property in the form "Basic [encoded-user-password]".

If AuthScheme is set to HTTP Digest Authentication, the User and Password properties are used to respond to the HTTP Digest Authentication challenge from the server.

If AuthScheme is set to NTLM, NTLM authentication will be attempted. If AuthScheme is set to NTLM and User and Password are empty, the bean will attempt to authenticate using the current user's credentials.

Throws:
IPWorksException

getXAttributes

public XMLAttributeList getXAttributes()
A collection of attributes of the current element.

This collection consists of all attributes of the current XML element. The component parses each attribute into a collection of xmlattribute types.

This collection is indexed from 0 to size - 1.


getXChildren

public XMLElementList getXChildren()
Collection of child elements of the current element.

The elements are provided in the collection in the same order they are found in the document.

This collection is indexed from 0 to size - 1.


getXElement

public java.lang.String getXElement()
The name of the current element.

The current element is specified via the XPath property.


getXNamespace

public java.lang.String getXNamespace()
The namespace of the current element.

The current element is specified via the XPath property.


getXParent

public java.lang.String getXParent()
The parent of the current element.

The current element is specified via the XPath property.


getXPath

public java.lang.String getXPath()
Provides a way to point to a specific element in the document.

XPath implements a subset of the XML XPath specification, allowing you to point to specific elements in the XML documents.

The path is a series of one or more element accessors separated by '/'. The path can be absolute (starting with '/') or relative to the current XPath location.

The following are possible values for an element accessor:

'name'
A particular element name
name[i]
The i-th subelement of the current element with the given name
[i]
The i-th subelement of the current element
[last()]
The last subelement of the current element
[last()-i]
The subelement located at the last location minus i in the current element
name[@attrname="attrvalue"]
The subelement containing a particular value for a given attribute (supports single AND double quotes)
..
The parent of the current element
When XPath is set to a valid path, XElement points to the name of the element, with XParent , XNamespace , XPrefix , XChildren , and XText providing other properties of the element. The attributes of the current element are provided in the XAttributes collection .

Example (Setting XPath)

 
 
Document root
ODataControl.XPath = "/"
Specific Element
ODataControl.XPath = "/root/SubElement1/SubElement2/"
i-th Child
ODataControl.XPath = "/root/SubElement1[i]"
Specific EntryItem
ODataControl.XPath = ODataControl.EntryItems[i].XPath


setXPath

public void setXPath(java.lang.String XPath)
              throws IPWorksException
Provides a way to point to a specific element in the document.

XPath implements a subset of the XML XPath specification, allowing you to point to specific elements in the XML documents.

The path is a series of one or more element accessors separated by '/'. The path can be absolute (starting with '/') or relative to the current XPath location.

The following are possible values for an element accessor:

'name'
A particular element name
name[i]
The i-th subelement of the current element with the given name
[i]
The i-th subelement of the current element
[last()]
The last subelement of the current element
[last()-i]
The subelement located at the last location minus i in the current element
name[@attrname="attrvalue"]
The subelement containing a particular value for a given attribute (supports single AND double quotes)
..
The parent of the current element
When XPath is set to a valid path, XElement points to the name of the element, with XParent , XNamespace , XPrefix , XChildren , and XText providing other properties of the element. The attributes of the current element are provided in the XAttributes collection .

Example (Setting XPath)

 
 
Document root
ODataControl.XPath = "/"
Specific Element
ODataControl.XPath = "/root/SubElement1/SubElement2/"
i-th Child
ODataControl.XPath = "/root/SubElement1[i]"
Specific EntryItem
ODataControl.XPath = ODataControl.EntryItems[i].XPath

Throws:
IPWorksException

getXPrefix

public java.lang.String getXPrefix()
The prefix of the current element.

The current element is specified via the XPath property.


getXSubTree

public java.lang.String getXSubTree()
A snapshot of the current element in the document.

The current element is specified via the XPath property. In order for this property to work you must have the CacheContent set to true.


getXText

public java.lang.String getXText()
The text of the current element.

The current element is specified via the XPath property.


config

public java.lang.String config(java.lang.String configurationString)
                        throws IPWorksException
Sets or retrieves a configuration setting.

Config is a generic method available in every bean. It is used to set and retrieve configuration settings for the bean.

Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the bean, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY , you must call Config("PROPERTY=VALUE") , where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY") . The value will be returned as a string.

The bean accepts one or more of the following configuration settings . Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the bean, access to these internal properties is provided through the Config method.

OData Configuration Settings

BuildDOM
Specifies whether the component will build the internal object model of the service response
This field allows you to specify whether the component will build the internal object model of a received service response. The default value is True, in which you can browse a response by using the Entry*** properties and XPath . However you can set this field to False, which will *not* build the internal object model thus providing performance improvements. In this case, the Entry*** properties and XPath cannot be used, however the Entry event will still be fired allowing you to retrieve the entry information.
DateFormat
The format string to be used for formatting the DateTime values received from the server
By default, the DateTime values returned by server follow the timestamp format specified within RFC 3339 (e.g. "2011-04-04T18:44:20.000Z"). This property allows you to alter the display format of all the DateTime values within the component (this includes properties and events). For example, setting DateFormat to "MM-dd-yyyy" will change the format of the previously shown date to "02-17-2011". Below is a table of the available format specifiers, their descriptions, along with examples.
Format specifier Description
Examples
yThe year, from 0 to 99.
Thu, 17 Feb 2011 18:09:45 GMT -> 11Thu, 17 Feb 2009 18:09:45 GMT -> 9

yyThe year, from 00 to 99.
Thu, 17 Feb 2011 18:09:45 GMT -> 11Thu, 17 Feb 2009 18:09:45 GMT -> 09

yyyyThe year as a four-digit number.
Thu, 17 Feb 2011 18:09:45 GMT -> 2011
MThe month, from 1 to 12.
Thu, 17 Feb 2011 18:09:45 GMT -> 2
MMThe month, from 01 to 12.
Thu, 17 Feb 2011 18:09:45 GMT -> 02
MMMThe abbreviated name of the month.
Thu, 17 Feb 2011 18:09:45 GMT -> Feb
MMMMThe full name of the month.
Thu, 17 Feb 2011 18:09:45 GMT -> February
dThe day of the month, from 1 through 31.
Thu, 17 Feb 2011 18:09:45 GMT -> 17Thu, 9 Feb 2011 18:09:45 GMT -> 9

ddThe day of the month, from 01 through 31.
Thu, 17 Feb 2011 18:09:45 GMT -> 17Thu, 9 Feb 2011 18:09:45 GMT -> 09

DThe short abbreviated name of the day of the week.
Thu, 17 Feb 2011 18:09:45 GMT -> Th
DDThe medium abbreviated name of the day of the week.
Thu, 17 Feb 2011 18:09:45 GMT -> Thu
DDDThe full name of the day of the week.
Thu, 17 Feb 2011 18:09:45 GMT -> Thursday
hThe hour, using a 12-hour clock from 1 to 12.
Thu, 17 Feb 2011 18:09:45 GMT -> 6
hhThe hour, using a 12-hour clock from 01 to 12.
Thu, 17 Feb 2011 18:09:45 GMT -> 06
HThe hour, using a 24-hour clock from 1 to 23.
Thu, 17 Feb 2011 18:09:45 GMT -> 18Thu, 17 Feb 2011 8:09:45 GMT -> 8

HHThe hour, using a 24-hour clock from 01 to 23.
Thu, 17 Feb 2011 18:09:45 GMT -> 18Thu, 17 Feb 2011 8:09:45 GMT -> 08

aThe first character of the AM/PM designator.
Thu, 17 Feb 2011 18:09:45 GMT -> PThu, 17 Feb 2011 8:09:45 GMT -> A

aaThe AM/PM designator.
Thu, 17 Feb 2011 18:09:45 GMT -> PMThu, 17 Feb 2011 8:09:45 GMT -> AM

mThe minute, from 0 to 59.
Thu, 17 Feb 2011 18:09:45 GMT -> 9Thu, 17 Feb 2011 8:59:45 GMT -> 59

mmThe minute, from 00 to 59.
Thu, 17 Feb 2011 18:09:45 GMT -> 09Thu, 17 Feb 2011 8:59:45 GMT -> 59

sThe second, from 0 to 59.
Thu, 17 Feb 2011 18:09:45 GMT -> 45Thu, 17 Feb 2011 8:59:09 GMT -> 9

ssThe second, from 00 to 59.
Thu, 17 Feb 2011 18:09:45 GMT -> 45Thu, 17 Feb 2011 8:59:09 GMT -> 09

zThe time zone.
Thu, 17 Feb 2011 18:09:45 GMT -> GMT
NameAndEmailFormat
Determines how the data of the name and e-mail properties will be formatted
This property allows you to control how the data of the name and e-mail properties will be formatted. The available formats are:
0 (default)
SMTP Format: Name <e-mail address>
1
Name only.
2
E-mail address only.
TransferredHeaders
The full set of headers as received from the server
This property returns the complete set of raw headers as received from the server.

HTTP Configuration Settings

AcceptEncoding
Used to tell the server which types of content encodings the client supports
When AllowHTTPCompression is true, the bean adds an "Accept-Encoding: " header to the request being sent to the server. By default, this header's value is "gzip, deflate". This config allows you to change the value of the "Accept-Encoding" header. NOTE: The bean only supports gzip and deflate decompression algorithms.
AllowHTTPCompression
This property enables HTTP compression for receiving data
This is the same as the AllowHTTPCompression property. This setting is exposed here for use by beans that inherit from HTTP.
Authorization
The Authorization string to be sent to the server
If the Authorization property contains a non-empty string, an Authorization HTTP request header is added to the request. This header conveys Authorization information to the server.This property is provided so that the HTTP bean can be extended with other security schemes in addition to the authorization schemes already implemented by the bean.

The AuthScheme property defines the authentication scheme used. In the case of HTTP Basic Authentication (default), every time User and Password are set, they are Base64 encoded, and the result is put in the Authorization property in the form "Basic [encoded-user-password]".

BytesTransferred
Contains the number of bytes transferred in the response data
Returns the raw number of bytes from the HTTP response data, prior to the component processing the data, whether it is chunked and/or compressed. This returns the same value as the Transfer event, by BytesTransferred .
EncodeURL
If set to true the URL will be encoded by the bean
The default value is false. If set to true the URL passed to the bean will be URL encoded.
GetOn302Redirect
If set to true the bean will perform a GET on the new location
The default value is false. If set to true the bean will perform a GET on the new location. Otherwise it will use the same HTTP method again.
HTTPVersion
The version of HTTP used by the bean
Possible values include "1.0", and "1.1". The default is "1.1".
IfModifiedSince
A date determining the maximum age of the desired document
This is the same as the IfModifiedSince property. This setting is exposed here for use by beans that inherit from HTTP.
KeepAlive
Determines whether the HTTP connection is closed after completion of the request
If true, the component will not send the 'Connection: Close' header. The absence of the Connection header indicates to the server that HTTP persistent connections should be used if supported. Note that not all server support persistent connections. You may also explicitly add the Keep-Alive header to the request headers by setting OtherHeaders to 'Connection: Keep-Alive'. If false, the connection will be closed immediately after the server response is received.The default value for KeepAlive is false.

MaxHeaders
Instructs bean to save the amount of headers specified that are returned by the server after a Header event has been fired
This config should be set when the TransferredHeaders collection is to be populated when a Header event has been fired. This value represents the number of headers that are to be saved in the collection.To save all items to the collection , set this config to -1. If no items are wanted, set this to 0, which will not save any to the collection . The default for this config is -1, so all items will be included in the collection .

NOTE: This functionality is only available in Java and .NET.

MaxHTTPCookies
Instructs bean to save the amount of cookies specified that are returned by the server when a SetCookie event is fired
This config should be set when populating the Cookies collection as a result of an HTTP request. This value represents the number of cookies that are to be saved in the collection .To save all items to the collection , set this config to -1. If no items are wanted, set this to 0, which will not save any to the collection . The default for this config is -1, so all items will be included in the collection .

NOTE: This functionality is only available in Java and .NET.

MaxRedirectAttempts
Limits the number of redirects that are followed in a request
When FollowRedirects is set to any value besides frNever the bean will follow redirects until this maximum number of redirect attempts are made. The default value is 20. \011
ProxyAuthorization
The authorization string to be sent to the proxy server
Similar to the Authorization config, but for proxy authorization. If this config contains a non-empty string, a Proxy-Authorization HTTP request header is added to the request. This header conveys proxy authorization information to the server. If User and Password are specified, this value is calculated using the algorithm specified by AuthScheme .
ProxyAuthScheme
The authorization scheme to be used for the proxy
This is the same as AuthScheme . This setting is provided for use by beans that do not directly expose Proxy properties.
ProxyPassword
A password if authentication is to be used for the proxy
This is the same as Password . This setting is provided for use by beans that do not directly expose Proxy properties.
ProxyPort
Port for the proxy server (default 80)
This is the same as Port . This setting is provided for use by beans that do not directly expose Proxy properties.
ProxyServer
Name or IP address of a proxy server (optional)
This is the same as Server . This setting is provided for use by beans that do not directly expose Proxy properties.
ProxyUser
A user name if authentication is to be used for the proxy
This is the same as User . This setting is provided for use by beans that do not directly expose Proxy properties.
TransferredDataLimit
The maximum number of incoming bytes to be stored by the bean
The default value is 65,536, allowing the bean to accumulate the first 64K of data into the TransferredData buffer.If TransferredDataLimit is set to 0, no limits are imposed.

UseChunkedEncoding
Enables or Disables HTTP chunked encoding for transfers
If UseChunkedEncoding is set to true, the bean will use HTTP chunked encoding when posting if possible. HTTP chunked encoding allows large files to be sent in chunks instead of all at once. If set to false, the bean will not use HTTP chunked encoding. The default value is false. Note: Some servers (such as the ASP.NET Development Server) may not support chunked encoding.

ChunkSize
Specifies the chunk size in bytes when using chunked encoding
This is only applicable when UseChunkedEncoding is true. This setting specifies the chunk size in bytes to be used when posting data. The default value is 16384.
UsePlatformHTTPClient
Whether or not to use the platform HTTP client
If True, the component will use the default HTTP client for the platform ( URLConnection in Java or WebRequest in .NET) instead of the internal HTTP implementation. This is important for environments where direct access to sockets is limited or not allowed (as in the Google AppEngine for instance).
UserAgent
Information about the user agent (browser)
This is the value supplied in the HTTP User-Agent header. The default setting is "/n software IPWorks HTTP/S Component - www.nsoftware.com".Override the default with the name and version of your software.

KerberosSPN
The Service Principal Name for the Kerberos Domain Controller
If the Service Principal Name on the Kerberos Domain Controller is not the same as the URL that you are authenticating to, the Service Principal Name should be set here.

IPPort Configuration Settings

FirewallAutoDetect
Tells the bean whether or not to automatically detect and use firewall system settings, if available
This is the same as AutoDetect . This setting is provided for use by beans that do not directly expose Firewall properties.
FirewallHost
Name or IP address of firewall (optional)
If a FirewallHost is given, requested connections will be authenticated through the specified firewall when connecting.If the FirewallHost setting is set to a Domain Name, a DNS request is initiated. Upon successful termination of the request, the FirewallHost setting is set to the corresponding address. If the search is not successful, an error is returned.

NOTE: This is the same as Host . This setting is provided for use by beans that do not directly expose Firewall properties.

FirewallListener
If true, the component binds to a SOCKS firewall as a server (IPPort only)
This entry is for IPPort only and does not work for other components that descend from IPPort.If this entry is set, the bean acts as a server. RemoteHost and RemotePort are used to tell the SOCKS firewall in which address and port to listen to. The firewall rules may ignore RemoteHost , and it is recommended that RemoteHost be set to empty string in this case.

RemotePort is the port in which the firewall will listen to. If set to 0, the firewall will select a random port. The binding (address and port) is provided through the ConnectionStatus event.

The connection to the firewall is made by calling the Connect method.

FirewallPassword
Password to be used if authentication is to be used when connecting through the firewall
If FirewallHost is specified, the FirewallUser and FirewallPassword settings are used to connect and authenticate to the given firewall. If the authentication fails, the bean throws an exception.NOTE: This is the same as Password . This setting is provided for use by beans that do not directly expose Firewall properties.

FirewallPort
The TCP port for the FirewallHost;
Note that the FirewallPort is set automatically when FirewallType is set to a valid value.NOTE: This is the same as Port . This setting is provided for use by beans that do not directly expose Firewall properties.

FirewallType
Determines the type of firewall to connect through
The appropriate values are as follows:
0
No firewall (default setting).
1
Connect through a tunneling proxy. FirewallPort is set to 80.
2
Connect through a SOCKS4 Proxy. FirewallPort is set to 1080.
3
Connect through a SOCKS5 Proxy. FirewallPort is set to 1080.
NOTE: This is the same as FirewallType . This setting is provided for use by beans that do not directly expose Firewall properties.

FirewallUser
A user name if authentication is to be used connecting through a firewall
If the FirewallHost is specified, the FirewallUser and FirewallPassword settings are used to connect and authenticate to the Firewall. If the authentication fails, the bean throws an exception.NOTE: This is the same as User . This setting is provided for use by beans that do not directly expose Firewall properties.

KeepAliveTime
The inactivity time in milliseconds before a TCP keep-alive packet is sent
When set, TCPKeepAlive will automatically be set to true. By default the operating system will determine the time a connection is idle before a TCP keep-alive packet is sent. This system default if this value is not specified here is 2 hours. In many cases a shorter interval is more useful. Set this value to the desired interval in milliseconds.Note: This value is not applicable in Java.

KeepAliveInterval
The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received
When set, TCPKeepAlive will automatically be set to true. A TCP keep-alive packet will be sent after a period of inactivity as defined by KeepAliveTime . If no acknowledgement is received from the remote host the keep-alive packet will be re-sent. This setting specifies the interval at which the successive keep-alive packets are sent in milliseconds. This system default if this value is not specified here is 1 second.Note: This value is not applicable in Java or MAC.

Linger
When set to True, connections are terminated gracefully
This property controls how a connection is closed. The default is True.In the case that Linger is True (default), there are two scenarios for determining how long the connection will linger. The first, if LingerTime is 0 (default), the system will attempt to send pending data for a connection until the default IP protocol timeout expires.

In the second scenario, LingerTime is a positive value, the system will attempt to send pending data until the specified LingerTime is reached. If this attempt fails, then the system will reset the connection.

The default behavior (which is also the default mode for stream sockets) might result in a long delay in closing the connection. Although the bean returns control immediately, the system could hold system resources until all pending data is sent (even after your application closes).

Setting this property to False forces an immediate disconnection. If you know that the other side has received all the data you sent (by a client acknowledgment, for example), setting this property to False might be the appropriate course of action.

LingerTime
Time in seconds to have the connection linger
LingerTime is the time, in seconds, to leave the socket connection linger. This value is 0 by default, which means it will use the default IP protocol timeout.
LocalHost
The name of the local host through which connections are initiated or accepted
The LocalHost setting contains the name of the local host as obtained by the gethostname() system call, or if the user has assigned an IP address, the value of that address.In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.

If the bean is connected, the LocalHost setting shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface).

LocalPort
The TCP port in the local host where the bean binds
This must be set before a connection is attempted. It instructs the bean to bind to a specific port (or communication endpoint) in the local machine.Setting this to 0 (default) enables the system to choose a port at random. The chosen port will be shown by LocalPort after the connection is established.

LocalPort cannot be changed once a connection is made. Any attempt to set this when a connection is active will generate an error.

This; setting is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems.

MaxLineLength
The maximum amount of data to accumulate when no EOL is found
MaxLineLength is the size of an internal buffer, which holds received data while waiting for an EOL string.If an EOL string is found in the input stream before MaxLineLength bytes are received, the DataIn event is fired with the EOL parameter set to True, and the buffer is reset.

If no EOL is found, and MaxLineLength bytes are accumulated in the buffer, the DataIn event is fired with the EOL parameter set to False, and the buffer is reset.

The minimum value for MaxLineLength is 256 bytes. The default value is 2048 bytes. The maximum value is 65536 bytes.

MaxTransferRate
The transfer rate limit in bytes per second
This setting can be used to throttle outbound TCP traffic. Set this to the number of bytes to be sent per second. By default this is not set and there is no limit.
TCPKeepAlive
Determines whether or not the keep alive socket option is enabled
If set to true, the socket's keep-alive option is enabled and keep-alive packets will be sent periodically to maintain the connection. Set KeepAliveTime and KeepAliveInterval to configure the timing of the keep-alive packets.Note: This value is not applicable in Java.

UseIPv6
Whether or not to use IPv6
By default, the component expects an IPv4 address for local and remote host properties, and will create an IPv4 socket. To use IPv6 instead, set this to True.
CloseStreamAfterTransfer
If true, the component will close the upload or download stream after the transfer
This entry is for bean and all the components that descend from it.This property is true by default. Therefore, by default, all streams will be closed after a transfer is completed. In order to keep streams open after the transfer of data, you must set this config to false.

TcpNoDelay
Whether or not to delay when sending packets
When true, the socket will send all data that is ready to send at once. When false, the socket will send smaller buffered packets of data at small intervals. This is known as the Nagle algorithm.By default, this config is set to false.

Socket Configuration Settings

AbsoluteTimeout
Determines whether timeouts are inactivity timeouts or absolute timeouts
If AbsoluteTimeout is set to True, any method which does not complete within Timeout seconds will be aborted. By default, AbsoluteTimeout is False, and the timeout is an inactivity timeout.
FirewallData
Used to send extra data to the firewall
When the firewall is a tunneling proxy, use this property to send custom (additional) headers to the firewall (e.g. headers for custom authentication schemes).
InBufferSize
The size in bytes of the incoming queue of the socket
This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be receiving. Increasing the value of the InBufferSize setting can provide significant improvements in performance in some cases.Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the bean is activated the InBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

OutBufferSize
The size in bytes of the outgoing queue of the socket
This is the size of an internal queue in the TCP/IP stack. You can increase or decrease its size depending on the amount of data that you will be sending. Increasing the value of the OutBufferSize setting can provide significant improvements in performance in some cases.Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the bean is activated the OutBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small.

Base Configuration Settings

GUIAvailable
Tells the bean whether or not a message loop is available for processing events
In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The bean will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.In some non-GUI applications an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GuiAvailable to false will ensure that the bean does not attempt to process external events.

Throws:
IPWorksException

createEntry

public void createEntry()
                 throws IPWorksException
Creates a new entry within the specified OData service resource.

The component will use the items contained within EntryProperties to create a new entry within the feed service resource by ServiceRootURI and ResourcePath ( ServiceRootURI / ResourcePath ).

Upon a successful creation, all previous entries contained by the component, prior to the CreateEntry call, will be cleared and replaced with the response entry data. EntryIndex will then be set to 0 (the first entry within the response), populating the EntryAuthor , EntryETag , EntryTitle , EntrySummary , EntryUpdated , EntryLinks , and EntryProperties properties. OtherHeaders will also be cleared and thus will need to be reset accordingly with each call made.

Throws:
IPWorksException

customRequest

public void customRequest(java.lang.String HTTPMethod,
                          java.lang.String URL,
                          java.lang.String postData)
                   throws IPWorksException
Sends a request to the specified URL using the HTTP Method and Post Data provided.

Sends a custom request to the specified URL. The type of request sent is determined by HTTPMethod (e.g. POST) and the data sent is determined by PostData . If a custom request does not require data to be sent, you can simply set the PostData parameter to an empty string. Note, all values specified are taken as entered.

OtherHeaders can be used to specify any additional headers you would like to be sent in the custom request.

The search results are delivered in the TransferredData property, as well as through the Transfer event. The response headers can be retrieved via the TransferredHeaders property as well as through the Header event.

The bean will then attempt to parse the search results. Upon successfully parsing the response, Channel will be set with their associated feed element values and EntryCount will be populated with the total number of entries contained within the feed. EntryIndex will also be set to 1, thus populating EntryProperties .

Throws:
IPWorksException

deleteEntry

public void deleteEntry()
                 throws IPWorksException
Deletes an entry within an OData service resource.

The component will delete the entry, of an OData service resource, specified by ServiceRootURI and ResourcePath ( ServiceRootURI / ResourcePath ).

An "If-Match" header will be sent in the delete request with the value contained within EntryETag .

Upon a successful entry deletion, all previous entries contained by the component, prior to the DeleteEntry call, will be cleared. OtherHeaders will also be cleared and thus will need to be reset accordingly with each call made.

Throws:
IPWorksException

getEntryProperty

public java.lang.String getEntryProperty(java.lang.String XPath)
                                  throws IPWorksException
Get an OData entry property.

This method is intended for extending functionality of the OData bean and will retrieve the value of the entry property specified by XPath . XPath is the XPath of the element or attribute according to the following convention: entry[x]/element@attribute . The @attribute part is optional. When EntryIndex is set to an index greater than or equal to zero, a relative path can also be used: property or property@attribute . When a relative path is specified, the value of the specified XPath will be returned for the entry identified by EntryIndex .

entry[x] is the feed's xth entry (or any other root level child), where the indexer x starts at 1.

property is any child of the properties element, and attribute can be any attribute of that field. If an attribute is not supplied, the GetEntryProperty method will return the text portion of property . For example:

 \011ODataControl.GetEntryProperty("entry[5]/content/properties/ID")
 \011ODataControl.GetEntryProperty("entry[5]/content/properties/ID@type") 

Here is an example using a relative path to retrieve properties of the first feed entry:

 \011ODataControl.EntryIndex = 1
 \011ODataControl.GetEntryProperty("ID")
 \011ODataControl.GetEntryProperty("ID@type")
 \011ODataControl.GetEntryProperty("Address/State") 

Throws:
IPWorksException

getSchema

public void getSchema()
               throws IPWorksException
Retrieves the schema for a service.

This method will retrieve the schema (metadata document) of the service specified by ServiceRootURI .

Upon successful retrieval of the schema, you can set SchemaEntityIndex to retrieve the names of the entities contained within the schema along with their keys, properties, and navigation properties.

If you wish to retrieve additional details about the schema, they can be retrieved via XPath .

Throws:
IPWorksException

hasXPath

public boolean hasXPath(java.lang.String xpath)
                 throws IPWorksException
Determines whether a specific element exists in the document.

You can use the HasXPath method to determine if a particular XPath exists before setting it with XPath .

The XPath property implements a subset of the XML XPath specification, allowing you to point to specific elements in the document.

The path is a series of one or more element accessors separated by '/'. The path can be absolute (starting with '/') or relative to the current XPath location.

Setting the XPath property to an XPath that does not exist will cause an error.

Throws:
IPWorksException

queryService

public void queryService()
                  throws IPWorksException
Queries an OData service using the specified parameters.

Queries an OData feed specified by ServiceRootURI and ResourcePath ( ServiceRootURI / ResourcePath ) using the query options specified in the Query*** properties and OtherQueryOptions . To fetch an OData feed, without performing any filtering, you can leave Query*** and OtherQueryOptions empty and call QueryService .

The query results are delivered in the TransferredData property, as well as through the Transfer event. The response headers can be retrieved via the ParsedHeaders property as well as through the Header event.

The bean will then attempt to parse the query results. Upon successfully parsing the response, Channel will be set with their associated feed element values and EntryCount will be populated with the total number of entries contained within the feed. EntryIndex will also be set to 1, thus populating EntryAuthor , EntryETag , EntryTitle , EntrySummary , EntryUpdated , EntryLinks , EntryProperties and ResourcePath .

Throws:
IPWorksException

reset

public void reset()
           throws IPWorksException
Reset all properties of the bean.

The Reset method resets all properties to the bean's default settings. This is an easy way to clear all of the property values before repopulating the OData feed.

Throws:
IPWorksException

setEntryProperty

public void setEntryProperty(java.lang.String XPath,
                             java.lang.String value)
                      throws IPWorksException
Set an OData entry property.

This method is intended for extending functionality of the OData bean and will set the value of the entry property (specified by XPath ) to the specified Value . Therefore the value of the corresponding property will be updated within EntryProperties .

XPath is the XPath of the element or attribute according to the following convention: entry[x]/element . When EntryIndex is set to an index greater than or equal to zero, a relative path can also be used: property . When a relative path is specified, the bean will use the specified EntryIndex along with the property specified to update the EntryProperty value.

entry[x] is the feed's xth entry (or any other root level child), where the indexer x starts at 1.

property is any child of the properties element. For example:

 \011ODataControl.SetEntryProperty("entry[5]/content/properties/Name", "MyNewName") 

Here is an example using a relative path to retrieve properties of the first feed entry:

 \011ODataControl.EntryIndex = 1
 \011ODataControl.SetEntryProperty("Name", "MyNewName")
 \011ODataControl.SetEntryProperty("Address/State", "NC") 

Throws:
IPWorksException

setSchemaEntity

public void setSchemaEntity(java.lang.String name)
                     throws IPWorksException
Sets the schema entity.

The bean will set the schema entity to the Name specified. Once set, you can view the keys (via SchemaKeys ), properties (via SchemaProperty ) and navigation properties (via SchemaAssociation ) contained within the specified entity.

Throws:
IPWorksException

setSchemaProperty

public void setSchemaProperty(java.lang.String name)
                       throws IPWorksException
Sets the schema property.

The bean will set the schema property to the Name specified. Once set, you can view the details of the property (via SchemaProperty ) along with the complex type details (via SchemaTypeField ); provided that the property is derived from the complex type.

Throws:
IPWorksException

setSchemaType

public void setSchemaType(java.lang.String name)
                   throws IPWorksException
Sets the schema type.

The bean will set the schema type to the Name specified. Once set, you can view the details of the complex type (via SchemaTypeField ).

Throws:
IPWorksException

updateEntry

public void updateEntry()
                 throws IPWorksException
Update an OData entry.

The bean will update the OData entry specified by ServiceRootURI and ResourcePath ( ServiceRootURI / ResourcePath ). It will update the OData entry with the elements specified by EntryProperties .

Upon a successful update, all previous entries contained by the component, prior to the UpdateEntry call, will be cleared and replaced with the response entry data. EntryIndex will then be set to 0 (the first entry within the response), populating the EntryAuthor , EntryETag , EntryTitle , EntrySummary , EntryUpdated , EntryLinks , EntryProperties and ResourcePath properties. OtherHeaders will also be cleared and thus will need to be reset accordingly with each call made.

Throws:
IPWorksException

updateProperty

public void updateProperty(java.lang.String XPath,
                           java.lang.String value)
                    throws IPWorksException
Update an OData entry property.

The bean will update the OData entry specified by ServiceRootURI and ResourcePath ( ServiceRootURI / ResourcePath ). It will update only the single entry property specified by XPath with the specified Value .

Upon a successful update, all previous entries contained by the component, prior to the UpdateProperty call, will be cleared and replaced with the response entry data. EntryIndex will then be set to 0 (the first entry within the response), populating the EntryAuthor , EntryETag , EntryTitle , EntrySummary , EntryUpdated , EntryLinks , EntryProperties and ResourcePath . OtherHeaders will also be cleared and thus will need to be reset accordingly with each call made.

Throws:
IPWorksException

addOdataEventListener

public void addOdataEventListener(OdataEventListener l)
                           throws java.util.TooManyListenersException
Throws:
java.util.TooManyListenersException

removeOdataEventListener

public void removeOdataEventListener(OdataEventListener l)

IP*Works! V9

Copyright (c) 2013 /n software inc. - All rights reserved.