axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava SchemaUtils.java JavaDeployWriter.java
Date Thu, 04 Apr 2002 19:17:12 GMT
tomj        02/04/04 11:17:12

  Modified:    java/src/org/apache/axis/wsdl/toJava SchemaUtils.java
                        JavaDeployWriter.java
  Log:
  Check the 'elementFormDefault' and 'form' attributes in schema types to determine whether
or not to
  namespace qualify element QNames.
  
  Fix a problem in JavaDeployWriter to generate the correct returnQName attribute in the wsdd
  for operaitons where we know the QName from the schema.
  
  Revision  Changes    Path
  1.20      +15 -2     xml-axis/java/src/org/apache/axis/wsdl/toJava/SchemaUtils.java
  
  Index: SchemaUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/SchemaUtils.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- SchemaUtils.java	2 Apr 2002 23:09:46 -0000	1.19
  +++ SchemaUtils.java	4 Apr 2002 19:17:12 -0000	1.20
  @@ -349,8 +349,21 @@
           // used, the name of the element is unqualified.
   
           if (!forElement.value) {
  -            // Unqualified nodeName
  -            nodeName = new QName("", nodeName.getLocalPart());            
  +            // check the Form (or elementFormDefault) attribute of this node to
  +            // determine if it should be namespace quailfied or not.
  +            String form = Utils.getAttribute(elementNode, "form");
  +            if (form != null && form.equals("unqualified")) {
  +                // Unqualified nodeName
  +                nodeName = new QName("", nodeName.getLocalPart());            
  +            } else if (form == null) {
  +                // check elementForDefault on schema element
  +                String def = Utils.getScopedAttribute(elementNode, 
  +                                                      "elementFormDefault");
  +                if (def == null || def.equals("unqualified")) {
  +                    // Unqualified nodeName
  +                    nodeName = new QName("", nodeName.getLocalPart());            
  +                }
  +            }
           } else {
               nodeName = nodeType;
           }
  
  
  
  1.31      +10 -2     xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java
  
  Index: JavaDeployWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaDeployWriter.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- JavaDeployWriter.java	2 Apr 2002 18:46:24 -0000	1.30
  +++ JavaDeployWriter.java	4 Apr 2002 19:17:12 -0000	1.31
  @@ -306,8 +306,16 @@
                                      elementQName.getLocalPart() + "\"/>");
                       }
                   } else {
  -                    pw.println("      <operation name=\"" + 
  -                               operName + "\">");
  +                    pw.print("      <operation name=\"" + 
  +                               operName + "\"");
  +                    if (params.returnName != null) {
  +                        QName returnQName = Utils.getWSDLQName(params.returnName);
  +                        pw.print(" returnQName=\"retNS:" +
  +                             returnQName.getLocalPart() +
  +                             "\" xmlns:retNS=\"" +
  +                             returnQName.getNamespaceURI() + "\"");
  +                    }
  +                    pw.println(">");
                   }
                   
                   Vector paramList = params.list;
  
  
  

Mime
View raw message