Package org.jboss.wsf.common

Examples of org.jboss.wsf.common.ResourceLoaderAdapter


  
   public void testWithDir() throws Exception
   {
      //Getting the classloader for ResourceLoaderAdapter which lives in COMMON -> target/classes in this project
      ClassLoader cl = ResourceLoaderAdapter.class.getClassLoader();
      ResourceLoaderAdapter ula = new ResourceLoaderAdapter(cl);
     
      UnifiedVirtualFile common = ula.findChild("org/jboss/wsf/common/");
      assertNotNull(common);
      assertTrue(common.toURL().toExternalForm().contains("target" + File.separator + "classes")); //check we got a URL to dir
      assertEquals("common/", common.getName());
      List<UnifiedVirtualFile> children = common.getChildren();
      assertNotNull(children);
View Full Code Here


   public ServiceDelegateImpl(URL wsdlURL, QName serviceName, Class serviceClass)
   {
      // If this Service was constructed through the ServiceObjectFactory
      // this thread local association should be available
      usRef = ServiceObjectFactoryJAXWS.getServiceRefAssociation();
      UnifiedVirtualFile vfsRoot = (usRef != null ? vfsRoot = usRef.getVfsRoot() : new ResourceLoaderAdapter());

      // Verify wsdl access if this is not a generic Service
      if (wsdlURL != null && serviceClass != Service.class)
      {
         try
View Full Code Here

   public ServiceDelegateImpl(URL wsdlURL, QName serviceName, Class serviceClass)
   {
      // If this Service was constructed through the ServiceObjectFactory
      // this thread local association should be available
      usRef = ServiceObjectFactoryJAXWS.getServiceRefAssociation();
      UnifiedVirtualFile vfsRoot = (usRef != null ? vfsRoot = usRef.getVfsRoot() : new ResourceLoaderAdapter());

      // Verify wsdl access if this is not a generic Service
      if (wsdlURL != null && serviceClass != Service.class)
      {
         try
View Full Code Here

      // Try to get the URL as resource
      if (configURL == null)
      {
         try
         {
            configURL = new ResourceLoaderAdapter().findChild(configFile).toURL();
         }
         catch (IOException ex)
         {
            // ignore
         }
View Full Code Here

   public EndpointMetaData getEndpointMetaData()
   {
      if (epMetaData == null)
      {
         ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
         UnifiedVirtualFile vfsRoot = new ResourceLoaderAdapter();
         UnifiedMetaData wsMetaData = new UnifiedMetaData(vfsRoot);
         wsMetaData.setClassLoader(ctxLoader);

         ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, new QName(Constants.NS_JBOSSWS_URI, "AnonymousService"));
         wsMetaData.addService(serviceMetaData);
View Full Code Here

{
   public void testWithJar() throws Exception
   {
      //Getting the classloader for UnifiedVirtualFile which lives in SPI -> external jar (from the maven repo)
      ClassLoader cl = UnifiedVirtualFile.class.getClassLoader();
      ResourceLoaderAdapter ula = new ResourceLoaderAdapter(cl);
     
      UnifiedVirtualFile deployment = ula.findChild("org/jboss/wsf/spi/deployment/");
      assertNotNull(deployment);
      assertTrue(deployment.toURL().toExternalForm().contains("jar!")); //check we got a URL to a jar
      assertEquals("deployment/", deployment.getName());
      List<UnifiedVirtualFile> children = deployment.getChildren();
      assertNotNull(children);
View Full Code Here

  
   public void testWithDir() throws Exception
   {
      //Getting the classloader for ResourceLoaderAdapter which lives in COMMON -> target/classes in this project
      ClassLoader cl = ResourceLoaderAdapter.class.getClassLoader();
      ResourceLoaderAdapter ula = new ResourceLoaderAdapter(cl);
     
      UnifiedVirtualFile common = ula.findChild("org/jboss/wsf/common/");
      assertNotNull(common);
      assertTrue(common.toURL().toExternalForm().contains("target/classes")); //check we got a URL to dir
      assertEquals("common/", common.getName());
      List<UnifiedVirtualFile> children = common.getChildren();
      assertNotNull(children);
View Full Code Here

   private UnifiedVirtualFile getWebservicesFile(DeploymentInfo unit, String wsFile)
   {
      try
      {
         UnifiedVirtualFile vfsRoot = new ResourceLoaderAdapter(unit.localCl);
         return (wsFile != null ? vfsRoot.findChild(wsFile) : null);
      }
      catch (IOException e)
      {
         return null;
      }
View Full Code Here

TOP

Related Classes of org.jboss.wsf.common.ResourceLoaderAdapter

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.