|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.smartgwt.client.core.JsObject
com.smartgwt.client.data.WebService
public class WebService
Field Summary |
---|
Fields inherited from class com.smartgwt.client.core.JsObject |
---|
jsObj |
Constructor Summary | |
---|---|
WebService(JavaScriptObject jsObj)
|
Method Summary | |
---|---|
void |
callOperation(String operationName,
Map paramData,
String resultType,
WebServiceCallback callback)
Invoke a web service operation. |
void |
callOperation(String operationName,
Map paramData,
String resultType,
WebServiceCallback callback,
WSRequest wsRequestProperties)
Invoke a web service operation. |
static WebService |
get(String serviceNamespace)
Retrieve a WebService object by the targetNamespace declared on the |
DataSource |
getFetchDS(String operationName,
String resultType)
Retrieve a DataSource that provides read-only access to records returned by a web service operation. |
DataSource |
getFetchDS(String operationName,
String resultType,
OperationBinding operationBindingProperties)
Retrieve a DataSource that provides read-only access to records returned by a web service operation. |
DataSource |
getInputDS(String operationName)
Get a DataSource representing the input message to a web service operation. |
DataSource |
getSchema(String schemaName)
Get the schema definition of any complexType or element of complexType defined in any |
DataSource |
getSchema(String schemaName,
String schemaType)
Get the schema definition of any complexType or element of complexType defined in any |
void |
setLocation(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(String url,
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 |
---|
public WebService(JavaScriptObject jsObj)
Method Detail |
---|
public void callOperation(String operationName, Map paramData, String resultType, WebServiceCallback callback)
The data
parameter will be serialized to XML to form the input message for
the operation, as described by ${isc.DocUtils.linkForRef('method:DataSource.xmlSerialize')}. Namespacing,
element ordering, and SOAP encoding rules are automatically followed. If the web
service you are trying to contact requires a complicated nested structure, consider
using
WSRequest.setUseFlatFields(Boolean)
to simplify the required JavaScript input data.
The resultType
selects what part of the message should be decoded to
JavaScript and made
available as the "data" variable in the callback. The
resultType
parameter can be either:
DataSource.recordsFromXML(Object)
.
In this case, since the XML Schema type of the
NOTE: callOperation()
is appropriate for simple operations that do not
involve DataBound Components, such as logging into a web service,
or retrieving simple
String data. callOperation()
can also be used to retrieve small, read-only
datasets such as the option list for a SelectItem, but only if the dataset is guaranteed
to remain small enough for paging to be unnecessary.
For any larger datasets or
anything that will be edited, DataSource integration is more appropriate.
operationName
- Name of the operation to invokeparamData
- data to serialize as XML to form the inbound message of the operationresultType
- Type, Element name, or XPath that should be selected from the resultcallback
- Callback to invoke on completionpublic void callOperation(String operationName, Map paramData, String resultType, WebServiceCallback callback, WSRequest wsRequestProperties)
The data
parameter will be serialized to XML to form the input message for
the operation, as described by ${isc.DocUtils.linkForRef('method:DataSource.xmlSerialize')}. Namespacing,
element ordering, and SOAP encoding rules are automatically followed. If the web
service you are trying to contact requires a complicated nested structure, consider
using
WSRequest.setUseFlatFields(Boolean)
to simplify the required JavaScript input data.
The resultType
selects what part of the message should be decoded to
JavaScript and made
available as the "data" variable in the callback. The
resultType
parameter can be either:
DataSource.recordsFromXML(Object)
.
In this case, since the XML Schema type of the
NOTE: callOperation()
is appropriate for simple operations that do not
involve DataBound Components, such as logging into a web service,
or retrieving simple
String data. callOperation()
can also be used to retrieve small, read-only
datasets such as the option list for a SelectItem, but only if the dataset is guaranteed
to remain small enough for paging to be unnecessary.
For any larger datasets or
anything that will be edited, DataSource integration is more appropriate.
operationName
- Name of the operation to invokeparamData
- data to serialize as XML to form the inbound message of the operationresultType
- Type, Element name, or XPath that should be selected from the resultcallback
- Callback to invoke on completionwsRequestProperties
- Additional properties for the WSRequest, such as HTTPHeaderspublic void setLocation(String url)
url
- the URL where web service can be contactedpublic void setLocation(String url, String operation)
url
- the URL where web service can be contactedoperation
- optional operation name to set the location for, for debugging onlypublic DataSource getInputDS(String operationName)
operationName
- name of the web service operation whose inputs the returned DataSource will represent
public DataSource getFetchDS(String operationName, String resultType)
operationName
- name of the web service operation to invoke to fetch recordsresultType
- tag or type name of the XML element to be returned as DataSource records
public DataSource getFetchDS(String operationName, String resultType, OperationBinding operationBindingProperties)
operationName
- name of the web service operation to invoke to fetch recordsresultType
- tag or type name of the XML element to be returned as DataSource recordsoperationBindingProperties
- 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)
public DataSource getSchema(String schemaName)
schemaName
- name of type or element
public DataSource getSchema(String schemaName, String schemaType)
schemaName
- name of type or elementschemaType
- 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
public static WebService get(String serviceNamespace)
serviceNamespace
- uri from the "targetNamespace" attribute of the
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |