com.smartgwt.client.data
Class WebService

java.lang.Object
  extended by com.smartgwt.client.core.JsObject
      extended by com.smartgwt.client.data.WebService

public class WebService
extends JsObject


Field Summary
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
WebService(com.google.gwt.core.client.JavaScriptObject jsObj)
           
 
Method Summary
 void callOperation(java.lang.String operationName, java.util.Map paramData, java.lang.String resultType, WebServiceCallback callback)
           
static WebService get(java.lang.String serviceNamespace)
          Retrieve a WebService object by the targetNamespace declared on the element in the WSDL file from which the WebService was derived.
 DataSource getFetchDS(java.lang.String operationName, java.lang.String resultType)
          Retrieve a DataSource that provides read-only access to records returned by a web service operation.
 DataSource getFetchDS(java.lang.String operationName, java.lang.String resultType, OperationBinding operationBindingProperties)
          Retrieve a DataSource that provides read-only access to records returned by a web service operation.
 DataSource getInputDS(java.lang.String operationName)
          Get a DataSource representing the input message to a web service operation.
 DataSource getSchema(java.lang.String schemaName)
          Get the schema definition of any complexType or element of complexType defined in any blocks in the WSDL file this WebService represents.
 DataSource getSchema(java.lang.String schemaName, java.lang.String schemaType)
          Get the schema definition of any complexType or element of complexType defined in any blocks in the WSDL file this WebService represents.
 void setLocation(java.lang.String url)
          Set location can be used when the actual URL where a service will be accessible isn't known until runtime, or changes at runtime, hence can't be embedded in the service definition.
 void setLocation(java.lang.String url, java.lang.String operation)
          Set location can be used when the actual URL where a service will be accessible isn't known until runtime, or changes at runtime, hence can't be embedded in the service definition.
 
Methods inherited from class com.smartgwt.client.core.JsObject
getJsObj, isCreated, setJsObj
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebService

public WebService(com.google.gwt.core.client.JavaScriptObject jsObj)
Method Detail

callOperation

public void callOperation(java.lang.String operationName,
                          java.util.Map paramData,
                          java.lang.String resultType,
                          WebServiceCallback callback)

setLocation

public void setLocation(java.lang.String url)
Set location can be used when the actual URL where a service will be accessible isn't known until runtime, or changes at runtime, hence can't be embedded in the service definition.
With an operation parameter, setLocation() can be used to set a distinct URL for each web service operation. This is a development-time only feature that allows XML flat files to be placed at various URLs on a server, to serve as spoofed responses for each web service operation.

Parameters:
url - the URL where web service can be contacted

setLocation

public void setLocation(java.lang.String url,
                        java.lang.String operation)
Set location can be used when the actual URL where a service will be accessible isn't known until runtime, or changes at runtime, hence can't be embedded in the service definition.
With an operation parameter, setLocation() can be used to set a distinct URL for each web service operation. This is a development-time only feature that allows XML flat files to be placed at various URLs on a server, to serve as spoofed responses for each web service operation.

Parameters:
url - the URL where web service can be contacted
operation - optional operation name to set the location for, for debugging only

getInputDS

public DataSource getInputDS(java.lang.String operationName)
Get a DataSource representing the input message to a web service operation. This DataSource is suitable for use as form.dataSource for a form that the user fills out when providing inputs to call this web service operation.

Parameters:
operationName - name of the web service operation whose inputs the returned DataSource will represent
Returns:
DataSource representing the input message of a web service operation

getFetchDS

public DataSource getFetchDS(java.lang.String operationName,
                             java.lang.String resultType)
Retrieve a DataSource that provides read-only access to records returned by a web service operation.
DataBound Components can be bound to the returned DataSource, and the fetchData() method can be invoked to retrieve data from the web service.
The returned DataSource is only capable of the "fetch" DataSource operation, not "update", "add" or "remove". To create a DataSource capable of full read-write access, use DataSource.operationBindings with the wsOperation property set to associate each DataSource operation with a web service operation.

Parameters:
operationName - name of the web service operation to invoke to fetch records
resultType - tag or type name of the XML element to be returned as DataSource records
Returns:
dDataSource representing the fetch message of a web service operation

getFetchDS

public DataSource getFetchDS(java.lang.String operationName,
                             java.lang.String resultType,
                             OperationBinding operationBindingProperties)
Retrieve a DataSource that provides read-only access to records returned by a web service operation.
DataBound Components can be bound to the returned DataSource, and the fetchData() method can be invoked to retrieve data from the web service.
The returned DataSource is only capable of the "fetch" DataSource operation, not "update", "add" or "remove". To create a DataSource capable of full read-write access, use DataSource.operationBindings with the wsOperation property set to associate each DataSource operation with a web service operation.

Parameters:
operationName - name of the web service operation to invoke to fetch records
resultType - tag or type name of the XML element to be returned as DataSource records
operationBindingProperties - additional properties for the operationType:"fetch" operationBinding which this method automatically creates. This can be used to set properties such as OperationBinding.setUseFlatFields(Boolean) or OperationBinding.setRecordXPath(String)
Returns:
dDataSource representing the fetch message of a web service operation

getSchema

public DataSource getSchema(java.lang.String schemaName)
Get the schema definition of any complexType or element of complexType defined in any blocks in the WSDL file this WebService represents.

Parameters:
schemaName - name of type or element
Returns:
requested schema

getSchema

public DataSource getSchema(java.lang.String schemaName,
                            java.lang.String schemaType)
Get the schema definition of any complexType or element of complexType defined in any blocks in the WSDL file this WebService represents.

Parameters:
schemaName - name of type or element
schemaType - optional type of schema to return, either "element" for xs:element definitions only or "type" for xs:complexType definitions. If unspecified, either will be returned, with types preferred if names collide
Returns:
requested schema

get

public static WebService get(java.lang.String serviceNamespace)
Retrieve a WebService object by the targetNamespace declared on the element in the WSDL file from which the WebService was derived.

Parameters:
serviceNamespace - uri from the "targetNamespace" attribute of the element in the WSDL file
Returns:
the requested WebService, or null if not loaded