01 package com.bea.medrec.webservices;
02
03 import com.bea.medrec.controller.PatientSession;
04 import com.bea.medrec.controller.RecordSession;
05 import com.bea.medrec.utils.JNDINames;
06 import com.bea.medrec.utils.ServiceLocator;
07 import javax.naming.NamingException;
08 import java.io.Serializable;
09
10 /**
11 * <p>MedRecBaseWebServices provides base class services for all MedRec Web services.</p>
12 *
13 * @author Copyright (c) 2006 by BEA Systems. All Rights Reserved.
14 */
15 public abstract class MedRecBaseWebServices implements Serializable {
16
17 // U T I L I T Y M E T H O D S
18 /**
19 * Get PatientSession
20 */
21 protected PatientSession getPatientSession() throws NamingException {
22 ServiceLocator locator = ServiceLocator.getInstance();
23 Object obj = locator.getObj(JNDINames.PATIENT_SESSION_REMOTE_HOME,
24 com.bea.medrec.controller.PatientSessionHome.class);
25 return (PatientSession) obj;
26 }
27
28 /**
29 * Get RecordSession
30 */
31 protected RecordSession getRecordSession() throws NamingException {
32 ServiceLocator locator = ServiceLocator.getInstance();
33 Object obj = locator.getObj(JNDINames.RECORD_SESSION_REMOTE_HOME,
34 com.bea.medrec.controller.RecordSessionHome.class);
35 return (RecordSession) obj;
36 }
37
38 /**
39 * Construct and throw javax.xml.rpc.soap.SOAPFaultException;
40 */
41 protected void captureException(MedRecWSResponse response,
42 String exceptionClause){
43 response.setExceptionClause(exceptionClause);
44 }
45 }
|