Examples of UnifiedVirtualFile


Examples of org.jboss.wsf.spi.deployment.UnifiedVirtualFile

   /** Unmrashall the webservices.xml if there is one
    */
   protected WebservicesMetaData getWebservicesMetaData(DeploymentUnit unit)
   {
      WebservicesMetaData wsMetaData = unit.getAttachment(WebservicesMetaData.class);
      UnifiedVirtualFile vfWebservices = getWebservicesFile(unit);
      if (wsMetaData == null && vfWebservices != null)
      {
         try
         {
            URL wsURL = vfWebservices.toURL();
            Element root = DOMUtils.parse(wsURL.openStream());
            String namespaceURI = root.getNamespaceURI();
            if (namespaceURI.equals("http://java.sun.com/xml/ns/j2ee"))
            {
               Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.UnifiedVirtualFile

      return wsMetaData;
   }

   private UnifiedVirtualFile getWebservicesFile(DeploymentUnit unit)
   {
      UnifiedVirtualFile wsFile = null;
      if (unit instanceof VFSDeploymentUnit)
      {
         VirtualFile vf = ((VFSDeploymentUnit)unit).getMetaDataFile("webservices.xml");
         wsFile = vf != null ? new VirtualFileAdaptor(vf) : null;
      }
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.UnifiedVirtualFile

    private List<BindingDescription> getWebServiceConfigurations(final DeploymentUnit deploymentUnit, final ClassInfo classInfo) {
        final List<BindingDescription> configurations = new ArrayList<BindingDescription>();
        final Map<DotName, List<AnnotationInstance>> classAnnotations = classInfo.annotations();
        final Module module = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE);
        final CompositeIndex index = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.COMPOSITE_ANNOTATION_INDEX);
        UnifiedVirtualFile vfs = getUnifiedVirtualFile(deploymentUnit);
        if (classAnnotations != null) {
            final List<AnnotationInstance> resourceAnnotations = classAnnotations.get(WEB_SERVICE_REF_ANNOTATION_NAME);
            if (resourceAnnotations != null) {
                for (AnnotationInstance annotation : resourceAnnotations) {
                    configurations.add(getWebServiceConfiguration(annotation, vfs, module, index));
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.UnifiedVirtualFile

   protected void testVFSAdaptor(VirtualFileAdaptor adaptor) throws Exception
   {
      byte[] bytes = serialize(adaptor);
      adaptor = (VirtualFileAdaptor)deserialize(bytes);
      UnifiedVirtualFile file = adaptor.findChild("PersistenceMD_testDefaultMetaData.xml");
      assertNotNull(file);
      assertNotNull(adaptor.findChild("../"));

      List<UnifiedVirtualFile> list = adaptor.getChildren();
      assertNotNull(list);
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.UnifiedVirtualFile

   /** Unmrashall the webservices.xml if there is one
    */
   protected WebservicesMetaData getWebservicesMetaData(DeploymentUnit unit)
   {
      WebservicesMetaData wsMetaData = unit.getAttachment(WebservicesMetaData.class);
      UnifiedVirtualFile vfWebservices = getWebservicesFile(unit);
      if (wsMetaData == null && vfWebservices != null)
      {
         try
         {
            URL wsURL = vfWebservices.toURL();
            Element root = DOMUtils.parse(wsURL.openStream());
            String namespaceURI = root.getNamespaceURI();
            if (namespaceURI.equals("http://java.sun.com/xml/ns/j2ee"))
            {
               Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.UnifiedVirtualFile

      return wsMetaData;
   }

   private UnifiedVirtualFile getWebservicesFile(DeploymentUnit unit)
   {
      UnifiedVirtualFile wsFile = null;
      if (unit instanceof VFSDeploymentUnit)
      {
         VirtualFile vf = ((VFSDeploymentUnit)unit).getMetaDataFile("webservices.xml");
         wsFile = vf != null ? new VirtualFileAdaptor(vf) : null;
      }
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.UnifiedVirtualFile

         // Try wsdlFile as child from root
         if (wsdlURL == null)
         {
            try
            {
               UnifiedVirtualFile vfsRoot = getUnifiedMetaData().getRootFile();
               wsdlURL = vfsRoot.findChild(wsdlFile).toURL();
            }
            catch (IOException ex)
            {
               throw new IllegalStateException("Cannot find wsdl: " + wsdlFile);
            }
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.UnifiedVirtualFile

   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

Examples of org.jboss.wsf.spi.deployment.UnifiedVirtualFile

         if (serviceMetaData.getSecurityConfiguration() == null)
         {
            try
            {
               WSSecurityConfigFactory wsseConfFactory = WSSecurityConfigFactory.newInstance();
               UnifiedVirtualFile vfsRoot = serviceMetaData.getUnifiedMetaData().getRootFile();
               WSSecurityConfiguration config = wsseConfFactory.createConfiguration(vfsRoot, securityConfig);
               serviceMetaData.setSecurityConfiguration(config);
            }
            catch (IOException ex)
            {
View Full Code Here

Examples of org.jboss.wsf.spi.deployment.UnifiedVirtualFile

   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
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.