public class RpcResponse extends VistaLinkResponseVOImpl
It is extremely important that any code which might create a new RpcResponse be encased in a try catch block so that VistaLinkfaultException and FoundationsException can be caught.
J2SE Example:
//The Rpc Context
//The Rpc to call
//Construct the request object
//Execute the Rpc and get the response
//Display the response
//request and response objects
RpcRequest vReq = null;
RpcResponse vResp = null;
String rpcContext = "XOBV VISTALINK TESTER";
String rpcName = "XOBV TEST PING";
vReq = RpcRequestFactory.getRpcRequest(rpcContext, rpcName);
vResp = myConnection.executeRPC(vReq);
System.out.println(vResp.getRawResponse());
| Modifier and Type | Field and Description |
|---|---|
protected static String |
GOV_VA_MED_FOUNDATIONS_FAULT
The message type used to indicate a system/foundations fault
|
protected static String |
GOV_VA_MED_FOUNDATIONS_SECURITY_FAULT
The message type used to indicate a security fault
|
protected static String |
GOV_VA_MED_RPC_FAULT
The message type used to indicate RPC fault
|
protected static String |
GOV_VA_MED_RPC_RESPONSE
The message type used for this response
|
filteredXml, msgType, rawXml, xdoc| Modifier | Constructor and Description |
|---|---|
protected |
RpcResponse(String rawXml,
String filteredXml,
Document doc,
String messageType,
String cdataFromXml,
String resultsType)
Constructor RpcResponse.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getResults()
Gets the results string for the returned data in this response.
|
Document |
getResultsDocument()
Gets an XML Document format based on the contains of the results returned by the RPC.
|
String |
getResultsType()
Gets the return type of the results sent back from the M VistAServer.
|
void |
setResultsType(String resultsType)
Sets the resultsType.
|
getDocument, getFilteredXml, getRawResponseprotected static final String GOV_VA_MED_RPC_RESPONSE
protected static final String GOV_VA_MED_RPC_FAULT
protected static final String GOV_VA_MED_FOUNDATIONS_FAULT
protected static final String GOV_VA_MED_FOUNDATIONS_SECURITY_FAULT
public Document getResultsDocument() throws RpcResponseTypeIsNotXmlException, FoundationsException
Note: This XML document is created during the call to this method and not as part of the creation of the RpcResponse object.
If calling application wants to use this method, it should use generic xml DOM interfaces from org.w3c.dom.* package.
Alternatively if application wants to use this document in a specific XML parser implementation, parser should be able to create a specific Document implementation from org.w3c.dom.Document interface. In this case it might be better from performance standpiont to use getResults() and parse xml string directly.
RpcResponseTypeIsNotXmlException - results type must be 'xml'FoundationsExceptionpublic String getResults()
public String getResultsType()
public void setResultsType(String resultsType)
resultsType - The resultsType to setCopyright © 2026. All rights reserved.