Class WSRequest
- All Implemented Interfaces:
HasHandlers
All properties which are legal on RPCRequest are legal on a WSRequest, in addition to the properties listed here.
-
Field Summary
Fields inherited from class com.smartgwt.client.core.RefDataClass
idFields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetData()Data to be serialized to XML to form the SOAP body.Data to be serialized to form the SOAP headers, as a map from the header part name to the data.static WSRequestgetOrCreateRef(JavaScriptObject jsObj) WhenuseFlatFieldsis set for a request to be sent to a WSDL web service, when creating the input XML message to send to the web service, properties indatawill be used as the values for XML elements of the same name, at any level of nesting.Name of the web service operation to invoke.voidsetData(JavaScriptObject data) Data to be serialized to XML to form the SOAP body.Data to be serialized to XML to form the SOAP body.voidsetHeaderData(Map headerData) Data to be serialized to form the SOAP headers, as a map from the header part name to the data.voidsetUseFlatFields(Boolean useFlatFields) WhenuseFlatFieldsis set for a request to be sent to a WSDL web service, when creating the input XML message to send to the web service, properties indatawill be used as the values for XML elements of the same name, at any level of nesting.voidsetWsOperation(String wsOperation) Name of the web service operation to invoke.voidsetXmlNamespaces(XmlNamespaces xmlNamespaces) Optional object declaring namespace prefixes for use in evaluating theresultTypeparameter ofWebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback), if resultType is an XPath.Methods inherited from class com.smartgwt.client.rpc.RPCRequest
downloadCallback, getActionURL, getAllowIE9Leak, getBypassCache, getCallbackParam, getContainsCredentials, getContentType, getDataAsString, getDownloadResult, getDownloadToNewWindow, getEvalResult, getHttpHeaders, getHttpMethod, getHttpProxyURL, getIgnoreTimeout, getIsBackgroundRequest, getMockMode, getOmitNullMapValuesInResponse, getParams, getPrompt, getPromptCursor, getPromptDelay, getPromptStyle, getReportDownloadErrorsAsDocuments, getSendNoQueue, getServerOutputAsString, getShowPrompt, getSuppressAutoDraw, getTimeout, getTransport, getUseCursorTracker, getUseHttpProxy, getUseSimpleHttp, getUseStrictJSON, getWillHandleError, getWithCredentials, isDSRequest, setActionURL, setAllowIE9Leak, setBypassCache, setCallbackParam, setContainsCredentials, setContentType, setData, setData, setDownloadResult, setDownloadToNewWindow, setEvalResult, setEvalVars, setHttpHeaders, setHttpMethod, setHttpProxyURL, setIgnoreTimeout, setIsBackgroundRequest, setMockMode, setOmitNullMapValuesInResponse, setParams, setPrompt, setPromptCursor, setPromptDelay, setPromptStyle, setReportDownloadErrorsAsDocuments, setSendNoQueue, setServerOutputAsString, setShowPrompt, setSuppressAutoDraw, setTimeout, setTransport, setUseCursorTracker, setUseHttpProxy, setUseSimpleHttp, setUseStrictJSON, setWillHandleError, setWithCredentials, xhr_onProgressMethods inherited from class com.smartgwt.client.core.RefDataClass
getRef, getRef, internalSetIDMethods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
-
Constructor Details
-
WSRequest
public WSRequest() -
WSRequest
-
-
Method Details
-
getOrCreateRef
-
setWsOperation
Name of the web service operation to invoke.- Parameters:
wsOperation- wsOperation Default value is null
-
getWsOperation
Name of the web service operation to invoke.- Returns:
- String
-
setUseFlatFields
WhenuseFlatFieldsis set for a request to be sent to a WSDL web service, when creating the input XML message to send to the web service, properties indatawill be used as the values for XML elements of the same name, at any level of nesting.useFlatFieldsallows you to ignore gratuitous XML message structure, such as extra levels of nested elements, and provides some insulation against changes in the required structure of the input message.For example, given this input message:
<FindServices> <searchFor>search text</searchFor> <Options> <caseSensitive>false</caseSensitive> </Options> <IncludeInSearch> <serviceName>true</serviceName> <documentation>true</documentation> <keywords>true</keywords> </IncludeInSearch> </FindServices>
IfuseFlatFieldswere not set, in order to fill out this message correctly,request.datawould need to be:{ searchFor: "search text", Options : { caseSensitive: false, }, IncludeInSearch : { serviceName: true, documentation : true, keywords : true } }However if useFlatFields were set,request.datacould be just:{ searchFor: "search text", caseSensitive: false, serviceName: true, documentation : true, keywords : true }useFlatFieldsis often set when the input data comes from aDynamicFormto avoid the cumbersome and fragile process of mapping input fields to an XML structure.useFlatFieldscan also be set to cause all dsRequests of a particular type touseFlatFieldsautomatically.For
DataBoundComponent,useFlatFieldscan be set use "flattened" binding to fields of a WSDL message or XML Schema.Note that
useFlatFieldsis not generally recommended for use with XML input messages where multiple simple type fields exist with the same name, however if used in this way, the first field to use a given name wins. "first" means the first field encountered in a depth first search. "wins" means only the first field will be populated in the generated XML message.- Parameters:
useFlatFields- useFlatFields Default value is null
-
getUseFlatFields
WhenuseFlatFieldsis set for a request to be sent to a WSDL web service, when creating the input XML message to send to the web service, properties indatawill be used as the values for XML elements of the same name, at any level of nesting.useFlatFieldsallows you to ignore gratuitous XML message structure, such as extra levels of nested elements, and provides some insulation against changes in the required structure of the input message.For example, given this input message:
<FindServices> <searchFor>search text</searchFor> <Options> <caseSensitive>false</caseSensitive> </Options> <IncludeInSearch> <serviceName>true</serviceName> <documentation>true</documentation> <keywords>true</keywords> </IncludeInSearch> </FindServices>
IfuseFlatFieldswere not set, in order to fill out this message correctly,request.datawould need to be:{ searchFor: "search text", Options : { caseSensitive: false, }, IncludeInSearch : { serviceName: true, documentation : true, keywords : true } }However if useFlatFields were set,request.datacould be just:{ searchFor: "search text", caseSensitive: false, serviceName: true, documentation : true, keywords : true }useFlatFieldsis often set when the input data comes from aDynamicFormto avoid the cumbersome and fragile process of mapping input fields to an XML structure.useFlatFieldscan also be set to cause all dsRequests of a particular type touseFlatFieldsautomatically.For
DataBoundComponent,useFlatFieldscan be set use "flattened" binding to fields of a WSDL message or XML Schema.Note that
useFlatFieldsis not generally recommended for use with XML input messages where multiple simple type fields exist with the same name, however if used in this way, the first field to use a given name wins. "first" means the first field encountered in a depth first search. "wins" means only the first field will be populated in the generated XML message.- Returns:
- Boolean
-
setHeaderData
Data to be serialized to form the SOAP headers, as a map from the header part name to the data. For example, given WSDL like this:<soap:header part="SessionHeader" message="tns:HeaderMessage"/> <soap:header part="CallOptions" message="tns:HeaderMessage/>
headerDatalike this might be provided:dsRequest.headerData = { SessionHeader : data CallOptions : data };The provided data will be serialized to XML by thecom.smartgwt.client.data.WebService#getInputHeaderSchemaviaDataSource.xmlSerialize(com.google.gwt.core.client.JavaScriptObject)- Parameters:
headerData- headerData Default value is null
-
getHeaderData
Data to be serialized to form the SOAP headers, as a map from the header part name to the data. For example, given WSDL like this:<soap:header part="SessionHeader" message="tns:HeaderMessage"/> <soap:header part="CallOptions" message="tns:HeaderMessage/>
headerDatalike this might be provided:dsRequest.headerData = { SessionHeader : data CallOptions : data };The provided data will be serialized to XML by thecom.smartgwt.client.data.WebService#getInputHeaderSchemaviaDataSource.xmlSerialize(com.google.gwt.core.client.JavaScriptObject)- Returns:
- headerData Default value is null
-
setData
Data to be serialized to XML to form the SOAP body.- Overrides:
setDatain classRPCRequest- Parameters:
data- data Default value is null- See Also:
-
setData
Data to be serialized to XML to form the SOAP body.- Overrides:
setDatain classRPCRequest- Parameters:
data- data Default value is null- Returns:
WSRequestinstance, for chaining setter calls- See Also:
-
com.smartgwt.client.rpc.RPCResponse#setData
-
getData
Data to be serialized to XML to form the SOAP body.- Overrides:
getDatain classRPCRequest- Returns:
- the data
- See Also:
-
getDataAsMap
-
setXmlNamespaces
Optional object declaring namespace prefixes for use in evaluating theresultTypeparameter ofWebService.callOperation(java.lang.String, java.util.Map, java.lang.String, com.smartgwt.client.data.WebServiceCallback), if resultType is an XPath.Format is identical to
xmlNamespaces, and default namespaces bindings are also identical.- Parameters:
xmlNamespaces- xmlNamespaces Default value is null
-