throw new XbeansException("","sender", "error sending document "+e,
"error sending document "+e);
}
}
以下代碼用JAVA串行化DOM和CORBA實現接收者。
public void documentReady(byte[] serializedDocument)throws RemoteReceiverException {
// 反串行化字節流
ByteArrayInputStream bais = new ByteArrayInputStream(serializedDocument);
Document theDocument;
try {
ObjectInputStream ois = new ObjectInputStream(bais);
theDocument = (Document)ois.readObject();
} catch(Throwable e) {
throw new RemoteReceiverException(corbaName,"incoming document","receiver",
"error deserializing document","error deserializing document"+e);
}
try { //將文檔傳向監聽者
local.DOMListener.documentReady(new DOMEvent(this,theDocument));
} catch (XbeansException xbe) {
throw new RemoteReceiverException( xbe.remoteIdentifier(),
xbe.documentName(),xbe.componentName(),
文章來源于領測軟件測試網 http://www.kjueaiud.com/