Author: mageshbk(a)jboss.com
Date: 2007-07-19 07:58:52 -0400 (Thu, 19 Jul 2007)
New Revision: 3947
Modified:
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java
Log:
[JBWS-1725]WSDL-JAVA Derivation of a complex type from a Simple type: bas64Binary is not
mapped to byte[]
Modified:
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java
===================================================================
---
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java 2007-07-19
09:48:40 UTC (rev 3946)
+++
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/XSDTypeToJava.java 2007-07-19
11:58:52 UTC (rev 3947)
@@ -56,6 +56,7 @@
/** Class that converts a XSD Type into Java class
* @author <mailto:Anil.Saldhana@jboss.org>Anil Saldhana
+ * @author mageshbk(a)jboss.com
* @since Apr 4, 2005
*/
public class XSDTypeToJava
@@ -202,7 +203,17 @@
XSSimpleTypeDefinition xssimple = type.getSimpleType();
QName q = new QName(xssimple.getNamespace(), xssimple.getName());
QName qn = schemautils.patchXSDQName(q);
- VAR v = new VAR("_value", typeMapping.getJavaType(qn).getName(),
false);
+ Class javaType = typeMapping.getJavaType(qn);
+ String jtype = null;
+ if (javaType.isArray())
+ {
+ jtype = JavaUtils.getSourceName(javaType);
+ }
+ else
+ {
+ jtype = javaType.getName();
+ }
+ VAR v = new VAR("_value", jtype, false);
vars.add(v);
}
}
Show replies by date