Package org.apache.axis.utils.cache

Examples of org.apache.axis.utils.cache.JavaClass


        // If we have an engine, use its class cache
        if (engine != null) {
            ClassCache cache     = engine.getClassCache();
            try {
                JavaClass jc = cache.lookup(clsName, cl);
                serviceClass = jc.getJavaClass();
            } catch (ClassNotFoundException e) {
                log.error(Messages.getMessage("exception00"), e);
                throw new AxisFault(Messages.getMessage("noClassForService00", clsName), e);
            }
        } else {
View Full Code Here


                                             String clsName)
        throws Exception
    {
        ClassLoader cl     = msgContext.getClassLoader();
        ClassCache cache   = msgContext.getAxisEngine().getClassCache();
        JavaClass  jc      = cache.lookup(clsName, cl);

        return jc.getJavaClass().newInstance();
    }
View Full Code Here

        // If we have an engine, use its class cache
        if (engine != null) {
            ClassCache cache     = engine.getClassCache();
            try {
                JavaClass jc = cache.lookup(clsName, cl);
                serviceClass = jc.getJavaClass();
            } catch (ClassNotFoundException e) {
                log.error(Messages.getMessage("exception00"), e);
                throw new AxisFault(Messages.getMessage("noClassForService00", clsName), e);
            }
        } else {
View Full Code Here

                                             String clsName)
        throws Exception
    {
        ClassLoader cl     = msgContext.getClassLoader();
        ClassCache cache   = msgContext.getAxisEngine().getClassCache();
        JavaClass  jc      = cache.lookup(clsName, cl);

        return jc.getJavaClass().newInstance();
    }
View Full Code Here

        // If we have an engine, use its class cache
        if (engine != null) {
            ClassCache cache     = engine.getClassCache();
            try {
                JavaClass jc = cache.lookup(clsName, cl);
                serviceClass = jc.getJavaClass();
            } catch (ClassNotFoundException e) {
                log.error(Messages.getMessage("exception00"), e);
                throw new AxisFault(Messages.getMessage("noClassForService00", clsName), e);
            }
        } else {
View Full Code Here

    }

    public void testGetJavaClass()
    {
        Class c = new java.util.Date().getClass();
        JavaClass jc = new JavaClass(c);
        assertNotNull("The JavaClass was null", jc);
        assertTrue("JavaClass name is not 'java.util.Date', it is: " + jc.getClass().getName(),
                   jc.getJavaClass().getName().equals("java.util.Date"));
        assertTrue("JavaClass cut off the name of the real class.",
                   !jc.getJavaClass().getName().equals("java.util.D"));
    }
View Full Code Here

    public void testGetMethod()
    {
        Class v = new java.util.Vector().getClass();
        Class st = new java.util.StringTokenizer("some string").getClass();
        JavaClass jcVec = new JavaClass(v);
        JavaClass jcST = new JavaClass(st);

        Method countTkns = jcST.getMethod("countTokens")[0];
        Method nextTkn = jcST.getMethod("nextToken")[0];

        Method[] adds = jcVec.getMethod("add");

        assertEquals("countTkns name was not 'countTokens', it is: " + countTkns.getName(),
                     "countTokens", countTkns.getName());
View Full Code Here

    }

    public void testNoSuchMethod()
    {
        Class v = new java.util.Vector().getClass();
        JavaClass jcVec = new JavaClass(v);

        Method[] gorp = jcVec.getMethod("gorp");
        assertNull("gorp was not null", gorp);
    }
View Full Code Here

    }

    public void testGetJavaClass()
    {
        Class c = new java.util.Date().getClass();
        JavaClass jc = new JavaClass(c);
        assertNotNull("The JavaClass was null", jc);
        assertTrue("JavaClass name is not 'java.util.Date', it is: " + jc.getClass().getName(),
                   jc.getJavaClass().getName().equals("java.util.Date"));
        assertTrue("JavaClass cut off the name of the real class.",
                   !jc.getJavaClass().getName().equals("java.util.D"));
    }
View Full Code Here

    public void testGetMethod()
    {
        Class v = new java.util.Vector().getClass();
        Class st = new java.util.StringTokenizer("some string").getClass();
        JavaClass jcVec = new JavaClass(v);
        JavaClass jcST = new JavaClass(st);

        Method countTkns = jcST.getMethod("countTokens", 0);
        Method nextTkn = jcST.getMethod("nextToken", 1);

        Method add1 = jcVec.getMethod("add", 1);
        Method add2 = jcVec.getMethod("add", 2);

        assertEquals("countTkns name was not 'countTokens', it is: " + countTkns.getName(),
View Full Code Here

TOP

Related Classes of org.apache.axis.utils.cache.JavaClass

Copyright © 2018 www.massapicom. 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.