|
VLJ Iteration II, v. 1.0.0.193 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--VistaLinkResponseVOImpl | +--gov.va.med.foundations.rpc.RpcResponse
Represents a data structure which holds the response value(s).
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
// create the callback handler CallbackHandlerSwing cbhSwing = new CallbackHandlerSwing(myFrame); // create the LoginContext loginContext = new LoginContext("Production", cbhSwing); // login to server loginContext.login(); //Gets the principal that contains the VistaLinkConnection VistaKernelPrincipalImpl myPrincipal = VistaKernelPrincipalImpl. getKernelPrincipal(loginContext.getSubject()); //Get the VistaLinkConnection VistaLinkConnection myConnection = myPrincipal.getAuthenticatedConnection(); //request and response objects RpcRequest vReq = null; RpcResponse vResp = null; //The Rpc Context String rpcContext = "XOBV VISTALINK TESTER"; //The Rpc to call String rpcName = "XOBV TEST PING"; //Construct the request object vReq = RpcRequestFactory.getRpcRequest(rpcContext, rpcName); //Execute the Rpc and get the response vResp = myConnection.executeRPC(vReq); //Display the response System.out.println(vResp.getRawResponse());
Method Summary | |
java.lang.String |
getResults()
Gets the results string for the returned data in this response. |
org.w3c.dom.Document |
getResultsDocument()
Gets an XML Document format based on the contains of the results returned by the RPC. |
java.lang.String |
getResultsType()
Gets the return type of the results sent back from the M VistAServer. |
void |
setResultsType(java.lang.String resultsType)
Deprecated. This method will be removed after the REMOTE PROCEDURE (#8894) file adds an XML return type. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public org.w3c.dom.Document getResultsDocument() throws RpcResponseTypeIsNotXmlException, FoundationsException
RpcResponseTypeIsNotXmlException
- results type must be 'xml'
FoundationsException
public java.lang.String getResults()
public java.lang.String getResultsType()
public void setResultsType(java.lang.String resultsType)
resultsType
- The resultsType to set
|
VLJ Iteration II, v. 1.0.0.193 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |