Package org.jboss.ws.tools.helpers

Examples of org.jboss.ws.tools.helpers.MappingFileGeneratorHelper


    * @throws IOException
    * @throws IllegalArgumentException mappingfilename is null
    */
   public JavaWsdlMapping generate() throws IOException
   {
      MappingFileGeneratorHelper helper = new MappingFileGeneratorHelper(this.wsdlDefinitions, this.serviceName, this.namespacePackageMap, this.serviceEndpointInterface,
            this.typeMapping, this.parameterStyle);
      JavaWsdlMapping jwm = new JavaWsdlMapping();

      //If the schema has types, we will need to generate the java/xml type mapping
      helper.constructJavaXmlTypeMapping(jwm);
      WSDLService[] services = wsdlDefinitions.getServices();
      int lenServices = 0;
      if (services != null)
         lenServices = services.length;
      for (int i = 0; i < lenServices; i++)
      {
         WSDLService wsdlService = services[i];
         jwm.addServiceInterfaceMappings(helper.constructServiceInterfaceMapping(jwm, wsdlService));
         helper.constructServiceEndpointInterfaceMapping(jwm, wsdlService);
      }

      // Add package to namespace mapping after helper has generated the rest of the file.
      String targetNS = wsdlDefinitions.getTargetNamespace();
      String typeNamespace = helper.getTypeNamespace();
      if (typeNamespace == null)
         typeNamespace = targetNS;

      //Construct package mapping
      //Check if the user has provided a typeNamespace
      if (typeNamespace != null && typeNamespace.equals(targetNS) == false || isServerSideGeneration())
         jwm.addPackageMapping(helper.constructPackageMapping(jwm, getPackageName(typeNamespace), typeNamespace));
      jwm.addPackageMapping(helper.constructPackageMapping(jwm, getPackageName(targetNS), targetNS));

      if (namespacePackageMap != null)
      {
         Set<String> keys = namespacePackageMap.keySet();
         Iterator<String> iter = keys.iterator();
         while (iter != null && iter.hasNext())
         {
            String ns = iter.next();
            if (jwm.getPackageNameForNamespaceURI(ns) == null)
            {
               jwm.addPackageMapping(helper.constructPackageMapping(jwm, namespacePackageMap.get(ns), ns));
            }
         }
      }

      return jwm;
View Full Code Here


    * @throws IOException
    * @throws IllegalArgumentException mappingfilename is null
    */
   public JavaWsdlMapping generate() throws IOException
   {
      MappingFileGeneratorHelper helper = new MappingFileGeneratorHelper(this.wsdlDefinitions, this.serviceName, this.packageName, this.serviceEndpointInterface,
            this.typeMapping, this.parameterStyle);
      JavaWsdlMapping jwm = new JavaWsdlMapping();

      //If the schema has types, we will need to generate the java/xml type mapping
      helper.constructJavaXmlTypeMapping(jwm);
      WSDLService[] services = wsdlDefinitions.getServices();
      int lenServices = 0;
      if (services != null)
         lenServices = services.length;
      for (int i = 0; i < lenServices; i++)
      {
         WSDLService wsdlService = services[i];
         jwm.addServiceInterfaceMappings(helper.constructServiceInterfaceMapping(jwm, wsdlService));
         helper.constructServiceEndpointInterfaceMapping(jwm, wsdlService);
      }

      // Add package to namespace mapping after helper has generated the rest of the file.
      String targetNS = wsdlDefinitions.getTargetNamespace();
      String typeNamespace = helper.getTypeNamespace();
      if (typeNamespace == null)
         typeNamespace = targetNS;

      //Construct package mapping
      //Check if the user has provided a typeNamespace
      if (typeNamespace != null && typeNamespace.equals(targetNS) == false || isServerSideGeneration())
         jwm.addPackageMapping(helper.constructPackageMapping(jwm, packageName, typeNamespace));
      jwm.addPackageMapping(helper.constructPackageMapping(jwm, packageName, targetNS));

      return jwm;
   }
View Full Code Here

    * @throws IOException
    * @throws IllegalArgumentException mappingfilename is null
    */
   public JavaWsdlMapping generate() throws IOException
   {
      MappingFileGeneratorHelper helper = new MappingFileGeneratorHelper(this.wsdlDefinitions, this.serviceName, this.namespacePackageMap, this.serviceEndpointInterface,
            this.typeMapping, this.parameterStyle);
      JavaWsdlMapping jwm = new JavaWsdlMapping();

      //If the schema has types, we will need to generate the java/xml type mapping
      helper.constructJavaXmlTypeMapping(jwm);
      WSDLService[] services = wsdlDefinitions.getServices();
      int lenServices = 0;
      if (services != null)
         lenServices = services.length;
      for (int i = 0; i < lenServices; i++)
      {
         WSDLService wsdlService = services[i];
         jwm.addServiceInterfaceMappings(helper.constructServiceInterfaceMapping(jwm, wsdlService));
         helper.constructServiceEndpointInterfaceMapping(jwm, wsdlService);
      }

      // Add package to namespace mapping after helper has generated the rest of the file.
      String targetNS = wsdlDefinitions.getTargetNamespace();
      String typeNamespace = helper.getTypeNamespace();
      if (typeNamespace == null)
         typeNamespace = targetNS;

      //Construct package mapping
      //Check if the user has provided a typeNamespace
      if (typeNamespace != null && typeNamespace.equals(targetNS) == false || isServerSideGeneration())
         jwm.addPackageMapping(helper.constructPackageMapping(jwm, getPackageName(typeNamespace), typeNamespace));
      jwm.addPackageMapping(helper.constructPackageMapping(jwm, getPackageName(targetNS), targetNS));

      if (namespacePackageMap != null)
      {
         Set<String> keys = namespacePackageMap.keySet();
         Iterator<String> iter = keys.iterator();
         while (iter != null && iter.hasNext())
         {
            String ns = iter.next();
            if (jwm.getPackageNameForNamespaceURI(ns) == null)
            {
               jwm.addPackageMapping(helper.constructPackageMapping(jwm, namespacePackageMap.get(ns), ns));
            }
         }
      }

      return jwm;
View Full Code Here

    * @throws IOException
    * @throws IllegalArgumentException mappingfilename is null
    */
   public JavaWsdlMapping generate() throws IOException
   {
      MappingFileGeneratorHelper helper = new MappingFileGeneratorHelper(this.wsdlDefinitions, this.serviceName, this.namespacePackageMap, this.serviceEndpointInterface,
            this.typeMapping, this.parameterStyle);
      JavaWsdlMapping jwm = new JavaWsdlMapping();

      //If the schema has types, we will need to generate the java/xml type mapping
      helper.constructJavaXmlTypeMapping(jwm);
      WSDLService[] services = wsdlDefinitions.getServices();
      int lenServices = 0;
      if (services != null)
         lenServices = services.length;
      for (int i = 0; i < lenServices; i++)
      {
         WSDLService wsdlService = services[i];
         jwm.addServiceInterfaceMappings(helper.constructServiceInterfaceMapping(jwm, wsdlService));
         helper.constructServiceEndpointInterfaceMapping(jwm, wsdlService);
      }

      // Add package to namespace mapping after helper has generated the rest of the file.
      String targetNS = wsdlDefinitions.getTargetNamespace();
      String typeNamespace = helper.getTypeNamespace();
      if (typeNamespace == null)
         typeNamespace = targetNS;

      //Construct package mapping
      //Check if the user has provided a typeNamespace
      if (typeNamespace != null && typeNamespace.equals(targetNS) == false || isServerSideGeneration())
         jwm.addPackageMapping(helper.constructPackageMapping(jwm, getPackageName(typeNamespace), typeNamespace));
      jwm.addPackageMapping(helper.constructPackageMapping(jwm, getPackageName(targetNS), targetNS));

      if (namespacePackageMap != null)
      {
         Set<String> keys = namespacePackageMap.keySet();
         Iterator<String> iter = keys.iterator();
         while (iter != null && iter.hasNext())
         {
            String ns = iter.next();
            if (jwm.getPackageNameForNamespaceURI(ns) == null)
            {
               jwm.addPackageMapping(helper.constructPackageMapping(jwm, namespacePackageMap.get(ns), ns));
            }
         }
      }

      return jwm;
View Full Code Here

/*     */   }
/*     */
/*     */   public JavaWsdlMapping generate()
/*     */     throws IOException
/*     */   {
/* 159 */     MappingFileGeneratorHelper helper = new MappingFileGeneratorHelper(this.wsdlDefinitions, this.serviceName, this.packageName, this.serviceEndpointInterface, this.typeMapping, this.parameterStyle);
/*     */
/* 161 */     JavaWsdlMapping jwm = new JavaWsdlMapping();
/*     */
/* 164 */     helper.constructJavaXmlTypeMapping(jwm);
/* 165 */     WSDLService[] services = this.wsdlDefinitions.getServices();
/* 166 */     int lenServices = 0;
/* 167 */     if (services != null)
/* 168 */       lenServices = services.length;
/* 169 */     for (int i = 0; i < lenServices; i++)
/*     */     {
/* 171 */       WSDLService wsdlService = services[i];
/* 172 */       jwm.addServiceInterfaceMappings(helper.constructServiceInterfaceMapping(jwm, wsdlService));
/* 173 */       helper.constructServiceEndpointInterfaceMapping(jwm, wsdlService);
/*     */     }
/*     */
/* 177 */     String targetNS = this.wsdlDefinitions.getTargetNamespace();
/* 178 */     String typeNamespace = helper.getTypeNamespace();
/* 179 */     if (typeNamespace == null) {
/* 180 */       typeNamespace = targetNS;
/*     */     }
/*     */
/* 184 */     if (((typeNamespace != null) && (!typeNamespace.equals(targetNS))) || (isServerSideGeneration()))
/* 185 */       jwm.addPackageMapping(helper.constructPackageMapping(jwm, this.packageName, typeNamespace));
/* 186 */     jwm.addPackageMapping(helper.constructPackageMapping(jwm, this.packageName, targetNS));
/*     */
/* 188 */     return jwm;
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.tools.helpers.MappingFileGeneratorHelper

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.