1.1 --- a/src/java/isac/kestore/KEStoreServices.java Mon Aug 30 18:57:59 2004 +0200
1.2 +++ b/src/java/isac/kestore/KEStoreServices.java Mon Aug 30 18:57:59 2004 +0200
1.3 @@ -1,8 +1,5 @@
1.4 /*
1.5 * Created on Jul 5, 2003
1.6 - *
1.7 - * To change the template for this generated file go to
1.8 - * Window>Preferences>Java>Code Generation>Code and Comments
1.9 */
1.10 package isac.kestore;
1.11
1.12 @@ -25,15 +22,13 @@
1.13 import org.w3c.dom.Node;
1.14 import org.w3c.dom.NodeList;
1.15 /**
1.16 - * @author gismo
1.17 - *
1.18 - * To change the template for this generated type comment go to
1.19 - * Window>Preferences>Java>Code Generation>Code and Comments
1.20 + * @author Andreas Griesmayer
1.21 */
1.22 public class KEStoreServices {
1.23 private String path_;
1.24
1.25 - KEStoreServices(String path){
1.26 + //WN040830 public for use in java-tests/../bridge
1.27 + public KEStoreServices(String path){
1.28 path_=path;
1.29 System.out.println("KEStoreServices default constructor called");
1.30 }
1.31 @@ -190,7 +185,7 @@
1.32 TransformerFactory tFactory = TransformerFactory.newInstance();
1.33 Transformer transformer = tFactory.newTransformer();
1.34 transformer.transform(source, result);
1.35 - return_value.add(output.toString());
1.36 + return_value.add(output.toString()); //WN040830 why Vector for 1 element ?
1.37 }catch(Exception exc){
1.38 System.out.println("KEStore:Exception "+exc.getMessage());
1.39 }
2.1 --- a/src/java/isac/util/InformationProcessor.java Mon Aug 30 18:57:59 2004 +0200
2.2 +++ b/src/java/isac/util/InformationProcessor.java Mon Aug 30 18:57:59 2004 +0200
2.3 @@ -1,8 +1,5 @@
2.4 /*
2.5 * Created on Aug 16, 2003
2.6 - *
2.7 - * To change the template for this generated file go to
2.8 - * Window>Preferences>Java>Code Generation>Code and Comments
2.9 */
2.10 package isac.util;
2.11
2.12 @@ -19,179 +16,183 @@
2.13
2.14 import org.apache.xmlrpc.XmlRpcClient;
2.15 import org.apache.xmlrpc.XmlRpcException;
2.16 +
2.17 /**
2.18 - * @author gismo
2.19 - *
2.20 - * The InformationProcessor builds the bridge between BrowserFrontend
2.21 - * and BrowserDialog. It encapsulates all tasks regarding communication and
2.22 - * connects to the proper dialog-modules.
2.23 + * @author Andreas Griesmayer
2.24 *
2.25 - * Because the final communication-protocol is not fixed yet, it provides methods
2.26 - * to communicate via RMI as well as XML-RPC
2.27 + * The InformationProcessor builds the bridge between BrowserFrontend and
2.28 + * BrowserDialog. It encapsulates all tasks regarding communication and connects
2.29 + * to the proper dialog-modules.
2.30 + *
2.31 + * Because the final communication-protocol is not fixed yet, it provides
2.32 + * methods to communicate via RMI as well as XML-RPC
2.33 */
2.34 public class InformationProcessor {
2.35
2.36 -/**
2.37 - * Performes an login on the session dialog using the XML-RPC protocol. It assumes that the
2.38 - * SessionDialog is running its XML-RPC-handler on port 1050 of the local machine.
2.39 - *
2.40 - * @param username username of the user who wants to login.
2.41 - * @param password corresponding password for the user.
2.42 - * @return the id of the current sesson the user logged in or null if the login did not succeed
2.43 - * @throws NullPointerException carrying the error-message if an communication error occured.
2.44 - */
2.45 - static protected String xmlLogin(String username, String password){
2.46 - try{
2.47 - XmlRpcClient sdialog = new XmlRpcClient("http://localhost:1050");
2.48 - Vector params = new Vector();
2.49 - params.add(username);
2.50 - params.add(password);
2.51 - Vector response = (Vector) sdialog.execute("SDialog.login", params);
2.52 - if(response.size()>0)
2.53 - return (String)response.elementAt(0);
2.54 - }catch(MalformedURLException e) {
2.55 - throw new NullPointerException(getErrorXML("Sorry, MalformedURLException while accessing the SDialog to login - is the SDialog runnig ?"+e.getMessage()));
2.56 - } catch (XmlRpcException e) {
2.57 - throw new NullPointerException(getErrorXML("Sorry, XmlRpcException while accessing the SDialog to login - is the SDialog runnig ?"+e.getMessage()));
2.58 - } catch (IOException e) {
2.59 - throw new NullPointerException(getErrorXML("Sorry, IOException while accessing the SDialog to login - is the SDialog runnig ?"+e.getMessage()));
2.60 + /**
2.61 + * Performes an login on the session dialog using the XML-RPC protocol. It
2.62 + * assumes that the SessionDialog is running its XML-RPC-handler on port
2.63 + * 1050 of the local machine.
2.64 + *
2.65 + * @param username
2.66 + * username of the user who wants to login.
2.67 + * @param password
2.68 + * corresponding password for the user.
2.69 + * @return the id of the current sesson the user logged in or null if the
2.70 + * login did not succeed
2.71 + * @throws NullPointerException
2.72 + * carrying the error-message if an communication error occured.
2.73 + */
2.74 + static protected String xmlLogin(String username, String password) {
2.75 + try {
2.76 + XmlRpcClient sdialog = new XmlRpcClient("http://localhost:1050");
2.77 + Vector params = new Vector();
2.78 + params.add(username);
2.79 + params.add(password);
2.80 + Vector response = (Vector) sdialog.execute("SDialog.login", params);
2.81 + if (response.size() > 0)
2.82 + return (String) response.elementAt(0);
2.83 + } catch (MalformedURLException e) {
2.84 + throw new NullPointerException(
2.85 + getErrorXML("Sorry, MalformedURLException while accessing the SDialog to login - is the SDialog runnig ?"
2.86 + + e.getMessage()));
2.87 + } catch (XmlRpcException e) {
2.88 + throw new NullPointerException(
2.89 + getErrorXML("Sorry, XmlRpcException while accessing the SDialog to login - is the SDialog runnig ?"
2.90 + + e.getMessage()));
2.91 + } catch (IOException e) {
2.92 + throw new NullPointerException(
2.93 + getErrorXML("Sorry, IOException while accessing the SDialog to login - is the SDialog runnig ?"
2.94 + + e.getMessage()));
2.95 + }
2.96 + return null;
2.97 }
2.98 - return null;
2.99 - }
2.100
2.101 -/**
2.102 - * Performes a login on the Session dialog using RMI. It assumes the SessionDialog to be found
2.103 - * at //localhost/isac-ObjectManager
2.104 - *
2.105 - * @param username username of the user who wants to login.
2.106 - * @param password corresponding password for the user.
2.107 - * @return the id of the current sesson the user logged in or null if the login did not succeed
2.108 - * @throws NullPointerException carrying the error-message if an communication error occured.
2.109 - */
2.110 - static public String login(String username, String password){
2.111 + /**
2.112 + * Performes a login on the Session dialog using RMI. It assumes the
2.113 + * SessionDialog to be found at //localhost/isac-ObjectManager
2.114 + *
2.115 + * @param username
2.116 + * username of the user who wants to login.
2.117 + * @param password
2.118 + * corresponding password for the user.
2.119 + * @return the id of the current sesson the user logged in or null if the
2.120 + * login did not succeed
2.121 + * @throws NullPointerException
2.122 + * carrying the error-message if an communication error occured.
2.123 + */
2.124 + static public String login(String username, String password) {
2.125 SDialog sd = getSDialog();
2.126 try {
2.127 /* LK 04.08.27 */
2.128 //if username != pwd -> empty Vector
2.129 - Vector v = sd.login(username,password);
2.130 + Vector v = sd.login(username, password);
2.131 if (v.size() == 0) {
2.132 return null;
2.133 } else {
2.134 - return (String)v.elementAt(0);
2.135 + return (String) v.elementAt(0);
2.136 }
2.137 } catch (RemoteException e) {
2.138 - throw new NullPointerException(getErrorXML("Sorry, RemoteEcxeption while accessing the SDialog to login - is the SDialog runnig ?"+e.getMessage()));
2.139 + throw new NullPointerException(
2.140 + getErrorXML("Sorry, RemoteEcxeption while accessing the SDialog to login - is the SDialog runnig ?"
2.141 + + e.getMessage()));
2.142 }
2.143 }
2.144 -
2.145 - public static BDialog getBDialog(String session){
2.146 +
2.147 + public static BDialog getBDialog(String session) {
2.148 String name = "//localhost/isac-ObjectManager";
2.149 - try{
2.150 - System.out.println("connect to ObjectManager"+name);
2.151 + try {
2.152 + System.out.println("connect to ObjectManager" + name);
2.153 Object lookup = Naming.lookup(name);
2.154 - return ((OManager)lookup).getBrowserDialog(session);
2.155 - }
2.156 - catch(RemoteException exc){
2.157 - System.err.println("no rmiregistry runing on server "+name+
2.158 - " no connection possible --- try later");
2.159 + return ((OManager) lookup).getBrowserDialog(session);
2.160 + } catch (RemoteException exc) {
2.161 + System.err.println("no rmiregistry runing on server " + name
2.162 + + " no connection possible --- try later");
2.163 System.err.println("serverCom exception: " + exc.getMessage());
2.164 - }
2.165 - catch(NotBoundException exc){
2.166 - System.err.println("servercom: notboundexc: "+ exc.getMessage());
2.167 + } catch (NotBoundException exc) {
2.168 + System.err.println("servercom: notboundexc: " + exc.getMessage());
2.169 System.err.println("server not found - try to connect to Proxy");
2.170 - }
2.171 - catch(java.net.MalformedURLException exc){
2.172 - System.err.println("servercom: MalformedURLException: "+ exc.getMessage());
2.173 + } catch (java.net.MalformedURLException exc) {
2.174 + System.err.println("servercom: MalformedURLException: "
2.175 + + exc.getMessage());
2.176 exc.printStackTrace();
2.177 }
2.178 return null;
2.179 }
2.180
2.181 - public static SDialog getSDialog(){
2.182 - String name= "//localhost/isac-ObjectManager";
2.183 - try {
2.184 - System.out.println("connect to ObjectManager: "+name);
2.185 - Object lookup = Naming.lookup(name);
2.186 - return ((OManager) lookup).getSessionDialog();
2.187 + public static SDialog getSDialog() {
2.188 + String name = "//localhost/isac-ObjectManager";
2.189 + try {
2.190 + System.out.println("connect to ObjectManager: " + name);
2.191 + Object lookup = Naming.lookup(name);
2.192 + return ((OManager) lookup).getSessionDialog();
2.193 + } catch (RemoteException exc) {
2.194 + System.err.println("no rmiregistry runing on server " + name
2.195 + + " no connection possible --- try later");
2.196 + System.err.println("serverCom exception: " + exc.getMessage());
2.197 + } catch (NotBoundException exc) {
2.198 + System.err.println("servercom: notboundexc: " + exc.getMessage());
2.199 + System.err.println("server not found - try to connect to Proxy");
2.200 + } catch (java.net.MalformedURLException exc) {
2.201 + System.err.println("servercom: MalformedURLException: "
2.202 + + exc.getMessage());
2.203 + exc.printStackTrace();
2.204 + }
2.205 + return null;
2.206 }
2.207 - catch(RemoteException exc){
2.208 - System.err.println("no rmiregistry runing on server "+name+
2.209 - " no connection possible --- try later");
2.210 - System.err.println("serverCom exception: " + exc.getMessage());
2.211 - }
2.212 - catch(NotBoundException exc){
2.213 - System.err.println("servercom: notboundexc: "+ exc.getMessage());
2.214 - System.err.println("server not found - try to connect to Proxy");
2.215 - }
2.216 - catch(java.net.MalformedURLException exc){
2.217 - System.err.println("servercom: MalformedURLException: "+ exc.getMessage());
2.218 - exc.printStackTrace();
2.219 - }
2.220 - return null;
2.221 -}
2.222
2.223 -/*
2.224 - static protected String oldloadString(String function, Vector parameter){
2.225 - XmlRpcClient bdialog;
2.226 - String xmlsource="";
2.227 - try {
2.228 - bdialog = new XmlRpcClient("http://localhost:1040");
2.229 - Vector result = (Vector) bdialog.execute(function, parameter);
2.230 - xmlsource = (String)result.firstElement();
2.231 - } catch (MalformedURLException e) {
2.232 - e.printStackTrace();
2.233 - } catch (XmlRpcException e) {
2.234 - e.printStackTrace();
2.235 - } catch (IOException e) {
2.236 - e.printStackTrace();
2.237 - }
2.238 - return xmlsource;
2.239 - }
2.240 -*/
2.241 -/*
2.242 - static protected Vector oldloadVector(String function, Vector parameter){
2.243 - Vector return_vect=new Vector();
2.244 - XmlRpcClient bdialog;
2.245 - String xmlsource="";
2.246 - try {
2.247 - bdialog = new XmlRpcClient("http://localhost:1040");
2.248 - return_vect = (Vector) bdialog.execute(function, parameter);
2.249 - } catch (MalformedURLException e) {
2.250 - e.printStackTrace();
2.251 - } catch (XmlRpcException e) {
2.252 - e.printStackTrace();
2.253 - } catch (IOException e) {
2.254 - e.printStackTrace();
2.255 - }
2.256 - return return_vect;
2.257 - }
2.258 -*/
2.259 + /*
2.260 + * static protected String oldloadString(String function, Vector parameter){
2.261 + * XmlRpcClient bdialog; String xmlsource=""; try { bdialog = new
2.262 + * XmlRpcClient("http://localhost:1040"); Vector result = (Vector)
2.263 + * bdialog.execute(function, parameter); xmlsource =
2.264 + * (String)result.firstElement(); } catch (MalformedURLException e) {
2.265 + * e.printStackTrace(); } catch (XmlRpcException e) { e.printStackTrace(); }
2.266 + * catch (IOException e) { e.printStackTrace(); } return xmlsource; }
2.267 + */
2.268 + /*
2.269 + * static protected Vector oldloadVector(String function, Vector parameter){
2.270 + * Vector return_vect=new Vector(); XmlRpcClient bdialog; String
2.271 + * xmlsource=""; try { bdialog = new XmlRpcClient("http://localhost:1040");
2.272 + * return_vect = (Vector) bdialog.execute(function, parameter); } catch
2.273 + * (MalformedURLException e) { e.printStackTrace(); } catch (XmlRpcException
2.274 + * e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); }
2.275 + * return return_vect; }
2.276 + */
2.277
2.278 -/**
2.279 - * Loads the hierarchy for the information-type <code>type</type>
2.280 - * @param session session to identify on the SessionDialog
2.281 - * @param type type of the hierarchy to load
2.282 - * @return the requested hierarchy in its XML-representation, in case of an RemoteException, a XML-code
2.283 - * carrying the error-message is returned
2.284 - */
2.285 - static public String loadHierarchy(String session, String type){
2.286 + /**
2.287 + * Loads the hierarchy for the information-type <code>type</type>
2.288 + * @param session session to identify on the SessionDialog
2.289 + * @param type type of the hierarchy to load
2.290 + * @return the requested hierarchy in its XML-representation, in case of an RemoteException, a XML-code
2.291 + * carrying the error-message is returned
2.292 + */
2.293 + static public String loadHierarchy(String session, String type) {
2.294 BDialog bd = getBDialog(session);
2.295 try {
2.296 return bd.loadHierarchy(type);
2.297 } catch (RemoteException e) {
2.298 - return getErrorXML("Sorry, RemoteEcxeption while accessing the BDialog to login - is the BDialog runnig ?"+e.getMessage());
2.299 + return getErrorXML("Sorry, RemoteEcxeption while accessing the BDialog to login - is the BDialog runnig ?"
2.300 + + e.getMessage());
2.301 }
2.302 }
2.303
2.304 /**
2.305 * Loads binary files from the KE-Base
2.306 - * @param session session to identify on the SessionDialog
2.307 - * @param type to identify the location of the binary file. An id has only to be unique within a type, although
2.308 - * a globally unique id should be used.
2.309 - * @param content_id Id of the binary-file to load
2.310 - * @return the requested binary-file as byte-array, in case of an RemoteException, an empty array is returned
2.311 + *
2.312 + * @param session
2.313 + * session to identify on the SessionDialog
2.314 + * @param type
2.315 + * to identify the location of the binary file. An id has only to
2.316 + * be unique within a type, although a globally unique id should
2.317 + * be used.
2.318 + * @param content_id
2.319 + * Id of the binary-file to load
2.320 + * @return the requested binary-file as byte-array, in case of an
2.321 + * RemoteException, an empty array is returned
2.322 */
2.323 - static public byte[] loadBinary(String session, String type, String content_id){
2.324 + static public byte[] loadBinary(String session, String type,
2.325 + String content_id) {
2.326 BDialog bd = getBDialog(session);
2.327 try {
2.328 return bd.loadBinary(type, content_id);
2.329 @@ -199,107 +200,121 @@
2.330 return new byte[0];
2.331 }
2.332 }
2.333 - static public String loadXML(String session, String type, Vector idvect){
2.334 +
2.335 + static public String loadXML(String session, String type, Vector idvect) {
2.336 BDialog bd = getBDialog(session);
2.337 - try{
2.338 + try {
2.339 return bd.loadContent(type, idvect);
2.340 - } catch(RemoteException e){
2.341 + } catch (RemoteException e) {
2.342 return getErrorXML("Sorry, RemoteException while accessing the BDialog to fetch your content");
2.343 }
2.344 }
2.345
2.346 /**
2.347 * Loads content-files from the KE-Base
2.348 - * @param session session to identify on the SessionDialog
2.349 - * @param type to identify the location of the KE-Object. An id has only to be unique within a type, although
2.350 - * a globally unique id should be used.
2.351 - * @param content_id Id of the KE-Object to load
2.352 - * @return the requested KE-Object in its XML-representation, in case of an RemoteException, a XML-code
2.353 - * carrying the error-message is returned
2.354 + *
2.355 + * @param session
2.356 + * session to identify on the SessionDialog
2.357 + * @param type
2.358 + * to identify the location of the KE-Object. An id has only to
2.359 + * be unique within a type, although a globally unique id should
2.360 + * be used.
2.361 + * @param content_id
2.362 + * Id of the KE-Object to load
2.363 + * @return the requested KE-Object in its XML-representation, in case of an
2.364 + * RemoteException, a XML-code carrying the error-message is
2.365 + * returned
2.366 */
2.367 - static public String loadXML(String session, String type, String content_id){
2.368 + static public String loadXML(String session, String type, String content_id) {
2.369 BDialog bd = getBDialog(session);
2.370 try {
2.371 return bd.loadContent(type, content_id);
2.372 } catch (RemoteException e) {
2.373 - return getErrorXML("Sorry, RemoteException while accessing the BDialog to fetch your file \""+content_id+"\" is the BDialog running?");
2.374 + return getErrorXML("Sorry, RemoteException while accessing the BDialog to fetch your file \""
2.375 + + content_id + "\" is the BDialog running?");
2.376 }
2.377 }
2.378
2.379 /**
2.380 - * Evaluates the requested content in the given worksheet using the BrowserDialog
2.381 - * @param session session to identify on the SessionDialog
2.382 - * @param type to identify the location of the KE-Object. An id has only to be unique within a type, although
2.383 - * a globally unique id should be used.
2.384 - * @param content_id Id of the KE-Object to load
2.385 - * @param wd_id id of the worksheet the contanct for evaluating
2.386 - * @return the requested KE-Object in its XML-representation, in case of an RemoteException, a XML-code
2.387 - * carrying the error-message is returned
2.388 + * Evaluates the requested content in the given worksheet using the
2.389 + * BrowserDialog
2.390 + *
2.391 + * @param session
2.392 + * session to identify on the SessionDialog
2.393 + * @param type
2.394 + * to identify the location of the KE-Object. An id has only to
2.395 + * be unique within a type, although a globally unique id should
2.396 + * be used.
2.397 + * @param content_id
2.398 + * Id of the KE-Object to load
2.399 + * @param wd_id
2.400 + * id of the worksheet the contanct for evaluating
2.401 + * @return the requested KE-Object in its XML-representation, in case of an
2.402 + * RemoteException, a XML-code carrying the error-message is
2.403 + * returned
2.404 * @see BDialog#evaluateContent
2.405 */
2.406 - static public String evaluateXML(String session, String type, String content_id, String wd_id){
2.407 + static public String evaluateXML(String session, String type,
2.408 + String content_id, String wd_id) {
2.409 BDialog bd = getBDialog(session);
2.410 try {
2.411 return bd.evaluateContent(type, content_id, wd_id);
2.412 } catch (RemoteException e) {
2.413 - return getErrorXML("Sorry, RemoteException while accessing the BDialog to evaluate \""+content_id+"\" is the BDialog running?");
2.414 - }
2.415 + return getErrorXML("Sorry, RemoteException while accessing the BDialog to evaluate \""
2.416 + + content_id + "\" is the BDialog running?");
2.417 + }
2.418 }
2.419 -
2.420 +
2.421 /*
2.422 - static protected Reader loadsKEObject(String function, Vector parameter){
2.423 - XmlRpcClient bdialog;
2.424 - String xmlsource="";
2.425 - try {
2.426 - bdialog = new XmlRpcClient("http://localhost:1040");
2.427 - Vector result = (Vector) bdialog.execute(function, parameter);
2.428 - if(result.size()>0)
2.429 - xmlsource = (String)result.firstElement();
2.430 - else
2.431 - xmlsource = "";
2.432 - } catch (MalformedURLException e) {
2.433 - return new StringReader(getErrorXML("Sorry, MalformedURLException while accessing the KEStore"));
2.434 - } catch (XmlRpcException e) {
2.435 - return new StringReader(getErrorXML("Sorry, XmlRpcException while accessing the KEStore"));
2.436 - } catch (IOException e) {
2.437 - return new StringReader(getErrorXML("Sorry, IOException while accessing the KEStore"));
2.438 - }
2.439 - return new StringReader(xmlsource);
2.440 - }
2.441 -*/
2.442 + * static protected Reader loadsKEObject(String function, Vector parameter){
2.443 + * XmlRpcClient bdialog; String xmlsource=""; try { bdialog = new
2.444 + * XmlRpcClient("http://localhost:1040"); Vector result = (Vector)
2.445 + * bdialog.execute(function, parameter); if(result.size()>0) xmlsource =
2.446 + * (String)result.firstElement(); else xmlsource = ""; } catch
2.447 + * (MalformedURLException e) { return new StringReader(getErrorXML("Sorry,
2.448 + * MalformedURLException while accessing the KEStore")); } catch
2.449 + * (XmlRpcException e) { return new StringReader(getErrorXML("Sorry,
2.450 + * XmlRpcException while accessing the KEStore")); } catch (IOException e) {
2.451 + * return new StringReader(getErrorXML("Sorry, IOException while accessing
2.452 + * the KEStore")); } return new StringReader(xmlsource); }
2.453 + */
2.454
2.455 -/**
2.456 - * Get the corresponding user for a session.
2.457 - * @param session_id id of the session to identify the user
2.458 - * @return username or null if an invalid sessionid was given
2.459 - * @throws NullPointerException carrying the error-message if an RemoteException occures.
2.460 - */
2.461 - public static String getUsername(String session_id){
2.462 + /**
2.463 + * Get the corresponding user for a session.
2.464 + *
2.465 + * @param session_id
2.466 + * id of the session to identify the user
2.467 + * @return username or null if an invalid sessionid was given
2.468 + * @throws NullPointerException
2.469 + * carrying the error-message if an RemoteException occures.
2.470 + */
2.471 + public static String getUsername(String session_id) {
2.472 SDialog sd = getSDialog();
2.473 try {
2.474 String username;
2.475 - if((username=sd.getUsername(session_id)).equals(""))
2.476 + if ((username = sd.getUsername(session_id)).equals(""))
2.477 return null;
2.478 return username;
2.479 } catch (RemoteException e) {
2.480 - throw new NullPointerException(getErrorXML("Sorry, RemoteException while accesing the SDialog - is it running ?"));
2.481 + throw new NullPointerException(
2.482 + getErrorXML("Sorry, RemoteException while accesing the SDialog - is it running ?"));
2.483 }
2.484 }
2.485
2.486 -
2.487 /**
2.488 * @param session_id
2.489 * @return
2.490 */
2.491 private static String xmlGetUsername(String session_id) {
2.492 XmlRpcClient bdialog;
2.493 - String xmlsource="";
2.494 - Vector parameter=new Vector();
2.495 + String xmlsource = "";
2.496 + Vector parameter = new Vector();
2.497 parameter.add(session_id);
2.498 try {
2.499 bdialog = new XmlRpcClient("http://localhost:1050");
2.500 - String result = (String) bdialog.execute("SDialog.getUsername", parameter);
2.501 - if(result.equals(""))
2.502 + String result = (String) bdialog.execute("SDialog.getUsername",
2.503 + parameter);
2.504 + if (result.equals(""))
2.505 return null;
2.506 return result;
2.507 } catch (MalformedURLException e) {
2.508 @@ -308,10 +323,11 @@
2.509 return getErrorXML("Sorry, XmlRpcException while accesing the SDialog - is it running ?");
2.510 } catch (IOException e) {
2.511 return getErrorXML("Sorry, IOException while accesing the SDialog - is it running ?");
2.512 - }
2.513 + }
2.514 }
2.515
2.516 private static String getErrorXML(String string) {
2.517 - return "<ERROR><DESCRIPTION> <h1> Error in file InformationPrecessor.java </h1>"+string+"</DESCRIPTION></ERROR>";
2.518 + return "<ERROR><DESCRIPTION> <h1> Error in file InformationPrecessor.java </h1>"
2.519 + + string + "</DESCRIPTION></ERROR>";
2.520 }
2.521 -}
2.522 +}
2.523 \ No newline at end of file
3.1 --- a/src/java/isac/util/ResponseWrapper.java Mon Aug 30 18:57:59 2004 +0200
3.2 +++ b/src/java/isac/util/ResponseWrapper.java Mon Aug 30 18:57:59 2004 +0200
3.3 @@ -9,9 +9,9 @@
3.4 import isac.util.formulae.Position;
3.5
3.6 /**
3.7 - * @author rgradisc
3.8 + * @author Richard Gradischnegg
3.9 *
3.10 - * This class is used to wrap the objects produces
3.11 + * This class is used to wrap the objects produced
3.12 * by the XMLDigestParser from the XML-output of the
3.13 * kernel
3.14 */