axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava JavaBeanWriter.java
Date Sun, 15 Sep 2002 02:41:00 GMT
dims        2002/09/14 19:41:00

  Modified:    java/src/org/apache/axis/wsdl/toJava JavaBeanWriter.java
  Log:
  Patch from jesper.soderlund@smarttrust.com (Jesper Söderlund)
  for Bug 12538 - hexBinary type generates java-code with wrong ser-/deserializer..
  
  Revision  Changes    Path
  1.28      +6 -2      xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaBeanWriter.java
  
  Index: JavaBeanWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaBeanWriter.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- JavaBeanWriter.java	9 Sep 2002 17:03:24 -0000	1.27
  +++ JavaBeanWriter.java	15 Sep 2002 02:41:00 -0000	1.28
  @@ -420,7 +420,7 @@
                              "(value)." + simpleValueType + "Value();");
               } else {
                   if (simpleValueType.equals("byte[]")) {
  -                    pw.println("        this.value = value.getBytes();");
  +                    pw.println("        this.value = org.apache.axis.types.HexBinary.decode(value);");
                   }
                   else if (simpleValueType.equals("org.apache.axis.types.URI")) {
                       pw.println("        try {");
  @@ -454,7 +454,11 @@
               if (wrapper != null) {
                   pw.println("        return new " + wrapper + "(value).toString();");
               } else {
  -                pw.println("        return value == null ? null : value.toString();");
  +                if(simpleValueType.equals("byte[]")) {
  +                    pw.println("        return value == null ? null : org.apache.axis.types.HexBinary.encode(value);"
);
  +                } else {              
  +                    pw.println("        return value == null ? null : value.toString();");
  +                }
               }
               pw.println("    }");
               pw.println();
  
  
  

Mime
View raw message