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/parameterOrder parameterOrder.wsdl
Date Mon, 22 Jul 2002 19:16:00 GMT
scheu       2002/07/22 12:15:59

  Modified:    java/samples/echo TestClient.java
               java/src/org/apache/axis/wsdl/toJava
                        JavaServiceIfaceWriter.java
                        JavaServiceImplWriter.java JavaTestCaseWriter.java
               java/test/wsdl/omit OmitTestCase.java
               java/test/wsdl/opStyles opStyles.wsdl
               java/test/wsdl/parameterOrder parameterOrder.wsdl
  Log:
  JSR 101 4.3.11 says that the generated service interface interface
  must have methods named get<Name_of_wsdl:port>.
  
  The TCK tests this behavior.  So if the wsdl:port is named "foo",
  a "getfoo" method is expected.
  
  Problem:
  Axis always converts the <Name_of_wsdl:port> into a java class name.
  Thus Axis generates a "getFoo" method for example above.
  
  Axis also has some interop testcases that have wsdl:port names
  that are not valid java identifier names.  So simply
  change the code to do get<Name_of_wsdl:port> will not work.
  
  Solution:
  The Axis code now determines if the wsdl:port name is a valid
  java identifier.  If it is, the wsdl:port name is used (which satisfies the TCK).
  If the wsd:port name is not a valid java identifier, the xmlNameToJavaClass()
  code is used to create a proper name (which satisfies the interop tests).
  
  Revision  Changes    Path
  1.65      +1 -1      xml-axis/java/samples/echo/TestClient.java
  
  Index: TestClient.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/echo/TestClient.java,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- TestClient.java	9 Jul 2002 15:17:30 -0000	1.64
  +++ TestClient.java	22 Jul 2002 19:15:58 -0000	1.65
  @@ -181,7 +181,7 @@
       {
           try {
               binding = new InteropTestServiceLocator().
  -                getEcho(new java.net.URL(url));
  +                getecho(new java.net.URL(url));
   
               // safety first
               ((InteropTestSoapBindingStub)binding).setTimeout(60000);
  
  
  
  1.7       +11 -1     xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceIfaceWriter.java
  
  Index: JavaServiceIfaceWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceIfaceWriter.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- JavaServiceIfaceWriter.java	7 Jun 2002 12:45:08 -0000	1.6
  +++ JavaServiceIfaceWriter.java	22 Jul 2002 19:15:58 -0000	1.7
  @@ -146,7 +146,17 @@
                   continue;
               }
   
  -            String portName = Utils.xmlNameToJavaClass(p.getName());
  +            // JSR 101 indicates that the name of the port used
  +            // in the java code is the name of the wsdl:port.  It
  +            // does not indicate what should occur if the 
  +            // wsdl:port name is not a java identifier.  The
  +            // TCK depends on the case-sensitivity being preserved,
  +            // and the interop tests have port names that are not
  +            // valid java identifiers.  Thus the following code.
  +            String portName = p.getName();
  +            if (!JavaUtils.isJavaId(portName)) {
  +                portName = Utils.xmlNameToJavaClass(portName);
  +            }
   
               // If there is not literal use, the interface name is the portType name.
               // Otherwise it is the binding name.
  
  
  
  1.16      +11 -1     xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java
  
  Index: JavaServiceImplWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaServiceImplWriter.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- JavaServiceImplWriter.java	7 Jun 2002 12:45:08 -0000	1.15
  +++ JavaServiceImplWriter.java	22 Jul 2002 19:15:58 -0000	1.16
  @@ -157,7 +157,17 @@
                   continue;
               }
   
  -            String portName = Utils.xmlNameToJavaClass(p.getName());
  +            // JSR 101 indicates that the name of the port used
  +            // in the java code is the name of the wsdl:port.  It
  +            // does not indicate what should occur if the 
  +            // wsdl:port name is not a java identifier.  The
  +            // TCK depends on the case-sensitivity being preserved,
  +            // and the interop tests have port names that are not
  +            // valid java identifiers.  Thus the following code.
  +            String portName = p.getName();
  +            if (!JavaUtils.isJavaId(portName)) {
  +                portName = Utils.xmlNameToJavaClass(portName);
  +            }
               String stubClass = bEntry.getName() + "Stub";
   
               String bindingType = (String) bEntry.getDynamicVar(JavaBindingWriter.INTERFACE_NAME);
  
  
  
  1.31      +12 -1     xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java
  
  Index: JavaTestCaseWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaTestCaseWriter.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- JavaTestCaseWriter.java	14 Jun 2002 16:11:12 -0000	1.30
  +++ JavaTestCaseWriter.java	22 Jul 2002 19:15:58 -0000	1.31
  @@ -131,7 +131,18 @@
                   continue;
               }
   
  -            String portName = Utils.xmlNameToJavaClass(p.getName());
  +            // JSR 101 indicates that the name of the port used
  +            // in the java code is the name of the wsdl:port.  It
  +            // does not indicate what should occur if the 
  +            // wsdl:port name is not a java identifier.  The
  +            // TCK depends on the case-sensitivity being preserved,
  +            // and the interop tests have port names that are not
  +            // valid java identifiers.  Thus the following code.
  +            String portName = p.getName();
  +            if (!JavaUtils.isJavaId(portName)) {
  +                portName = Utils.xmlNameToJavaClass(portName);
  +            }
  +
               PortType portType = binding.getPortType();
               PortTypeEntry ptEntry =
                       symbolTable.getPortTypeEntry(portType.getQName());
  
  
  
  1.2       +1 -1      xml-axis/java/test/wsdl/omit/OmitTestCase.java
  
  Index: OmitTestCase.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/omit/OmitTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OmitTestCase.java	30 May 2002 18:55:21 -0000	1.1
  +++ OmitTestCase.java	22 Jul 2002 19:15:59 -0000	1.2
  @@ -79,7 +79,7 @@
       public void test1OmitEchoPhone() {
           test.wsdl.omit.Omit binding;
           try {
  -            binding = new test.wsdl.omit.OmitTestLocator().getOmit();
  +            binding = new test.wsdl.omit.OmitTestLocator().getomit();
           }
           catch (javax.xml.rpc.ServiceException jre) {
               throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught:
" + jre);
  
  
  
  1.3       +2 -2      xml-axis/java/test/wsdl/opStyles/opStyles.wsdl
  
  Index: opStyles.wsdl
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/opStyles/opStyles.wsdl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- opStyles.wsdl	13 Feb 2002 15:27:47 -0000	1.2
  +++ opStyles.wsdl	22 Jul 2002 19:15:59 -0000	1.3
  @@ -88,8 +88,8 @@
   
     <!-- service decln -->
     <service name="opStyleService">
  -    <port name="opStyles" binding="tns:opStyleBinding">
  -      <soap:address location="http://localhost:8080/axis/services/opStyles"/>
  +    <port name="OpStyles" binding="tns:opStyleBinding">
  +      <soap:address location="http://localhost:8080/axis/services/OpStyles"/>
       </port>
     </service>
   
  
  
  
  1.3       +2 -2      xml-axis/java/test/wsdl/parameterOrder/parameterOrder.wsdl
  
  Index: parameterOrder.wsdl
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/parameterOrder/parameterOrder.wsdl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- parameterOrder.wsdl	13 Feb 2002 15:27:47 -0000	1.2
  +++ parameterOrder.wsdl	22 Jul 2002 19:15:59 -0000	1.3
  @@ -303,8 +303,8 @@
   
     <!-- service decln -->
     <service name="parameterOrderService">
  -    <port name="parameterOrder" binding="tns:parameterOrderBinding">
  -      <soap:address location="http://localhost:8080/axis/services/parameterOrder"/>
  +    <port name="ParameterOrder" binding="tns:parameterOrderBinding">
  +      <soap:address location="http://localhost:8080/axis/services/ParameterOrder"/>
       </port>
     </service>
   
  
  
  

Mime
View raw message