axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl Emitter.java
Date Fri, 31 Aug 2001 03:30:08 GMT
gdaniels    01/08/30 20:30:08

  Modified:    java/src/org/apache/axis/wsdl Emitter.java
  Log:
  Fix namespace for complexType mapping generation.  Now gets it
  from the targetNamespace attribute of the parent element of the
  <complexType> element.
  
  Revision  Changes    Path
  1.2       +4 -5      xml-axis/java/src/org/apache/axis/wsdl/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/Emitter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Emitter.java	2001/08/30 20:59:01	1.1
  +++ Emitter.java	2001/08/31 03:30:08	1.2
  @@ -81,10 +81,7 @@
   import javax.wsdl.Service;
   import javax.wsdl.WSDLException;
   
  -import org.w3c.dom.Document;
  -import org.w3c.dom.NamedNodeMap;
  -import org.w3c.dom.Node;
  -import org.w3c.dom.NodeList;
  +import org.w3c.dom.*;
   
   import org.apache.xerces.parsers.DOMParser;
   
  @@ -778,9 +775,11 @@
        * In the stub constructor, write the serializer code for the complex types.
        */
       private void writeSerializationInit(PrintWriter pw, String type) throws IOException
{
  +        Element e = (Element)complexType(type).getParentNode();
  +        String namespace = e.getAttribute("targetNamespace");
           pw.println ("        try");
           pw.println ("        {");
  -        pw.println ("            org.apache.axis.utils.QName qn1 = new org.apache.axis.utils.QName
(\"bogusNS\", \"" + type + "\");");
  +        pw.println ("            org.apache.axis.utils.QName qn1 = new org.apache.axis.utils.QName
(\"" + namespace + "\", \"" + type + "\");");
           pw.println ("            Class cls = " + type + ".class;");
           pw.println ("            call.addSerializer (cls, qn1, new org.apache.axis.encoding.BeanSerializer
(cls));");
           pw.println ("            call.addDeserializerFactory (qn1, cls, org.apache.axis.encoding.BeanSerializer.getFactory
());");
  
  
  

Mime
View raw message