Real Time Information Director User Documentation
  RTID Message Format and Programmatic Interfaces 
Hewlett-Packard Company  13  529618 - 002 
//If server returned an error, check the error stream  
  InputStream errorStream = urlConn.getErrorStream(); 
 if(errorStream == null) 
 { 
 System.println("No response error message"); 
 }else{
 responseReader = new BufferedReader(new 
InputStreamReader(errorStream)); 
 String inputLine; 
 while((inputLine = input.readLine())!= null) 
 { 
 output.write(inputLine); 
  } 
 }
8.
  Use the disconnect method of the HttpURLConnection object to close the 
connection to the servlet: 
UrlConn.disconnect(); 
For authoritative information about using Sun Java classes, see the Sun Java 
documentation. 
Invoking the Dispatch EJB 
The Dispatch EJB (DispatchBeanEJB) is a stateless session bean that provides access to 
the Dispatcher. The bean consists of three classes: 
•  DispatchBeanEJB, which implements container lifecycle and business methods. 
•  DispatchBeanHome, which is the home interface of the bean. 
•  DispatchBean, which is the remote interface of the bean. 
For information about deploying these classes under NonStop WLS, see the RTID 
Deployment module. 
DispatchBeanEJB Class 
The Dispatch EJB defines two business methods, called dispatch, which invoke the RTID 
Dispatcher. One method uses strings for input and output. The other uses an input 
stream and an output stream. The constructors are 
public String dispatch(String document) 
public int dispatch(InputStream documentInputStream, OutputStream 
documentOutputStream) 
In both cases, the input parameter contains the XML document to be inserted into the 
data store, or a query document to retrieve data from the data store. The output parameter 
receives the response, which contains the requested data if the input contained a query, or 
a query document for later use if the input contained an insert/update document. The 










