axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject cvs commit: xml-axis/java/test/wsdl Wsdl2javaTestSuite.xml
Date Thu, 06 Dec 2001 15:50:24 GMT
scheu       01/12/06 07:50:24

  Modified:    java/src/org/apache/axis/wsdlgen Emitter.java Java2Wsdl.java
               java/test/wsdl Wsdl2javaTestSuite.xml
  Log:
  Changes to more clearly define arguments and behavior
  Here is the new help message:
  
  Usage: java org.apache.axis.wsdlgen.Java2Wsdl [options] class-of-portType
  Options:
          -h, --help
                  print this message and exit
          -o, --output <argument>
                  output Wsdl filename
          -l, --location <argument>
                  service location url
          -s, --service <argument>
                  service name (obtained from --location if not specified)
          -n, --namespace <argument>
                  target namespace
          -p, --PkgtoNS <argument>=<value>
                  package=namespace, name value pairs
          -m, --methods <argument>
                  space separated list of methods to export
          -a, --methods
                  look for allowed methods in inherited class
          -w, --outputWsdlMode <argument>
                  output WSDL mode: All, Interface, Implementation
          -L, --locationImport <argument>
                  location of interface wsdl
          -N, --namespaceImpl <argument>
                  target namespace for implementation wsdl
          -O, --outputImpl <argument>
                  output Implementation Wsdl filename, setting this causes --o
                  utputWsdlMode to be ignored
  Details:
          portType    name= <class-of-portType name>
          binding     name= <--service value>SoapBinding
          service     name= <--service value>Service
          port        name= <--service value>
          address location= <--location value>
  
  Revision  Changes    Path
  1.15      +17 -4     xml-axis/java/src/org/apache/axis/wsdlgen/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdlgen/Emitter.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Emitter.java	2001/12/05 22:04:06	1.14
  +++ Emitter.java	2001/12/06 15:50:24	1.15
  @@ -276,9 +276,21 @@
               clsName = cls.getName();
               clsName = clsName.substring(clsName.lastIndexOf('.') + 1);
   
  +            // If service name is null, construct it from location or className
               if (getServiceName() == null) {
  -                String name = cls.getName();
  -                name = name.substring(name.lastIndexOf('.') + 1);
  +                String name = getLocationUrl();
  +                if (name != null) {
  +                    if (name.lastIndexOf('/') > 0) {
  +                        name = name.substring(name.lastIndexOf('/') + 1);
  +                    } else if (name.lastIndexOf('\\') > 0) {
  +                        name = name.substring(name.lastIndexOf('\\') + 1);
  +                    } else { 
  +                        name = null;
  +                    }
  +                }
  +                if (name == null) {
  +                    name = clsName;
  +                }
                   setServiceName(name);
               }
               
  @@ -377,7 +389,7 @@
   
           Service service = def.createService();
   
  -        service.setQName(new javax.wsdl.QName(implNS, getServiceName()));
  +        service.setQName(new javax.wsdl.QName(implNS, getServiceName()+"Service"));
           def.addService(service);
   
           Port port = def.createPort();
  @@ -406,7 +418,8 @@
           PortType portType = def.createPortType();
           portType.setUndefined(false);
   
  -        portType.setQName(new javax.wsdl.QName(intfNS, getServiceName() + "PortType"));
  +        // PortType name is the name of the class being processed
  +        portType.setQName(new javax.wsdl.QName(intfNS, clsName));
   
           /** @todo should introduce allowInterfaces, to publish all methods from a interface
*/
           /** @todo if allowedMethods is specified always look for inherited methods as well??
*/
  
  
  
  1.9       +27 -21    xml-axis/java/src/org/apache/axis/wsdlgen/Java2Wsdl.java
  
  Index: Java2Wsdl.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdlgen/Java2Wsdl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Java2Wsdl.java	2001/12/05 22:04:06	1.8
  +++ Java2Wsdl.java	2001/12/06 15:50:24	1.9
  @@ -98,34 +98,30 @@
                   CLOptionDescriptor.ARGUMENT_DISALLOWED,
                   HELP_OPT,
                   "print this message and exit"),
  -        new CLOptionDescriptor("namespace",
  -                CLOptionDescriptor.ARGUMENT_REQUIRED,
  -                NAMESPACE_OPT,
  -                "target namespace"),
  -        new CLOptionDescriptor("namespaceImpl",
  +        new CLOptionDescriptor("output",
                   CLOptionDescriptor.ARGUMENT_REQUIRED,
  -                NAMESPACE_IMPL_OPT,
  -                "target namespace for implementation wsdl"),
  -        new CLOptionDescriptor("PkgtoNS",
  -                CLOptionDescriptor.DUPLICATES_ALLOWED + CLOptionDescriptor.ARGUMENTS_REQUIRED_2,
  -                PACKAGE_OPT,
  -                "package=namespace, name value pairs"),
  +                OUTPUT_OPT,
  +                "output Wsdl filename"),
           new CLOptionDescriptor("location",
                   CLOptionDescriptor.ARGUMENT_REQUIRED,
                   LOCATION_OPT,
  -                "service location"),
  +                "service location url"),
           new CLOptionDescriptor("service",
                   CLOptionDescriptor.ARGUMENT_REQUIRED,
                   SERVICE_NAME_OPT,
  -                "service name"),
  -        new CLOptionDescriptor("locationImport",
  +                "service name (obtained from --location if not specified)"),
  +        new CLOptionDescriptor("namespace",
                   CLOptionDescriptor.ARGUMENT_REQUIRED,
  -                LOCATION_IMPORT_OPT,
  -                "location of interface wsdl"),
  +                NAMESPACE_OPT,
  +                "target namespace"),
  +        new CLOptionDescriptor("PkgtoNS",
  +                CLOptionDescriptor.DUPLICATES_ALLOWED + CLOptionDescriptor.ARGUMENTS_REQUIRED_2,
  +                PACKAGE_OPT,
  +                "package=namespace, name value pairs"),
           new CLOptionDescriptor("methods",
                   CLOptionDescriptor.ARGUMENT_REQUIRED,
                   METHODS_ALLOWED_OPT,
  -                "space seperated list of methods to export"),
  +                "space separated list of methods to export"),
           new CLOptionDescriptor("methods",
                   CLOptionDescriptor.ARGUMENT_DISALLOWED,
                   INHERITED_CLASS_OPT,
  @@ -140,10 +136,14 @@
                   CLOptionDescriptor.ARGUMENT_REQUIRED,
                   OUTPUT_WSDL_MODE_OPT,
                   "output WSDL mode: All, Interface, Implementation"),
  -        new CLOptionDescriptor("output",
  +        new CLOptionDescriptor("locationImport",
                   CLOptionDescriptor.ARGUMENT_REQUIRED,
  -                OUTPUT_OPT,
  -                "output Wsdl filename"),
  +                LOCATION_IMPORT_OPT,
  +                "location of interface wsdl"),
  +        new CLOptionDescriptor("namespaceImpl",
  +                CLOptionDescriptor.ARGUMENT_REQUIRED,
  +                NAMESPACE_IMPL_OPT,
  +                "target namespace for implementation wsdl"),
           new CLOptionDescriptor("outputImpl",
                   CLOptionDescriptor.ARGUMENT_REQUIRED,
                   OUTPUT_IMPL_OPT,
  @@ -293,9 +293,15 @@
           String lSep = System.getProperty("line.separator");
           StringBuffer msg = new StringBuffer();
           msg.append("Java2Wsdl generator").append(lSep);
  -        msg.append("Usage: java " + Java2Wsdl.class.getName() + " [options] ClassName").append(lSep);
  +        msg.append("Usage: java " + Java2Wsdl.class.getName() + " [options] class-of-portType").append(lSep);
           msg.append("Options: ").append(lSep);
           msg.append(CLUtil.describeOptions(Java2Wsdl.options).toString());
  +        msg.append("Details: ").append(lSep);
  +        msg.append("\tportType    name= <class-of-portType name>").append(lSep);
  +        msg.append("\tbinding     name= <--service value>SoapBinding").append(lSep);
  +        msg.append("\tservice     name= <--service value>Service").append(lSep);
  +        msg.append("\tport        name= <--service value>").append(lSep);
  +        msg.append("\taddress location= <--location value>").append(lSep);
           System.out.println(msg.toString());
           System.exit(0);
       }
  
  
  
  1.34      +0 -1      xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml
  
  Index: Wsdl2javaTestSuite.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Wsdl2javaTestSuite.xml	2001/12/06 13:11:53	1.33
  +++ Wsdl2javaTestSuite.xml	2001/12/06 15:50:24	1.34
  @@ -78,7 +78,6 @@
       <!-- Now create a WSDL file from the Java classes -->
       <java2wsdl output="build/work/test/sequence/SequenceTest.wsdl"
                  className= "test.sequence.SequenceTestPortType"
  -               service= "SequenceTest"
                  namespace="urn:SequenceTest2"
                  location="http://localhost:8080/axis/services/SequenceTest">
           <mapping namespace="urn:SequenceTest2" package="test.sequence"/>
  
  
  

Mime
View raw message