Examples of AxisClassLoader


Examples of org.apache.axis.utils.AxisClassLoader

        assertEquals(expect, actual);
    }
   
    public void testGetClassLoaderStringArg()
    {
        AxisClassLoader acl = AxisClassLoader.getClassLoader("newClassLoader");
        AxisClassLoader result = AxisClassLoader.getClassLoader("newClassLoader");
        if (!acl.equals(result))
        {
            fail("Test failure: these 2 AxisClassLoader references should refer to same instance.");
        }
    }
View Full Code Here

Examples of org.apache.axis.utils.AxisClassLoader

        }
    }

    public void testRemoveClassLoader()
    {
        AxisClassLoader acl = AxisClassLoader.getClassLoader("newClassLoader");
        AxisClassLoader.removeClassLoader("newClassLoader");
        AxisClassLoader result = acl.getClassLoader("newClassLoader");
        if (acl.equals(result))
        {
            fail("These 2 AxisClassLoader references should not refer to same instance.");
        }
    }
View Full Code Here

Examples of org.apache.axis.utils.AxisClassLoader

        }
    }

    public void testRegisterClassNameClass()
    {
  AxisClassLoader acl = AxisClassLoader.getClassLoader();
        java.util.Stack stack = new java.util.Stack(); //Stack was chosen arbitrarily
        Class clazz = stack.getClass();
        acl.registerClass("myStack",clazz);
        assertTrue(acl.isClassRegistered("myStack"));
    }
View Full Code Here

Examples of org.apache.axis.utils.AxisClassLoader

        assertTrue(acl.isClassRegistered("myStack"));
    }

    public void testIsClassRegistered()
    {
  AxisClassLoader acl = AxisClassLoader.getClassLoader();
        java.util.Stack stack = new java.util.Stack(); //Stack was chosen arbitrarily
        Class clazz = stack.getClass();
        acl.registerClass("anotherStack",clazz);
        if (acl.isClassRegistered("noStack"))
        {
            fail("Nonce class name should not be registered.");
        }
        assertTrue(acl.isClassRegistered("anotherStack"));
    }
View Full Code Here

Examples of org.apache.axis.utils.AxisClassLoader

        assertTrue(acl.isClassRegistered("anotherStack"));
    }

    public void testDeregisterClass()
    {
  AxisClassLoader acl = AxisClassLoader.getClassLoader();
        java.util.Stack stack = new java.util.Stack(); //Stack was chosen arbitrarily
        Class clazz = stack.getClass();
        acl.registerClass("myStack",clazz);
        assertTrue(acl.isClassRegistered("myStack"));
        acl.deregisterClass("myStack");
        if (acl.isClassRegistered("myStack"))
        {
            fail("Class should have been deregistered.");
        }
    }
View Full Code Here

Examples of org.apache.axis.utils.AxisClassLoader

        }
    }

    public void testLoadClass() throws ClassNotFoundException
    {
  AxisClassLoader acl = AxisClassLoader.getClassLoader();
        Class clazz = acl.loadClass("java.util.BitSet"); //BitSet was chosen arbitrarily
        assertTrue(clazz.getName().equals("java.util.BitSet"));

        java.util.Stack stack = new java.util.Stack(); //Stack was chosen arbitrarily
        Class clazz1 = stack.getClass();
        acl.registerClass("myStack",clazz1);
        Class klass = acl.loadClass("myStack");
        assertTrue(klass.getName().equals("java.util.Stack"));
    }
View Full Code Here

Examples of org.apache.axis.utils.AxisClassLoader

        assertTrue(klass.getName().equals("java.util.Stack"));
    }

    public void testLookup() throws ClassNotFoundException
    {
  AxisClassLoader acl = AxisClassLoader.getClassLoader();
        JavaClass jc = acl.lookup("java.util.BitSet"); //BitSet was chosen arbitrarily
        Class c = jc.getJavaClass();
        assertTrue(c.getName().equals("java.util.BitSet"));
    }
View Full Code Here

Examples of org.apache.axis.utils.AxisClassLoader

  private boolean modern = false;

  public Javac() {

    // Use reflection to be able to build on all JDKs
    AxisClassLoader   cl     = AxisClassLoader.getClassLoader();
    try {
        cl.loadClass(MODERN_CLASS);
        modern = true;
    } catch (ClassNotFoundException e) {
        category.debug("Javac connector could not find modern compiler -- falling back to classic.");
        try {
            cl.loadClass(CLASSIC_CLASS);
            modern = false;
        } catch (Exception ex) {
            category.error("No compiler found in your classpath. Make sure you added 'tools.jar'", ex);
            throw new RuntimeException("No compiler found in your classpath. Make sure you added 'tools.jar'");
        }
View Full Code Here

Examples of org.apache.axis.utils.AxisClassLoader

                         JavaUtils.getMessage("badCompile00", jFile),
                        null, new Element[] { root } );
                }
                AxisClassLoader.removeClassLoader( clsName );
            }
            AxisClassLoader cl = msgContext.getClassLoader();
            if ( !cl.isClassRegistered(clsName) )
                cl.registerClass( clsName, cFile );
            msgContext.setClassLoader( cl );

            /* Create a new RPCProvider - this will be the "service"   */
            /* that we invoke.                                                */
            /******************************************************************/
 
View Full Code Here

Examples of org.apache.axis.utils.AxisClassLoader

        if (obj instanceof AxisServiceConfig) {
            allowedMethods = ((AxisServiceConfig)obj).getMethods();
        }

        try {
            AxisClassLoader cl     = msgContext.getClassLoader();
            Class           cls    = jc.getJavaClass();
            String url = msgContext.getStrProp(MessageContext.TRANS_URL);
            String urn = (String)msgContext.getTargetService();
            String description = "Service";
            Document doc = WSDLUtils.writeWSDLDoc(cls, allowedMethods,
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.