Examples of XFireConfigLoader


Examples of org.codehaus.xfire.spring.XFireConfigLoader

    extends AbstractXFireSpringTest
{
    public void testConfigLoader()
        throws Exception
    {
        XFireConfigLoader configLoader = new XFireConfigLoader();
        XFire xfire = configLoader.loadConfig("META-INF/xfire/sservices.xml", null);
       
        doAssertions(xfire);
    }
View Full Code Here

Examples of org.codehaus.xfire.spring.XFireConfigLoader

    }
   
    public void testConfigLoaderWithFilesystem()
        throws Exception
    {
        XFireConfigLoader configLoader = new XFireConfigLoader();
        XFire xfire = configLoader.loadConfig(getTestFile("src/test/META-INF/xfire/sservices.xml").getAbsolutePath());
       
        doAssertions(xfire);
    }
View Full Code Here

Examples of org.codehaus.xfire.spring.XFireConfigLoader

    }

    public void testConfigLoaderWithMultipleFiles()
        throws Exception
    {
        XFireConfigLoader configLoader = new XFireConfigLoader();
        configLoader.setBasedir(getTestFile("."));
        XFire xfire = configLoader.loadConfig("src/test/META-INF/xfire/sservices.xml, " +
                "org/codehaus/xfire/spring/config/OperationMetadataServices.xml");
       
        doAssertions(xfire);
    }
View Full Code Here

Examples of org.codehaus.xfire.spring.XFireConfigLoader

    public void testConfigLoaderWithParentContext() throws Exception
    {
      ServletContext servletCtx = new MockServletContext();
      ClassPathXmlApplicationContext appCtx = new ClassPathXmlApplicationContext(new String[] {"org/codehaus/xfire/spring/xfire.xml"});

        XFireConfigLoader configLoader = new XFireConfigLoader();
        XFire xfire = configLoader.loadConfig("META-INF/xfire/sservices.xml", appCtx);

        doAssertions(xfire);
    }
View Full Code Here

Examples of org.codehaus.xfire.spring.XFireConfigLoader

public class AuthServiceWsdlTest  
    extends AbstractXFireAegisTest
{
    public void testWSDL() throws Exception
    {  
       XFireConfigLoader loader = new XFireConfigLoader();
       XFire xfire = loader.loadConfig(new File(new File(getBasedir()), "target/auth-service/META-INF/xfire/services.xml").getAbsolutePath());
      
       assertTrue(xfire.getServiceRegistry().getServices().size() == 1);
      
       Service service = xfire.getServiceRegistry().getService(new QName("urn:xfire:authenticate", "AuthService"));
      
View Full Code Here

Examples of org.codehaus.xfire.spring.XFireConfigLoader

        // displayClasspath(originalCL, "originalCL");

        Thread.currentThread().setContextClassLoader(overridingContextClassLoader);
        // displayClasspath(overridingContextClassLoader, "classLoader");

        XFireConfigLoader configLoader = new XFireConfigLoader();

        XFire xfire;

        try {
            xfire = configLoader.loadConfig( configUrl );
        } catch (XFireException e) {
            throw new BuildException( "Failure to load the configUrl", e);
        }

        final ServiceRegistry serviceRegistry = xfire.getServiceRegistry();
View Full Code Here

Examples of org.codehaus.xfire.spring.XFireConfigLoader

        return xfire;
    }
   
    public XFire loadConfig(String configPath) throws XFireException
    {
        XFireConfigLoader loader = new XFireConfigLoader();
        loader.setBasedir(getWebappBase());
        log.debug("Loading configuration files relative to " + loader.getBasedir().getAbsolutePath());

        ServletContext servletCtx = getServletContext();
        ApplicationContext parent = (ApplicationContext) servletCtx.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);

        if (parent == null)
        {
            GenericWebApplicationContext webCtx = new GenericWebApplicationContextX();
            webCtx.setServletContext(getServletContext());
            webCtx.refresh();
            parent = webCtx;
        }
       
        ApplicationContext newCtx = loader.loadContext(configPath, parent);
        if(servletCtx.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE) == null)
        {
             servletCtx.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, newCtx);
        }
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.