Examples of CDRInputStream


Examples of org.jacorb.orb.CDRInputStream

        if (sas != null && sas.mechanism_list[0].transport_mech.tag == TAG_TLS_SEC_TRANS.value)
        {
            try
            {
                byte[] tagData = sas.mechanism_list[0].transport_mech.component_data;
                final CDRInputStream in = new CDRInputStream( null, tagData );
                try
                {
                    in.openEncapsulatedArray();
                    tls = TLS_SEC_TRANSHelper.read( in );
                }
                finally
                {
                    in.close();
                }
            }
            catch ( Exception e )
            {
                logger.warn("Error parsing TLS_SEC_TRANS: "+e);
View Full Code Here

Examples of org.jacorb.orb.CDRInputStream

        String iorString;
        String iorFile;
        String host;
        BufferedReader br;
        BufferedWriter bw;
        CDRInputStream is;
        CDROutputStream os;
        ParsedIOR pior;
        IOR ior;
        TaggedProfile[] profiles;
        ProfileBody_1_0 body10;
        ProfileBody_1_1 body11;
        short port;
        int iport;


        if (args.length != 3)
        {
            System.err.println ("Usage: fixior host port ior_file");
            System.exit( 1 );
        }
        host = args[0];

        // Read in IOR from file

        iorFile = args[2];
        br = new BufferedReader (new FileReader (iorFile));
        iorString = br.readLine();
        br.close ();

        if (iorString == null)
        {
            System.err.println("cannot read IOR from " + iorFile);
            System.exit(1);
        }

        if (!iorString.startsWith("IOR:"))
        {
            System.err.println ("IOR must be in the standard IOR URL format");
            System.exit (1);
        }

        iport = Integer.parseInt (args[1]);
        if (iport > 32767)
        {
           iport = iport - 65536;
        }
        port = (short) iport;

        orb = org.omg.CORBA.ORB.init (args, null);

        // Parse IOR

        pior = new ParsedIOR((ORB) orb, iorString);
        ior = pior.getIOR ();

        // Iterate through IIOP profiles setting host and port

        profiles = ior.profiles;
        for (int i = 0; i < profiles.length; i++)
        {
            if (profiles[i].tag == TAG_INTERNET_IOP.value)
            {
                is = new CDRInputStream (orb, profiles[i].profile_data);
                is.openEncapsulatedArray ();
                body10 = ProfileBody_1_0Helper.read (is);
                is.close ();

                os = new CDROutputStream ();
                os.beginEncapsulatedArray ();

                if (body10.iiop_version.minor > 0)
                {
                    is = new CDRInputStream (orb, profiles[i].profile_data);
                    is.openEncapsulatedArray ();
                    body11 = ProfileBody_1_1Helper.read (is);
                    is.close ();

                    body11.host = host;
                    body11.port = port;

                    ProfileBody_1_1Helper.write (os, body11);
View Full Code Here

Examples of org.jacorb.orb.CDRInputStream

        for( int i = 0; i < contexts.length; i++ )
        {
            if( contexts[i].context_id == TAG_CODE_SETS.value )
            {
                // TAG_CODE_SETS found, demarshall
                CDRInputStream is = new CDRInputStream( null, contexts[i].context_data );
                is.openEncapsulatedArray();

                return CodeSetContextHelper.read( is );
            }
        }
View Full Code Here

Examples of org.jacorb.orb.CDRInputStream

    private void getTimingPolicies()
    {
        ServiceContext ctx = in.getServiceContext(INVOCATION_POLICIES.value);
        if (ctx != null)
        {
            CDRInputStream input = new CDRInputStream (null, ctx.context_data);
            input.openEncapsulatedArray();
            PolicyValue[] p = PolicyValueSeqHelper.read (input);
            for (int i=0; i < p.length; i++)
            {
                if (p[i].ptype == REQUEST_START_TIME_POLICY_TYPE.value)
                    requestStartTime = Time.fromCDR (p[i].pvalue);
View Full Code Here

Examples of org.jacorb.orb.CDRInputStream

        {
            out.write_value( members[i].value.type(),
                             members[i].value.create_input_stream());
        }

        CDRInputStream is = new CDRInputStream(orb, out.getBufferCopy());
        out_any.read_value( is, type());
        return out_any;
    }
View Full Code Here

Examples of org.jacorb.orb.CDRInputStream

    // implementation of org.omg.IOP.CodecOperations interface

    public Any decode(byte[] data)
        throws FormatMismatch
    {
        CDRInputStream in = new CDRInputStream(orb, data);

        in.openEncapsulatedArray();
        Any result = in.read_any();

        //not necessary, since stream is never used again
        //in.closeEncapsulation();

        return result;
View Full Code Here

Examples of org.jacorb.orb.CDRInputStream


    public Any decode_value(byte[] data, TypeCode tc)
        throws FormatMismatch, TypeMismatch
    {
        CDRInputStream in = new CDRInputStream(orb, data);

        in.openEncapsulatedArray();
        Any result = orb.create_any();
        result.read_value(in, tc);

        //not necessary, since stream is never used again
        //in.closeEncasupaltion();
View Full Code Here

Examples of org.jacorb.orb.CDRInputStream

        // see if target requires protected requests by looking into the IOR
        CompoundSecMechList csmList = null;
        try
        {
            TaggedComponent tc = ri.get_effective_component(TAG_CSI_SEC_MECH_LIST.value);
            CDRInputStream is = new CDRInputStream( (org.omg.CORBA.ORB)null, tc.component_data);
            is.openEncapsulatedArray();
            csmList = CompoundSecMechListHelper.read( is );
        }
        catch (BAD_PARAM e)
        {
            if (logger.isDebugEnabled())
View Full Code Here

Examples of org.jacorb.orb.CDRInputStream

        TLS_SEC_TRANS tls = null;
        if (sas != null && sas.mechanism_list[0].transport_mech.tag == TAG_TLS_SEC_TRANS.value) {
            try
            {
                byte[] tagData = sas.mechanism_list[0].transport_mech.component_data;
                CDRInputStream in = new CDRInputStream( (org.omg.CORBA.ORB)null, tagData );
                in.openEncapsulatedArray();
                tls = TLS_SEC_TRANSHelper.read( in );
            }
            catch ( Exception ex )
            {
                logger.warn("Error parsing TLS_SEC_TRANS: "+ex);
View Full Code Here

Examples of org.jacorb.orb.CDRInputStream

                                            CompoundSecMechListHelper.class);
        if (csmList != null && csmList.mechanism_list.length > 0)
        {
            byte[] tlsSecTransData =
                csmList.mechanism_list[0].transport_mech.component_data;
            CDRInputStream in =
                new CDRInputStream((org.omg.CORBA.ORB)null, tlsSecTransData);
            try
            {
                in.openEncapsulatedArray();
                TLS_SEC_TRANS tls = TLS_SEC_TRANSHelper.read(in);
                if (tls.addresses.length > 0)
                {
                    int ssl_port = tls.addresses[0].port;
                    if (ssl_port != 0)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.