dims 2003/03/17 07:10:19
Modified: java/src/org/apache/axis/wsdl/toJava JavaBeanWriter.java
Added: java/test/wsdl/adaptive adaptive.wsdl
AdaptiveInterfaceBindingImpl.java
AdaptiveServiceTestCase.java build.xml
Log:
1. Fix for Bug 18056 - wsdl2java generates Java code that does not compile
2. Added test case - test/wsdl/adaptive
Notes: WSDL2Java was not handling the following schema (collection extends an array)
<complexType name="list">
<sequence>
<element name="collection" nillable="true" type="tns1:collection"/>
</sequence>
</complexType>
<complexType name="collection">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:anyType[]"/>
</restriction>
</complexContent>
</complexType>
Revision Changes Path
1.1 xml-axis/java/test/wsdl/adaptive/adaptive.wsdl
Index: adaptive.wsdl
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="Adaptive" targetNamespace="http://com.test/wsdl/Adaptive"
xmlns:tns="http://com.test/wsdl/Adaptive" xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns2="http://com.test/types/Adaptive"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<schema targetNamespace="http://com.test/types/Adaptive"
xmlns:tns="http://com.test/types/Adaptive"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns2="http://java.sun.com/jax-rpc-ri/internal"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<import namespace="http://java.sun.com/jax-rpc-ri/internal"/>
<complexType name="ArrayOfResourceInfo">
<complexContent>
<restriction base="soap-enc:Array">
<attribute ref="soap-enc:arrayType"
wsdl:arrayType="tns:ResourceInfo[]"/></restriction></complexContent></complexType>
<complexType name="ResourceInfo">
<sequence>
<element name="properties" type="ns2:vector"/>
<element name="id" type="string"/></sequence></complexType>
<complexType name="ApplicationInfo">
<sequence>
<element name="dummy" type="tns:KeyValue"/>
<element name="properties" type="ns2:vector"/>
<element name="id" type="string"/></sequence></complexType>
<complexType name="KeyValue">
<sequence>
<element name="key" type="string"/>
<element name="value" type="string"/></sequence></complexType>
<complexType name="ArrayOfint">
<complexContent>
<restriction base="soap-enc:Array">
<attribute ref="soap-enc:arrayType"
wsdl:arrayType="int[]"/></restriction></complexContent></complexType>
<complexType name="ArrayOfstring">
<complexContent>
<restriction base="soap-enc:Array">
<attribute ref="soap-enc:arrayType"
wsdl:arrayType="string[]"/></restriction></complexContent></complexType>
<complexType name="ArrayOfArrayOfstring">
<complexContent>
<restriction base="soap-enc:Array">
<attribute ref="soap-enc:arrayType"
wsdl:arrayType="tns:ArrayOfstring[]"/></restriction></complexContent></complexType></schema>
<schema targetNamespace="http://java.sun.com/jax-rpc-ri/internal"
xmlns:tns="http://java.sun.com/jax-rpc-ri/internal"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<import namespace="http://com.test/types/Adaptive"/>
<complexType name="vector">
<complexContent>
<extension base="tns:list">
<sequence/></extension></complexContent></complexType>
<complexType name="list">
<complexContent>
<extension base="tns:collection">
<sequence/></extension></complexContent></complexType>
<complexType name="collection">
<complexContent>
<restriction base="soap-enc:Array">
<attribute ref="soap-enc:arrayType"
wsdl:arrayType="anyType[]"/></restriction></complexContent></complexType></schema></types>
<message name="AdaptiveInterface_getServiceDescription"/>
<message name="AdaptiveInterface_getServiceDescriptionResponse">
<part name="result" type="xsd:string"/></message>
<message name="AdaptiveInterface_rankResources">
<part name="arrayOfResourceInfo_1" type="ns2:ArrayOfResourceInfo"/>
<part name="ApplicationInfo_2" type="ns2:ApplicationInfo"/></message>
<message name="AdaptiveInterface_rankResourcesResponse">
<part name="result" type="ns2:ArrayOfResourceInfo"/></message>
<message name="AdaptiveInterface_estimateTransferTime">
<part name="boolean_1" type="xsd:boolean"/>
<part name="ResourceInfo_2" type="ns2:ResourceInfo"/>
<part name="arrayOfResourceInfo_3" type="ns2:ArrayOfResourceInfo"/>
<part name="long_4" type="xsd:long"/>
<part name="Calendar_5" type="xsd:dateTime"/></message>
<message name="AdaptiveInterface_estimateTransferTimeResponse">
<part name="result" type="ns2:ArrayOfint"/></message>
<message name="AdaptiveInterface_logDataTransfer">
<part name="ResourceInfo_1" type="ns2:ResourceInfo"/>
<part name="ResourceInfo_2" type="ns2:ResourceInfo"/>
<part name="long_3" type="xsd:long"/>
<part name="Calendar_4" type="xsd:dateTime"/>
<part name="Calendar_5" type="xsd:dateTime"/></message>
<message name="AdaptiveInterface_logDataTransferResponse"/>
<message name="AdaptiveInterface_estimateUsage">
<part name="boolean_1" type="xsd:boolean"/>
<part name="ResourceInfo_2" type="ns2:ResourceInfo"/>
<part name="String_3" type="xsd:string"/>
<part name="int_4" type="xsd:int"/>
<part name="Calendar_5" type="xsd:dateTime"/>
<part name="Calendar_6" type="xsd:dateTime"/></message>
<message name="AdaptiveInterface_estimateUsageResponse">
<part name="result" type="xsd:string"/></message>
<message name="AdaptiveInterface_estimateMultipleUsage">
<part name="boolean_1" type="xsd:boolean"/>
<part name="arrayOfResourceInfo_2" type="ns2:ArrayOfResourceInfo"/>
<part name="arrayOfString_3" type="ns2:ArrayOfstring"/>
<part name="int_4" type="xsd:int"/>
<part name="Calendar_5" type="xsd:dateTime"/>
<part name="Calendar_6" type="xsd:dateTime"/></message>
<message name="AdaptiveInterface_estimateMultipleUsageResponse">
<part name="result" type="ns2:ArrayOfArrayOfstring"/></message>
<message name="AdaptiveInterface_estimateNetworkGraph">
<part name="boolean_1" type="xsd:boolean"/>
<part name="arrayOfResourceInfo_2" type="ns2:ArrayOfResourceInfo"/>
<part name="int_3" type="xsd:int"/>
<part name="Calendar_4" type="xsd:dateTime"/>
<part name="Calendar_5" type="xsd:dateTime"/></message>
<message name="AdaptiveInterface_estimateNetworkGraphResponse">
<part name="result" type="ns2:ArrayOfArrayOfstring"/></message>
<portType name="AdaptiveInterface">
<operation name="getServiceDescription" parameterOrder="">
<input message="tns:AdaptiveInterface_getServiceDescription"/>
<output
message="tns:AdaptiveInterface_getServiceDescriptionResponse"/></operation>
<operation name="rankResources" parameterOrder="arrayOfResourceInfo_1
ApplicationInfo_2">
<input message="tns:AdaptiveInterface_rankResources"/>
<output message="tns:AdaptiveInterface_rankResourcesResponse"/></operation>
<operation name="estimateTransferTime" parameterOrder="boolean_1 ResourceInfo_2
arrayOfResourceInfo_3 long_4 Calendar_5">
<input message="tns:AdaptiveInterface_estimateTransferTime"/>
<output
message="tns:AdaptiveInterface_estimateTransferTimeResponse"/></operation>
<operation name="logDataTransfer" parameterOrder="ResourceInfo_1 ResourceInfo_2
long_3 Calendar_4 Calendar_5">
<input message="tns:AdaptiveInterface_logDataTransfer"/>
<output message="tns:AdaptiveInterface_logDataTransferResponse"/></operation>
<operation name="estimateUsage" parameterOrder="boolean_1 ResourceInfo_2
String_3 int_4 Calendar_5 Calendar_6">
<input message="tns:AdaptiveInterface_estimateUsage"/>
<output message="tns:AdaptiveInterface_estimateUsageResponse"/></operation>
<operation name="estimateMultipleUsage" parameterOrder="boolean_1
arrayOfResourceInfo_2 arrayOfString_3 int_4 Calendar_5 Calendar_6">
<input message="tns:AdaptiveInterface_estimateMultipleUsage"/>
<output
message="tns:AdaptiveInterface_estimateMultipleUsageResponse"/></operation>
<operation name="estimateNetworkGraph" parameterOrder="boolean_1
arrayOfResourceInfo_2 int_3 Calendar_4 Calendar_5">
<input message="tns:AdaptiveInterface_estimateNetworkGraph"/>
<output
message="tns:AdaptiveInterface_estimateNetworkGraphResponse"/></operation></portType>
<binding name="AdaptiveInterfaceBinding" type="tns:AdaptiveInterface">
<operation name="getServiceDescription">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></output>
<soap:operation soapAction=""/></operation>
<operation name="rankResources">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></output>
<soap:operation soapAction=""/></operation>
<operation name="estimateTransferTime">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></output>
<soap:operation soapAction=""/></operation>
<operation name="logDataTransfer">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></output>
<soap:operation soapAction=""/></operation>
<operation name="estimateUsage">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></output>
<soap:operation soapAction=""/></operation>
<operation name="estimateMultipleUsage">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></output>
<soap:operation soapAction=""/></operation>
<operation name="estimateNetworkGraph">
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></input>
<output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="http://com.test/wsdl/Adaptive"/></output>
<soap:operation soapAction=""/></operation>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="rpc"/></binding>
<service name="AdaptiveService">
<port name="Adaptive" binding="tns:AdaptiveInterfaceBinding">
<soap:address
location="http://localhost:8080/axis/services/Adaptive"/></port></service></definitions>
1.1
xml-axis/java/test/wsdl/adaptive/AdaptiveInterfaceBindingImpl.java
Index: AdaptiveInterfaceBindingImpl.java
===================================================================
/**
* AdaptiveInterfaceBindingImpl.java
*
* This file was auto-generated from WSDL
* by the Apache Axis WSDL2Java emitter.
*/
package test.wsdl.adaptive;
import test.wsdl.adaptive.types.internal.Vector;
public class AdaptiveInterfaceBindingImpl implements
test.wsdl.adaptive.AdaptiveInterface{
public java.lang.String getServiceDescription() throws java.rmi.RemoteException {
return null;
}
public test.wsdl.adaptive.types.ResourceInfo[]
rankResources(test.wsdl.adaptive.types.ResourceInfo[] arrayOfResourceInfo_1,
test.wsdl.adaptive.types.ApplicationInfo applicationInfo_2) throws
java.rmi.RemoteException {
test.wsdl.adaptive.types.ResourceInfo[] resources = new
test.wsdl.adaptive.types.ResourceInfo[1];
resources[0] = new test.wsdl.adaptive.types.ResourceInfo();
resources[0].setId("Adaptive #1");
test.wsdl.adaptive.types.internal.Vector v = new
test.wsdl.adaptive.types.internal.Vector();
v.setCollection(new String[]{"A","B","C"});
resources[0].setProperties(v);
return resources;
}
public int[] estimateTransferTime(boolean boolean_1,
test.wsdl.adaptive.types.ResourceInfo resourceInfo_2,
test.wsdl.adaptive.types.ResourceInfo[] arrayOfResourceInfo_3, long long_4,
java.util.Calendar calendar_5) throws java.rmi.RemoteException {
return null;
}
public void logDataTransfer(test.wsdl.adaptive.types.ResourceInfo
resourceInfo_1, test.wsdl.adaptive.types.ResourceInfo resourceInfo_2, long long_3,
java.util.Calendar calendar_4, java.util.Calendar calendar_5) throws
java.rmi.RemoteException {
}
public java.lang.String estimateUsage(boolean boolean_1,
test.wsdl.adaptive.types.ResourceInfo resourceInfo_2, java.lang.String string_3, int
int_4, java.util.Calendar calendar_5, java.util.Calendar calendar_6) throws
java.rmi.RemoteException {
return null;
}
public java.lang.String[][] estimateMultipleUsage(boolean boolean_1,
test.wsdl.adaptive.types.ResourceInfo[] arrayOfResourceInfo_2, java.lang.String[]
arrayOfString_3, int int_4, java.util.Calendar calendar_5, java.util.Calendar
calendar_6) throws java.rmi.RemoteException {
return null;
}
public java.lang.String[][] estimateNetworkGraph(boolean boolean_1,
test.wsdl.adaptive.types.ResourceInfo[] arrayOfResourceInfo_2, int int_3,
java.util.Calendar calendar_4, java.util.Calendar calendar_5) throws
java.rmi.RemoteException {
return null;
}
}
1.1 xml-axis/java/test/wsdl/adaptive/AdaptiveServiceTestCase.java
Index: AdaptiveServiceTestCase.java
===================================================================
/**
* AdaptiveServiceTestCase.java
*
* This file was auto-generated from WSDL
* by the Apache Axis WSDL2Java emitter.
*/
package test.wsdl.adaptive;
import java.util.Arrays;
public class AdaptiveServiceTestCase extends junit.framework.TestCase {
public AdaptiveServiceTestCase(java.lang.String name) {
super(name);
}
public void test1AdaptiveGetServiceDescription() throws Exception {
test.wsdl.adaptive.AdaptiveInterfaceBindingStub binding;
try {
binding = (test.wsdl.adaptive.AdaptiveInterfaceBindingStub)
new
test.wsdl.adaptive.AdaptiveServiceLocator().getAdaptive();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException
caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
java.lang.String value = null;
value = binding.getServiceDescription();
// TBD - validate results
}
public void test2AdaptiveRankResources() throws Exception {
test.wsdl.adaptive.AdaptiveInterfaceBindingStub binding;
try {
binding = (test.wsdl.adaptive.AdaptiveInterfaceBindingStub)
new
test.wsdl.adaptive.AdaptiveServiceLocator().getAdaptive();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException
caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
test.wsdl.adaptive.types.ResourceInfo[] value = null;
value = binding.rankResources(new test.wsdl.adaptive.types.ResourceInfo[0],
new test.wsdl.adaptive.types.ApplicationInfo());
// TBD - validate results
assertTrue(value.length > 0);
assertEquals(value[0].getId(), "Adaptive #1");
java.lang.Object[] collection = value[0].getProperties().getCollection();
assertTrue(collection.length > 0);
assertTrue(Arrays.equals(collection, new String[]{"A","B","C"}));
}
public void test3AdaptiveEstimateTransferTime() throws Exception {
test.wsdl.adaptive.AdaptiveInterfaceBindingStub binding;
try {
binding = (test.wsdl.adaptive.AdaptiveInterfaceBindingStub)
new
test.wsdl.adaptive.AdaptiveServiceLocator().getAdaptive();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException
caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
int[] value = null;
value = binding.estimateTransferTime(true, new
test.wsdl.adaptive.types.ResourceInfo(), new test.wsdl.adaptive.types.ResourceInfo[0],
0, java.util.Calendar.getInstance());
// TBD - validate results
}
public void test4AdaptiveLogDataTransfer() throws Exception {
test.wsdl.adaptive.AdaptiveInterfaceBindingStub binding;
try {
binding = (test.wsdl.adaptive.AdaptiveInterfaceBindingStub)
new
test.wsdl.adaptive.AdaptiveServiceLocator().getAdaptive();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException
caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
binding.logDataTransfer(new test.wsdl.adaptive.types.ResourceInfo(), new
test.wsdl.adaptive.types.ResourceInfo(), 0, java.util.Calendar.getInstance(),
java.util.Calendar.getInstance());
// TBD - validate results
}
public void test5AdaptiveEstimateUsage() throws Exception {
test.wsdl.adaptive.AdaptiveInterfaceBindingStub binding;
try {
binding = (test.wsdl.adaptive.AdaptiveInterfaceBindingStub)
new
test.wsdl.adaptive.AdaptiveServiceLocator().getAdaptive();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException
caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
java.lang.String value = null;
value = binding.estimateUsage(true, new
test.wsdl.adaptive.types.ResourceInfo(), new java.lang.String(), 0,
java.util.Calendar.getInstance(), java.util.Calendar.getInstance());
// TBD - validate results
}
public void test6AdaptiveEstimateMultipleUsage() throws Exception {
test.wsdl.adaptive.AdaptiveInterfaceBindingStub binding;
try {
binding = (test.wsdl.adaptive.AdaptiveInterfaceBindingStub)
new
test.wsdl.adaptive.AdaptiveServiceLocator().getAdaptive();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException
caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
java.lang.String[][] value = null;
value = binding.estimateMultipleUsage(true, new
test.wsdl.adaptive.types.ResourceInfo[0], new java.lang.String[0], 0,
java.util.Calendar.getInstance(), java.util.Calendar.getInstance());
// TBD - validate results
}
public void test7AdaptiveEstimateNetworkGraph() throws Exception {
test.wsdl.adaptive.AdaptiveInterfaceBindingStub binding;
try {
binding = (test.wsdl.adaptive.AdaptiveInterfaceBindingStub)
new
test.wsdl.adaptive.AdaptiveServiceLocator().getAdaptive();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException
caught: " + jre);
}
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
// Test operation
java.lang.String[][] value = null;
value = binding.estimateNetworkGraph(true, new
test.wsdl.adaptive.types.ResourceInfo[0], 0, java.util.Calendar.getInstance(),
java.util.Calendar.getInstance());
// TBD - validate results
}
}
1.1 xml-axis/java/test/wsdl/adaptive/build.xml
Index: build.xml
===================================================================
<?xml version="1.0" ?>
<!DOCTYPE project [
<!ENTITY properties SYSTEM "file:../../../xmls/properties.xml">
<!ENTITY paths SYSTEM "file:../../../xmls/path_refs.xml">
<!ENTITY taskdefs SYSTEM "file:../../../xmls/taskdefs.xml">
<!ENTITY taskdefs_post_compile SYSTEM
"file:../../../xmls/taskdefs_post_compile.xml">
<!ENTITY targets SYSTEM "file:../../../xmls/targets.xml">
]>
<!-- ===================================================================
<description>
Test/Sample Component file for Axis
Notes:
This is a build file for use with the Jakarta Ant build tool.
Prerequisites:
jakarta-ant from http://jakarta.apache.org
Build Instructions:
To compile
ant compile
To execute
ant run
Author:
Matt Seibert [EMAIL PROTECTED]
Copyright:
Copyright (c) 2002-2003 Apache Software Foundation.
</description>
==================================================================== -->
<project default="compile">
<property name="axis.home" location="../../.." />
<property name="componentName" value="test/wsdl/adaptive" />
&properties;
&paths;
&taskdefs;
&taskdefs_post_compile;
&targets;
<target name="clean">
<echo message="Removing ${build.dir}/classes/${componentName} and
${build.dir}/work/${componentName}" />
<delete dir="${build.dir}/classes/${componentName}"/>
<delete dir="${build.dir}/work/${componentName}"/>
</target>
<target name="copy" depends="setenv"/>
<target name="compile" depends="copy">
<echo message="Compiling test.wsdl.adaptive"/>
<!-- This tests Bug 9642 - Java Date not deserialize properly. -->
<wsdl2java url="${axis.home}/test/wsdl/adaptive/adaptive.wsdl"
output="${axis.home}/build/work"
serverSide="yes"
testcase="yes">
<mapping namespace="http://com.test/wsdl/Adaptive"
package="test.wsdl.adaptive"/>
<mapping namespace="http://com.test/types/Adaptive"
package="test.wsdl.adaptive.types"/>
<mapping namespace="http://java.sun.com/jax-rpc-ri/internal"
package="test.wsdl.adaptive.types.internal"/>
</wsdl2java>
<copy todir="${build.dir}/work/test/wsdl/adaptive" overwrite="yes">
<fileset dir="${axis.home}/test/wsdl/adaptive">
<include name="*TestCase.java"/>
<include name="*Impl.java"/>
</fileset>
</copy>
<javac srcdir="${build.dir}/work" destdir="${build.dest}" debug="${debug}"
fork="${javac.fork}">
<classpath refid="classpath" />
<include name="test/wsdl/adaptive/*.java" />
</javac>
</target>
<target name="run" >
<antcall target="execute-Component" />
</target>
</project>
1.38 +9 -1
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.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- JavaBeanWriter.java 3 Mar 2003 15:43:05 -0000 1.37
+++ JavaBeanWriter.java 17 Mar 2003 15:10:18 -0000 1.38
@@ -220,6 +220,14 @@
}
}
}
+
+ if(extendType != null && extendType.getDimensions().equals("[]")) {
+ String typeName = extendType.getName();
+ String elemName = extendType.getQName().getLocalPart();
+ String variableName = Utils.xmlNameToJava(elemName);
+ names.add(typeName);
+ names.add(variableName);
+ }
}
/**
@@ -243,7 +251,7 @@
protected String getExtendsText() {
// See if this class extends another class
String extendsText = "";
- if (extendType != null && !type.isSimpleType()) {
+ if (extendType != null && !type.isSimpleType() &&
extendType.getDimensions().length()==0) {
extendsText = " extends " + extendType.getName() + " ";
}
return extendsText;