Package org.jboss.ws.metadata.umdm

Examples of org.jboss.ws.metadata.umdm.UnifiedMetaData


         throw new IllegalArgumentException("Invalid wsdlURL: " + wsdlURL);

      log.debug("START buildMetaData: [service=" + serviceName + "]");
      try
      {
         UnifiedMetaData wsMetaData = new UnifiedMetaData(vfsRoot);

         ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, serviceName);
         wsMetaData.addService(serviceMetaData);

         serviceMetaData.setWsdlLocation(wsdlURL);
         WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();

         buildMetaDataInternal(serviceMetaData, wsdlDefinitions);
View Full Code Here


         JAXWSClientMetaDataBuilder builder = new JAXWSClientMetaDataBuilder();
         serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, vfsRoot);
      }
      else
      {
         UnifiedMetaData wsMetaData = new UnifiedMetaData(vfsRoot);
         serviceMetaData = new ServiceMetaData(wsMetaData, serviceName);
         wsMetaData.addService(serviceMetaData);
      }

      handlerResolver = new HandlerResolverImpl();

      if (usRef != null)
View Full Code Here

   public UnifiedMetaData buildMetaData(ArchiveDeployment dep)
   {
      log.debug("START buildMetaData: [name=" + dep.getCanonicalName() + "]");
      try
      {
         UnifiedMetaData wsMetaData = new UnifiedMetaData(dep.getRootFile());
         wsMetaData.setDeploymentName(dep.getCanonicalName());
         ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
         if(null == runtimeClassLoader)
            throw new IllegalArgumentException("Runtime classloader cannot be null");
         wsMetaData.setClassLoader(runtimeClassLoader);
         ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
         Thread.currentThread().setContextClassLoader(runtimeClassLoader);
         // For every bean
         for (Endpoint ep : dep.getService().getEndpoints())
         {
View Full Code Here

/*    */
/*    */ public class PublishContractDeploymentAspect extends DeploymentAspect
/*    */ {
/*    */   public void create(Deployment dep)
/*    */   {
/* 45 */     UnifiedMetaData umd = (UnifiedMetaData)dep.getAttachment(UnifiedMetaData.class);
/* 46 */     if (umd == null) {
/* 47 */       throw new IllegalStateException("Cannot obtain unified meta data");
/*    */     }
/*    */     try
/*    */     {
View Full Code Here

/*     */   private UnifiedServiceRefMetaData usrMetaData;
/*     */   private HandlerRegistryImpl handlerRegistry;
/*     */
/*     */   ServiceImpl(QName serviceName)
/*     */   {
/*  96 */     UnifiedMetaData wsMetaData = new UnifiedMetaData(new ResourceLoaderAdapter());
/*  97 */     this.serviceMetaData = new ServiceMetaData(wsMetaData, serviceName);
/*  98 */     this.handlerRegistry = new HandlerRegistryImpl(this.serviceMetaData);
/*     */   }
View Full Code Here

/*  74 */       throw new IllegalArgumentException("Invalid wsdlURL: " + wsdlURL);
/*     */     }
/*  76 */     log.debug("START buildMetaData: [service=" + serviceName + "]");
/*     */     try
/*     */     {
/*  79 */       UnifiedMetaData wsMetaData = new UnifiedMetaData(vfsRoot);
/*     */
/*  81 */       ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, serviceName);
/*  82 */       wsMetaData.addService(serviceMetaData);
/*     */
/*  84 */       serviceMetaData.setWsdlLocation(wsdlURL);
/*  85 */       WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
/*     */
/*  87 */       buildMetaDataInternal(serviceMetaData, wsdlDefinitions);
View Full Code Here

/*    */   public UnifiedMetaData buildMetaData(ArchiveDeployment dep)
/*    */   {
/* 48 */     this.log.debug("START buildMetaData: [name=" + dep.getCanonicalName() + "]");
/*    */     try
/*    */     {
/* 51 */       UnifiedMetaData wsMetaData = new UnifiedMetaData(dep.getRootFile());
/* 52 */       wsMetaData.setDeploymentName(dep.getCanonicalName());
/* 53 */       ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
/* 54 */       if (null == runtimeClassLoader)
/* 55 */         throw new IllegalArgumentException("Runtime classloader cannot be null");
/* 56 */       wsMetaData.setClassLoader(runtimeClassLoader);
/*    */
/* 59 */       for (Endpoint ep : dep.getService().getEndpoints())
/*    */       {
/* 61 */         String shortName = ep.getShortName();
/* 62 */         Class beanClass = ep.getTargetBeanClass();
View Full Code Here

/*     */   public UnifiedMetaData buildMetaData(ArchiveDeployment dep)
/*     */   {
/*  73 */     this.log.debug("START buildMetaData: [name=" + dep.getCanonicalName() + "]");
/*     */     try
/*     */     {
/*  77 */       UnifiedMetaData wsMetaData = new UnifiedMetaData(dep.getRootFile());
/*  78 */       wsMetaData.setDeploymentName(dep.getCanonicalName());
/*  79 */       ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
/*  80 */       if (null == runtimeClassLoader)
/*  81 */         throw new IllegalArgumentException("Runtime loader cannot be null");
/*  82 */       wsMetaData.setClassLoader(runtimeClassLoader);
/*     */
/*  84 */       WebservicesMetaData jaxrpcMapping = (WebservicesMetaData)dep.getAttachment(WebservicesMetaData.class);
/*  85 */       WebserviceDescriptionMetaData[] wsDescriptionArr = jaxrpcMapping.getWebserviceDescriptions();
/*  86 */       for (WebserviceDescriptionMetaData wsdMetaData : wsDescriptionArr)
/*     */       {
/*  88 */         ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, null);
/*  89 */         serviceMetaData.setWebserviceDescriptionName(wsdMetaData.getWebserviceDescriptionName());
/*  90 */         wsMetaData.addService(serviceMetaData);
/*     */
/*  93 */         String wsdlFile = wsdMetaData.getWsdlFile();
/*  94 */         serviceMetaData.setWsdlFile(wsdlFile);
/*     */
/*  97 */         WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
/*     */
/* 100 */         String mappingFile = wsdMetaData.getJaxrpcMappingFile();
/* 101 */         serviceMetaData.setMappingLocation(dep.getMetaDataFileURL(mappingFile));
/* 102 */         JavaWsdlMapping javaWsdlMapping = serviceMetaData.getJavaWsdlMapping();
/* 103 */         if (javaWsdlMapping == null) {
/* 104 */           throw new WSException("jaxrpc-mapping-file not configured from webservices.xml");
/*     */         }
/*     */
/* 107 */         setupTypesMetaData(serviceMetaData);
/*     */
/* 110 */         WSSecurityConfigFactory wsseConfFactory = WSSecurityConfigFactory.newInstance();
/* 111 */         WSSecurityConfiguration securityConfiguration = wsseConfFactory.createConfiguration(wsMetaData.getRootFile(), WSSecurityOMFactory.SERVER_RESOURCE_NAME);
/* 112 */         serviceMetaData.setSecurityConfiguration(securityConfiguration);
/*     */
/* 115 */         PortComponentMetaData[] pcMetaDataArr = wsdMetaData.getPortComponents();
/* 116 */         for (PortComponentMetaData pcMetaData : pcMetaDataArr)
/*     */         {
/* 118 */           String linkName = pcMetaData.getEjbLink() != null ? pcMetaData.getEjbLink() : pcMetaData.getServletLink();
/* 119 */           QName portName = pcMetaData.getWsdlPort();
/*     */
/* 123 */           if (portName.getNamespaceURI().length() == 0)
/*     */           {
/* 125 */             String nsURI = wsdlDefinitions.getTargetNamespace();
/* 126 */             portName = new QName(nsURI, portName.getLocalPart());
/* 127 */             this.log.warn("Adding wsdl targetNamespace to: " + portName);
/* 128 */             pcMetaData.setWsdlPort(portName);
/*     */           }
/*     */
/* 131 */           WSDLEndpoint wsdlEndpoint = getWsdlEndpoint(wsdlDefinitions, portName);
/* 132 */           if (wsdlEndpoint == null) {
/* 133 */             throw new WSException("Cannot find port in wsdl: " + portName);
/*     */           }
/*     */
/* 136 */           serviceMetaData.setServiceName(wsdlEndpoint.getWsdlService().getName());
/* 137 */           QName interfaceQName = wsdlEndpoint.getInterface().getName();
/*     */
/* 139 */           Endpoint ep = dep.getService().getEndpointByName(linkName);
/* 140 */           ServerEndpointMetaData sepMetaData = new ServerEndpointMetaData(serviceMetaData, ep, portName, interfaceQName, EndpointMetaData.Type.JAXRPC);
/* 141 */           sepMetaData.setPortComponentName(pcMetaData.getPortComponentName());
/* 142 */           sepMetaData.setLinkName(linkName);
/* 143 */           serviceMetaData.addEndpoint(sepMetaData);
/*     */
/* 145 */           initEndpointEncodingStyle(sepMetaData);
/*     */
/* 147 */           initEndpointAddress(dep, sepMetaData);
/*     */
/* 149 */           EJBArchiveMetaData apMetaData = (EJBArchiveMetaData)dep.getAttachment(EJBArchiveMetaData.class);
/* 150 */           JSEArchiveMetaData webMetaData = (JSEArchiveMetaData)dep.getAttachment(JSEArchiveMetaData.class);
/* 151 */           if (apMetaData != null)
/*     */           {
/* 153 */             wsMetaData.setSecurityDomain(apMetaData.getSecurityDomain());
/*     */
/* 156 */             String wsdName = serviceMetaData.getWebserviceDescriptionName();
/* 157 */             String wsdlPublishLocation = apMetaData.getWsdlPublishLocationByName(wsdName);
/* 158 */             serviceMetaData.setWsdlPublishLocation(wsdlPublishLocation);
/*     */
/* 161 */             EJBMetaData bmd = apMetaData.getBeanByEjbName(linkName);
/* 162 */             if (bmd == null) {
/* 163 */               throw new WSException("Cannot obtain UnifiedBeanMetaData for: " + linkName);
/*     */             }
/* 165 */             String configName = apMetaData.getConfigName();
/* 166 */             String configFile = apMetaData.getConfigFile();
/* 167 */             if ((configName != null) || (configFile != null)) {
/* 168 */               sepMetaData.setConfigName(configName, configFile);
/*     */             }
/* 170 */             EJBSecurityMetaData smd = bmd.getSecurityMetaData();
/* 171 */             if (smd != null)
/*     */             {
/* 173 */               String authMethod = smd.getAuthMethod();
/* 174 */               sepMetaData.setAuthMethod(authMethod);
/* 175 */               String transportGuarantee = smd.getTransportGuarantee();
/* 176 */               sepMetaData.setTransportGuarantee(transportGuarantee);
/* 177 */               Boolean secureWSDLAccess = Boolean.valueOf(smd.getSecureWSDLAccess());
/* 178 */               sepMetaData.setSecureWSDLAccess(secureWSDLAccess.booleanValue());
/*     */             }
/*     */           }
/* 181 */           else if (webMetaData != null)
/*     */           {
/* 183 */             wsMetaData.setSecurityDomain(webMetaData.getSecurityDomain());
/*     */
/* 185 */             String targetBean = (String)webMetaData.getServletClassNames().get(linkName);
/* 186 */             sepMetaData.setServiceEndpointImplName(targetBean);
/*     */
/* 189 */             String wsdName = serviceMetaData.getWebserviceDescriptionName();
View Full Code Here

/* 104 */     if (this.log.isDebugEnabled()) this.log.debug("START buildMetaData: [service=" + serviceQName + "]");
/*     */     try
/*     */     {
/* 107 */       ResourceLoaderAdapter vfsRoot = new ResourceLoaderAdapter(loader);
/*     */
/* 109 */       UnifiedMetaData wsMetaData = new UnifiedMetaData(vfsRoot);
/* 110 */       wsMetaData.setClassLoader(loader);
/*     */
/* 112 */       ServiceMetaData serviceMetaData = new ServiceMetaData(wsMetaData, serviceQName);
/* 113 */       wsMetaData.addService(serviceMetaData);
/*     */
/* 115 */       serviceMetaData.setWsdlLocation(wsdlURL);
/* 116 */       WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
/*     */
/* 118 */       if (javaWsdlMapping != null)
/*     */       {
/* 120 */         URL mappingURL = new URL("http://www.jboss.org/jbossws/dummy-mapping-file");
/* 121 */         if ((usrMetaData != null) && (usrMetaData.getMappingLocation() != null))
/*     */         {
/* 123 */           mappingURL = usrMetaData.getMappingLocation();
/*     */         }
/* 125 */         wsMetaData.addMappingDefinition(mappingURL.toExternalForm(), javaWsdlMapping);
/* 126 */         serviceMetaData.setMappingLocation(mappingURL);
/*     */       }
/*     */
/* 129 */       if (securityConfig != null)
/*     */       {
/* 131 */         serviceMetaData.setSecurityConfiguration(securityConfig);
/* 132 */         setupSecurity(securityConfig, wsMetaData.getRootFile());
/*     */       }
/*     */
/* 135 */       buildMetaDataInternal(serviceMetaData, wsdlDefinitions, javaWsdlMapping, usrMetaData);
/*     */
/* 138 */       wsMetaData.eagerInitialize();
/*     */
/* 140 */       if (this.log.isDebugEnabled()) this.log.debug("END buildMetaData: " + wsMetaData);
/* 141 */       return serviceMetaData;
/*     */     }
/*     */     catch (RuntimeException rte)
View Full Code Here

/*     */   public UnifiedMetaData buildMetaData(ArchiveDeployment dep)
/*     */   {
/*  56 */     this.log.debug("START buildMetaData: [name=" + dep.getCanonicalName() + "]");
/*     */     try
/*     */     {
/*  59 */       UnifiedMetaData wsMetaData = new UnifiedMetaData(dep.getRootFile());
/*  60 */       wsMetaData.setDeploymentName(dep.getCanonicalName());
/*     */
/*  62 */       ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
/*  63 */       if (null == runtimeClassLoader)
/*  64 */         throw new IllegalArgumentException("Runtime loader cannot be null");
/*  65 */       wsMetaData.setClassLoader(runtimeClassLoader);
/*     */
/*  68 */       EJBArchiveMetaData apMetaData = (EJBArchiveMetaData)dep.getAttachment(EJBArchiveMetaData.class);
/*  69 */       Iterator it = apMetaData.getEnterpriseBeans();
/*  70 */       while (it.hasNext())
/*     */       {
/*  72 */         EJBMetaData beanMetaData = (EJBMetaData)it.next();
/*  73 */         String ejbClassName = beanMetaData.getEjbClass();
/*  74 */         Class beanClass = wsMetaData.getClassLoader().loadClass(ejbClassName);
/*  75 */         if ((beanClass.isAnnotationPresent(WebService.class)) || (beanClass.isAnnotationPresent(WebServiceProvider.class)))
/*     */         {
/*  77 */           String ejbLink = beanMetaData.getEjbName();
/*  78 */           JAXWSServerMetaDataBuilder.setupProviderOrWebService(dep, wsMetaData, beanClass, ejbLink);
/*     */
/*  81 */           if (beanClass.isAnnotationPresent(SecurityDomain.class))
/*     */           {
/*  83 */             SecurityDomain anSecurityDomain = (SecurityDomain)beanClass.getAnnotation(SecurityDomain.class);
/*  84 */             String lastDomain = wsMetaData.getSecurityDomain();
/*  85 */             String securityDomain = anSecurityDomain.value();
/*  86 */             if ((lastDomain != null) && (!lastDomain.equals(securityDomain))) {
/*  87 */               throw new IllegalStateException("Multiple security domains not supported: " + securityDomain);
/*     */             }
/*  89 */             wsMetaData.setSecurityDomain(securityDomain);
/*     */           }
/*     */         }
/*     */       }
/*     */
/*  94 */       this.log.debug("END buildMetaData: " + wsMetaData);
View Full Code Here

TOP

Related Classes of org.jboss.ws.metadata.umdm.UnifiedMetaData

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.