}
catch (Exception e)
{
}
GIOPConnection conn =
giopconn_mg.createServerGIOPConnection( null,
transport,
request_listener,
reply_listener );
try
{
//will not return until an IOException is thrown (by the
//DummyTransport)
conn.receiveMessages();
}
catch( IOException e )
{
//o.k., thrown by DummyTransport
}
//no request or reply must have been handed over
assertTrue( request_listener.getRequest() == null );
assertTrue( reply_listener.getReply() == null );
//instead, an error message have must been sent via the
//transport
assertTrue( transport.getWrittenMessage() != null );
byte[] result = transport.getWrittenMessage();
ReplyInputStream r_in = new ReplyInputStream( getORB(), result );
Exception ex = r_in.getException();
if ( ex != null && ex.getClass() == org.omg.CORBA.NO_IMPLEMENT.class )
{
// o.k.
}
else
{
fail();
}
MessageOutputStream m_out =
new MessageOutputStream(orb);
m_out.writeGIOPMsgHeader( MsgType_1_1._Fragment,
1 // giop minor
);
m_out.write_ulong( 0 ); // Fragment Header (request id)
m_out.write_octet( (byte) 'b' );
m_out.write_octet( (byte) 'a' );
m_out.write_octet( (byte) 'z' );
m_out.insertMsgSize();
messages.add( m_out.getBufferCopy() );
try
{
//will not return until an IOException is thrown (by the
//DummyTransport)
conn.receiveMessages();
}
catch( IOException e )
{
//o.k., thrown by DummyTransport
}