Package org.jboss.ws.metadata.jaxrpcmapping

Examples of org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping


      //Generate the Mapping File
      if (j2wc.mappingFileNeeded)
      {
         UnifiedMetaData unifiedMetaData = jwsdl.getUnifiedMetaData();
         JavaWsdlMapping mapping = jwsdl.getJavaWsdlMapping();

         createWrapperTypes(j2wc, outDir, unifiedMetaData, mapping, endpointClass);
         Writer writer = IOUtils.getCharsetFileWriter(new File(outDir + "/" + j2wc.mappingFileName), Constants.DEFAULT_XML_CHARSET);
         writer.write(Constants.XML_HEADER);
         writer.write(DOMWriter.printNode(DOMUtils.parse(mapping.serialize()), true));
         writer.close();
      }

      //Generate the webservices.xml file
      if (j2wc.wsxmlFileNeeded)
View Full Code Here


            if (glc != null && glc.packageNamespaceMap != null)
               mgf.setNamespacePackageMap(glc.packageNamespaceMap);       
            mgf.setServiceName(wsdl.getServices()[0].getName().getLocalPart());
            mgf.setParameterStyle(w2jc.parameterStyle);

            JavaWsdlMapping jwm = mgf.generate();
            Writer writer = IOUtils.getCharsetFileWriter(new File(outDir + "/" + w2jc.mappingFileName), Constants.DEFAULT_XML_CHARSET);
            writer.write(Constants.XML_HEADER);
            writer.write(DOMWriter.printNode(DOMUtils.parse(jwm.serialize()), true));
            writer.close();
         }

         //Generate the webservices.xml file
         if (w2jc.wsxmlFileNeeded)
View Full Code Here

            if (log.isDebugEnabled())
               log.debug("Create jaxrpc service from wsdl");

            // Create the actual service object
            QName serviceName = serviceRef.getServiceQName();
            JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(serviceRef);
            jaxrpcService = new ServiceImpl(serviceName, wsdlLocation, javaWsdlMapping, securityConfig, serviceRef);
         }
         else
         {
            if (log.isDebugEnabled())
View Full Code Here

      }
   }

   private JavaWsdlMapping getJavaWsdlMapping(UnifiedServiceRefMetaData serviceRef)
   {
      JavaWsdlMapping javaWsdlMapping = null;
      if (serviceRef.getMappingFile() != null)
      {
         String mappingFile = serviceRef.getMappingFile();
         try
         {
View Full Code Here

   public ServiceMetaData buildMetaData(QName serviceQName, URL wsdlURL, URL mappingURL, URL securityURL,
         UnifiedServiceRefMetaData serviceRefMetaData, ClassLoader loader)
   {
      try
      {
         JavaWsdlMapping javaWsdlMapping = null;
         if (mappingURL != null)
         {
            JavaWsdlMappingFactory mappingFactory = JavaWsdlMappingFactory.newInstance();
            javaWsdlMapping = mappingFactory.parse(mappingURL);
         }
View Full Code Here

/*  97 */         String prefix = xmlName.getPrefix();
/*  98 */         String nsURI = xmlName.getNamespaceURI();
/*  99 */         this.delegate.declareNamespace(prefix, nsURI);
/*     */       }
/*     */
/* 104 */       JavaWsdlMapping wsdlMapping = (JavaWsdlMapping)getProperty("org.jboss.xb.java.mapping");
/* 105 */       if (wsdlMapping != null)
/*     */       {
/* 107 */         JavaXmlTypeMapping[] javaXmlMappings = wsdlMapping.getJavaXmlTypeMappings();
/* 108 */         if (javaXmlMappings != null)
/*     */         {
/* 110 */           for (int i = 0; i < javaXmlMappings.length; i++)
/*     */           {
/* 112 */             JavaXmlTypeMapping javaXmlMapping = javaXmlMappings[i];
View Full Code Here

/*    */     }
/*    */
/* 59 */     if (schemaBinding == null)
/*    */     {
/* 61 */       JBossXSModel xsModel = (JBossXSModel)properties.get("org.jboss.xb.xsd.xsmodel");
/* 62 */       JavaWsdlMapping wsdlMapping = (JavaWsdlMapping)properties.get("org.jboss.xb.java.mapping");
/* 63 */       schemaBinding = bindingBuilder.buildSchemaBinding(xsModel, wsdlMapping);
/*    */     }
/*    */
/* 70 */     bindingBuilder.bindParameterToElement(schemaBinding, xmlName, xmlType);
/*    */
View Full Code Here

/* 150 */         if (log.isDebugEnabled()) {
/* 151 */           log.debug("Create jaxrpc service from wsdl");
/*     */         }
/*     */
/* 154 */         QName serviceName = serviceRef.getServiceQName();
/* 155 */         JavaWsdlMapping javaWsdlMapping = getJavaWsdlMapping(serviceRef);
/* 156 */         jaxrpcService = new ServiceImpl(serviceName, wsdlLocation, javaWsdlMapping, securityConfig, serviceRef);
/*     */       }
/*     */       else
/*     */       {
/* 160 */         if (log.isDebugEnabled())
View Full Code Here

/*     */     }
/*     */   }
/*     */
/*     */   private JavaWsdlMapping getJavaWsdlMapping(UnifiedServiceRefMetaData serviceRef)
/*     */   {
/* 277 */     JavaWsdlMapping javaWsdlMapping = null;
/* 278 */     if (serviceRef.getMappingFile() != null)
/*     */     {
/* 280 */       String mappingFile = serviceRef.getMappingFile();
/*     */       try
/*     */       {
View Full Code Here

/*     */
/*  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();
/* 190 */             String wsdlPublishLocation = webMetaData.getWsdlPublishLocationByName(wsdName);
/* 191 */             serviceMetaData.setWsdlPublishLocation(wsdlPublishLocation);
/*     */
/* 193 */             String configName = webMetaData.getConfigName();
/* 194 */             String configFile = webMetaData.getConfigFile();
/* 195 */             if ((configName != null) || (configFile != null)) {
/* 196 */               sepMetaData.setConfigName(configName, configFile);
/*     */             }
/* 198 */             initTransportGuaranteeJSE(dep, sepMetaData, linkName);
/*     */           }
/*     */
/* 202 */           ObjectName sepID = createServiceEndpointID(dep, sepMetaData);
/* 203 */           sepMetaData.setServiceEndpointID(sepID);
/*     */
/* 205 */           replaceAddressLocation(sepMetaData);
/*     */
/* 207 */           String seiName = pcMetaData.getServiceEndpointInterface();
/* 208 */           sepMetaData.setServiceEndpointInterfaceName(seiName);
/*     */
/* 210 */           ServiceEndpointInterfaceMapping seiMapping = javaWsdlMapping.getServiceEndpointInterfaceMapping(seiName);
/* 211 */           if (seiMapping == null) {
/* 212 */             this.log.warn("Cannot obtain SEI mapping for: " + seiName);
/*     */           }
/*     */
/* 215 */           processEndpointMetaDataExtensions(sepMetaData, wsdlDefinitions);
View Full Code Here

TOP

Related Classes of org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping

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.