switch( giop_minor )
{
case 0:
case 1:
{
TargetAddress addr = new TargetAddress();
req_hdr = new org.omg.GIOP.RequestHeader_1_2();
req_hdr.service_context = org.omg.IOP.ServiceContextListHelper.read(this);
req_hdr.request_id=read_ulong();
req_hdr.response_flags=Messages.responseFlags(read_boolean());
if (giop_minor == 1)
{
req_hdr.reserved = new byte[3];
read_octet_array(req_hdr.reserved,0,3);
}
if (isMIOP)
{
// Manually read the MIOP magic bytes and the UIPMC Profile.
char marker[] = new char[4];
read_char_array (marker, 0, 4);
if ( ! MulticastUtil.matchMIOPMagic (marker))
{
throw new MARSHAL("MIOP magic marker does not match");
}
// Check the tag is correct.
int tag = read_ulong ();
if (tag != TAG_UIPMC.value)
{
throw new MARSHAL ("TAG_UIPMC marker does not match (" + tag + ')');
}
openEncapsulation ();
org.omg.MIOP.UIPMC_ProfileBody upb = org.omg.MIOP.UIPMC_ProfileBodyHelper.read (this);
closeEncapsulation();
TaggedProfile uipmc = new TaggedProfile
(org.omg.IOP.TAG_UIPMC.value, MulticastUtil.getEncapsulatedUIPMCProfile ((ORB)orb, upb));
addr.profile (uipmc);
}
else
{
int l = read_long();
int x = available();
if ( x > 0 && l > x )
{
throw new MARSHAL("Sequence length too large. Only " + x + " available and trying to assign " + l);
}
byte object_key[] = new byte[l];
read_octet_array (object_key,0,l);
addr.object_key (object_key);
}
req_hdr.operation=read_string();
org.omg.GIOP.PrincipalHelper.read(this);
req_hdr.target = addr;
break;
}
case 2 :
{
//GIOP 1.2
req_hdr = RequestHeader_1_2Helper.read( this );
skipHeaderPadding();
break;
}
default : {
throw new MARSHAL( "Unknown GIOP minor version: " + giop_minor );
}
}
is_locate_request = false;
}
else if( Messages.getMsgType( buffer ) == MsgType_1_1._LocateRequest )
{
switch( giop_minor )
{
case 0 :
{
//GIOP 1.0 = GIOP 1.1, fall through
}
case 1 :
{
//GIOP 1.1
LocateRequestHeader_1_0 locate_req_hdr =
LocateRequestHeader_1_0Helper.read( this );
TargetAddress addr = new TargetAddress();
addr.object_key( locate_req_hdr.object_key );
req_hdr =
new RequestHeader_1_2( locate_req_hdr.request_id,
(byte) 0x03,//response_expected
reserved,