public interface WebServiceResource extends XmlResourceBase
WebServiceResource
interface represents an Web Service Resource. A Web Service Resource is used
to call a web service, either locally or remotely.
Modifier and Type | Method and Description |
---|---|
void |
call()
Calls the default adapter specified on the Web Service Resource.
|
void |
call(java.lang.String adapterName)
Calls the adapter specified by
adapterName on the Web Service Resource. |
fetch, getDocument, setDocument, update
getElementName, getElementType
void call() throws com.ebasetech.xi.exceptions.FormRuntimeException, com.ebasetech.xi.exceptions.SoapFaultException
Before the call request is processed, the update()
method is called internally - this transfers any non-tabular field data
to the resource from mapped form fields .
After the call request is processed, the fetch()
method is called internally - this transfers any non-tabular field data
from the resource to mapped form fields.
If the resource is mapped to tables in the form, resource data must be updated prior to invoking this method; this is done
using the updateTable()
method on all relevant tables. Similarly, any tables resulting from the call should be fetched after
invoking this method using the fetchTable()
method.
Javascript example:
// update the BOOKS_REQUEST table in the request document tables.BOOKS_REQUEST.updateTable(); // call the web service try { resources.BOOKS_WS.call(); } catch (e if e.javaException instanceof com.ebasetech.xi.exceptions.SoapFaultException) { log(e.javaException.message); } // load the BOOKS table from the response document tables.BOOKS.fetchTable();
call
in interface XmlResourceBase
com.ebasetech.xi.exceptions.SoapFaultException
- if the web service returns a SOAP Fault or if a client SOAP Fault is generated because it is not possible
to connect to the web servicecom.ebasetech.xi.exceptions.FormRuntimeException
- if any other error occurs during executioncall(String)
void call(java.lang.String adapterName) throws com.ebasetech.xi.exceptions.FormRuntimeException, com.ebasetech.xi.exceptions.SoapFaultException
adapterName
on the Web Service Resource.
Note that different adapters support different methods and not all adapters support this method.
Before the call request is processed, the update()
method is called internally - this transfers any non-tabular field data
to the resource from mapped form fields .
After the call request is processed, the fetch()
method is called internally - this transfers any non-tabular field data
from the resource to mapped form fields.
If the resource is mapped to tables in the form, resource data must be updated prior to invoking this method; this is done
using the updateTable()
method on all relevant tables. Similarly, any tables resulting from the call should be fetched after
invoking this method using the fetchTable()
method.
Javascript example:
// update the BOOKS_REQUEST table in the request document tables.BOOKS_REQUEST.updateTable(); // call the web service try { resources.BOOKS_WS.call("ADAPTER1"); } catch (e if e.javaException instanceof com.ebasetech.xi.exceptions.SoapFaultException) { log(e.javaException.message); } // load the BOOKS table from the response document tables.BOOKS.fetchTable();
call
in interface XmlResourceBase
adapterName
- the adapter to be calledcom.ebasetech.xi.exceptions.SoapFaultException
- if the web service returns a SOAP Fault or if a client SOAP Fault is generated because it is not possible
to connect to the web servicecom.ebasetech.xi.exceptions.FormRuntimeException
- if any other error occurs during executioncall()