Package org.jboss.ws.tools

Examples of org.jboss.ws.tools.JavaToWSDL.generate()


      if (gcfg != null)
      {
         if (gcfg.packageNamespaceMap != null)
            jwsdl.setPackageNamespaceMap(gcfg.packageNamespaceMap);
      }
      WSDLDefinitions wsdl = jwsdl.generate(endpointClass);
      //Create the WSDL Directory
      createDir(outDir + "/wsdl");
      String wsdlPath = outDir + "/wsdl/" + j2wc.serviceName + ".wsdl";
      //Generate the WSDL
      Writer fw = IOUtils.getCharsetFileWriter(new File(wsdlPath), Constants.DEFAULT_XML_CHARSET);
View Full Code Here


      if (gcfg != null)
      {
         if (gcfg.packageNamespaceMap != null)
            jwsdl.setPackageNamespaceMap(gcfg.packageNamespaceMap);
      }
      WSDLDefinitions wsdl = jwsdl.generate(endpointClass);
      //Create the WSDL Directory
      createDir(outDir + "/wsdl");
      String wsdlPath = outDir + "/wsdl/" + j2wc.serviceName + ".wsdl";
      //Generate the WSDL
      Writer fw = IOUtils.getCharsetFileWriter(new File(wsdlPath), Constants.DEFAULT_XML_CHARSET);
View Full Code Here

      {
         String key = (String)keys.next();
         Boolean value = (Boolean)featureMap.get(key);
         jwsdl.addFeature(key, value.booleanValue());
      }
      WSDLDefinitions wsdl = jwsdl.generate(seiClass);
      typeMapping = jwsdl.getTypeMapping();
      return wsdl;
   }

   protected Map getBasicFeatures()
View Full Code Here

      JavaToWSDL jwsdl = new JavaToWSDL(Constants.NS_WSDL11);
      jwsdl.setServiceName(sname);
      jwsdl.setTargetNamespace("http://org.jboss.ws");
      jwsdl.addFeature(WSToolsConstants.WSTOOLS_FEATURE_RESTRICT_TO_TARGET_NS, true);
      jwsdl.setStyle(Style.RPC);
      WSDLDefinitions wsdl = jwsdl.generate(seiClass);

      Writer fw = IOUtils.getCharsetFileWriter(new File(wsdlPath), Constants.DEFAULT_XML_CHARSET);
      new WSDLWriter(wsdl).write(fw, Constants.DEFAULT_XML_CHARSET);
      fw.close();
View Full Code Here

      addPolicy(new File("resources/tools/jbws1645/PortPolicy.txt"), PolicyScopeLevel.WSDL_PORT, epMetaData);
      addPolicy(new File("resources/tools/jbws1645/PortTypePolicy.txt"), PolicyScopeLevel.WSDL_PORT_TYPE, epMetaData);
      addPolicy(new File("resources/tools/jbws1645/BindingPolicy.txt"), PolicyScopeLevel.WSDL_BINDING, epMetaData);
     
      //generate the wsdl definitions and write the wsdl file
      WSDLDefinitions wsdl = jwsdl.generate(seiClass);
     
      //performe some trivial checks on wsdl definitions
      assertEquals(1, wsdl.getServices()[0].getEndpoints()[0].getExtensibilityElements(
            Constants.WSDL_ELEMENT_POLICYREFERENCE).size());
      assertNotNull(wsdl.getInterfaces()[0].getProperty(Constants.WSDL_PROPERTY_POLICYURIS));
View Full Code Here

      addPolicy(new File("resources/tools/jbws1645/PortTypePolicy.txt"), PolicyScopeLevel.WSDL_PORT_TYPE, epMetaData);
      addPolicy(new File("resources/tools/jbws1645/BindingPolicy.txt"), PolicyScopeLevel.WSDL_BINDING, epMetaData);
      addPolicy(new File("resources/tools/jbws1645/BindingPolicy2.txt"), PolicyScopeLevel.WSDL_BINDING, epMetaData);
     
      //generate the wsdl definitions and write the wsdl file
      WSDLDefinitions wsdl = jwsdl.generate(seiClass);
     
      //performe some trivial checks on wsdl definitions
      assertEquals(2, wsdl.getServices()[0].getEndpoints()[0].getExtensibilityElements(
            Constants.WSDL_ELEMENT_POLICYREFERENCE).size());
      assertNotNull(wsdl.getInterfaces()[0].getProperty(Constants.WSDL_PROPERTY_POLICYURIS));
View Full Code Here

      jwsdl.setServiceName(sname);
      jwsdl.setTargetNamespace("http://org.jboss.ws/samples");
      jwsdl.setTypeNamespace("http://org.jboss.ws/samples/types");
      jwsdl.setStyle(Style.DOCUMENT);
      jwsdl.addFeature(WSToolsConstants.WSTOOLS_FEATURE_RESTRICT_TO_TARGET_NS, true);
      WSDLDefinitions wsdl = jwsdl.generate(seiClass);

      Writer fw = IOUtils.getCharsetFileWriter(new File(wsdlPath), Constants.DEFAULT_XML_CHARSET);
      new WSDLWriter(wsdl).write(fw, Constants.DEFAULT_XML_CHARSET);
      fw.close();
View Full Code Here

      JavaToWSDL jwsdl = new JavaToWSDL(Constants.NS_WSDL11);
      jwsdl.setServiceName("HolderService");
      jwsdl.setTargetNamespace("http://jboss.org/test");
      jwsdl.addFeature(WSToolsConstants.WSTOOLS_FEATURE_RESTRICT_TO_TARGET_NS, true);
      jwsdl.setStyle(Style.RPC);
      WSDLDefinitions wsdl = jwsdl.generate(HoldersServiceInterface.class);

      //Generate the wsdl
      String wsdlDir = "tools/";
      String wsdlPath = wsdlDir+ "/HolderService.wsdl";
      Writer fw = IOUtils.getCharsetFileWriter(new File(wsdlPath), Constants.DEFAULT_XML_CHARSET);
View Full Code Here

      JavaToWSDL jwsdl = new JavaToWSDL(Constants.NS_WSDL11);
      jwsdl.setTargetNamespace("http://org.jboss.ws/types");
      jwsdl.setServiceName(WSDLUtils.getInstance().getJustClassName(seiClass) + "Service");
      try
      {
         jwsdl.generate(loadClass(seiName));
         fail("Test should have failed");
      }
      catch (WSException is)
      {
         //pass
View Full Code Here

      JavaToWSDL jwsdl = new JavaToWSDL(Constants.NS_WSDL11);
      jwsdl.setTargetNamespace("http://org.jboss.ws/types");
      jwsdl.setServiceName(WSDLUtils.getInstance().getJustClassName(seiClass) + "Service");
      try
      {
         jwsdl.generate(loadClass(seiName));
         fail("Test should have failed");
      }
      catch (IllegalArgumentException iae)
      {
         //pass
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.