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(),
文章来源于领测软件测试网 https://www.ltesting.net/