You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sc...@apache.org on 2002/05/24 20:11:12 UTC

cvs commit: xml-axis/java/test/wsdl/inheritance InheritanceTestCase.java

scheu       02/05/24 11:11:12

  Modified:    java/src/org/apache/axis/wsdl/fromJava Types.java
               java/test/wsdl/inheritance InheritanceTestCase.java
  Log:
  Changes to fix the following defect:
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9262
  
  The wsdl doc created by Java2WSDL now has a
  <wsdl:types>
  element instead of a
  <types>
  element.
  
  Revision  Changes    Path
  1.26      +10 -4     xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java
  
  Index: Types.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- Types.java	22 May 2002 18:59:15 -0000	1.25
  +++ Types.java	24 May 2002 18:11:12 -0000	1.26
  @@ -309,8 +309,10 @@
        */
       private void writeWsdlTypesElement() throws Exception {
           if (wsdlTypesElem == null) {
  +            // Create a <wsdl:types> element corresponding to the wsdl namespaces.
               wsdlTypesElem = 
  -                    docHolder.createElementNS(Constants.NSPREFIX_WSDL, "types");
  +                    docHolder.createElementNS(Constants.URI_CURRENT_WSDL, "types");
  +            wsdlTypesElem.setPrefix(Constants.NSPREFIX_WSDL);
           }
       }
   
  @@ -741,10 +743,14 @@
        * @param doc
        */
       public void insertTypesFragment(Document doc) {
  +
           if (wsdlTypesElem != null) {
  -            doc.getDocumentElement().insertBefore(
  -                          doc.importNode(wsdlTypesElem, true),
  -                          doc.getDocumentElement().getFirstChild());
  +            // Import the wsdlTypesElement into the doc.
  +            org.w3c.dom.Node node = doc.importNode(wsdlTypesElem, true);
  +            // Insert the imported element at the beginning of the document
  +            doc.getDocumentElement().
  +                insertBefore(node,
  +                             doc.getDocumentElement().getFirstChild());
           }
       }
   
  
  
  
  1.4       +1 -1      xml-axis/java/test/wsdl/inheritance/InheritanceTestCase.java
  
  Index: InheritanceTestCase.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/inheritance/InheritanceTestCase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InheritanceTestCase.java	5 Feb 2002 19:36:31 -0000	1.3
  +++ InheritanceTestCase.java	24 May 2002 18:11:12 -0000	1.4
  @@ -163,7 +163,7 @@
           // types
           // The complex types Baby_bean and Child_bean should exist
           // The type Parent_bean should NOT exist
  -        NodeList typeList = doc.getElementsByTagName("types");
  +        NodeList typeList = doc.getElementsByTagName("wsdl:types");
           Node typeNode = typeList.item(0);
           assertNotNull("types section of the WSDL document", typeNode);
           Element typeElem = (Element) typeNode;