Hi everyone,

I am trying out the xmlbeans databinding with axis2 and ran into an
issue even with the distributed sample-wsdl-file 'perf.wsdl'.

ADB is working fine, but when switching ot xmlbeans-databinding, there
is the following exception thrown:

========================
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
        at
org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:416)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
        at
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:126)
        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
        ... 13 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:115)
        ... 14 more
Caused by: java.lang.RuntimeException: java.lang.ArrayStoreException
        at
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:325)
        ... 19 more
Caused by: java.lang.ArrayStoreException
        at java.lang.System.arraycopy(Native Method)
        at java.util.ArrayList.toArray(ArrayList.java:304)
        at
org.apache.axis2.xmlbeans.CodeGenerationUtility.convertToSchemaArray(CodeGenerationUtility.java:562)
        at
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:189)
        ... 19 more
========================

Find attached my build-file and the verbose ant-output plus the
perf.wsdl coming with the axis2-1.4.1 distribution, just in case. I also
tried previous axis2-releases with the same result.

Any ideas why the sample wsdl cannot be used with xmlbeans-databinding?

Thanks
Christian

Apache Ant version 1.6.5 compiled on November 9 2005
Buildfile: build.xml
Detected Java version: 1.5 in: /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre
Detected OS: Linux
parsing buildfile /home/cv/temp/axis2xmlbeans/build.xml with URI = 
file:///home/cv/temp/axis2xmlbeans/build.xml
Project base dir set to: /home/cv/temp/axis2xmlbeans
Build sequence for target(s) `main' is [main]
Complete build sequence is [main, ]

main:
   [delete] Deleting directory /home/cv/temp/axis2xmlbeans/~/temp/axis2xmlbeans
   [delete] Deleting directory /home/cv/temp/axis2xmlbeans/~/temp/axis2xmlbeans
    [mkdir] Created dir: /home/cv/temp/axis2xmlbeans/~/temp/axis2xmlbeans
  [codegen] Retrieving document at '/opt/java/axis2/samples/wsdl/perf.wsdl'.

BUILD FAILED
/home/cv/temp/axis2xmlbeans/build.xml:29: 
org.apache.axis2.wsdl.codegen.CodeGenerationException: 
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at 
org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:418)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: 
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
        at 
org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:416)
        ... 12 more
Caused by: java.lang.RuntimeException: 
java.lang.reflect.InvocationTargetException
        at 
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:126)
        at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
        ... 13 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:115)
        ... 14 more
Caused by: java.lang.RuntimeException: java.lang.ArrayStoreException
        at 
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:325)
        ... 19 more
Caused by: java.lang.ArrayStoreException
        at java.lang.System.arraycopy(Native Method)
        at java.util.ArrayList.toArray(ArrayList.java:304)
        at 
org.apache.axis2.xmlbeans.CodeGenerationUtility.convertToSchemaArray(CodeGenerationUtility.java:562)
        at 
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:189)
        ... 19 more
--- Nested Exception ---
org.apache.axis2.wsdl.codegen.CodeGenerationException: 
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
        at 
org.apache.axis2.tool.ant.AntCodegenTask.execute(AntCodegenTask.java:416)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
        at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
        at org.apache.tools.ant.Main.runBuild(Main.java:668)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: java.lang.RuntimeException: 
java.lang.reflect.InvocationTargetException
        at 
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:126)
        at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
        ... 13 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at 
org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:115)
        ... 14 more
Caused by: java.lang.RuntimeException: java.lang.ArrayStoreException
        at 
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:325)
        ... 19 more
Caused by: java.lang.ArrayStoreException
        at java.lang.System.arraycopy(Native Method)
        at java.util.ArrayList.toArray(ArrayList.java:304)
        at 
org.apache.axis2.xmlbeans.CodeGenerationUtility.convertToSchemaArray(CodeGenerationUtility.java:562)
        at 
org.apache.axis2.xmlbeans.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:189)
        ... 19 more

Total time: 2 seconds
<!-- ====================================================================== -->
<!-- Optional Ant build file containing project specific tasks              -->
<!--                                                                        -->
<!-- author: [EMAIL PROTECTED]                                     -->
<!-- author: [EMAIL PROTECTED]                                     -->
<!-- ====================================================================== -->
<project name="axis2-test" default="main">

    <target name="main" description="test xmlbeans binding">
      <path id="example.classpath">
        <fileset dir="/opt/java/axis2-1.4.1">
          <include name="**/*.jar" />
        </fileset>
      </path>
     
      <taskdef name="codegen"
         classname="org.apache.axis2.tool.ant.AntCodegenTask"
         classpathref="example.classpath"/>
    
       <property name="temp.dir.test" location="~/temp/axis2xmlbeans"/>
       <delete dir="${temp.dir.test}"/>
       <mkdir dir="${temp.dir.test}"/>
    
       <codegen
         wsdlfilename="/opt/java/axis2/samples/wsdl/perf.wsdl"
         output="${temp.dir.test}"
         serverside="true"
         generateservicexml="true"
         databindingName="xmlbeans"/>
       
    </target>

</project>
<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements. See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership. The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License. You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied. See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->

<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:impl="http://perf.samples"; xmlns:intf="http://perf.samples"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; targetNamespace="http://perf.samples";>
	<wsdl:types>
		<schema elementFormDefault="qualified" targetNamespace="http://perf.samples"; xmlns="http://www.w3.org/2001/XMLSchema";>
			<element name="inputElement">
				<complexType>
					<sequence>
						<element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:string"/>
					</sequence>
				</complexType>
			</element>
			<element name="outputElement" type="xsd:string"/>
		</schema>
	</wsdl:types>
	<wsdl:message name="handleStringArrayResponse">
		<wsdl:part name="output" element="impl:outputElement"/>
	</wsdl:message>
	<wsdl:message name="handleStringArrayRequest">
		<wsdl:part name="input" element="impl:inputElement"/>
	</wsdl:message>
	<wsdl:portType name="PerfPortType">
		<wsdl:operation name="handleStringArray" parameterOrder="input">
			<wsdl:input name="handleStringArrayRequest" message="impl:handleStringArrayRequest"/>
			<wsdl:output name="handleStringArrayResponse" message="impl:handleStringArrayResponse"/>
		</wsdl:operation>
	</wsdl:portType>
	<wsdl:binding name="PerformanceSoapBinding" type="impl:PerfPortType">
		<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsdl:operation name="handleStringArray">
			<wsdlsoap:operation soapAction="handleStringArray"/>
			<wsdl:input>
				<wsdlsoap:body use="literal"/>
			</wsdl:input>
			<wsdl:output>
				<wsdlsoap:body use="literal"/>
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>
	<wsdl:service name="PerfSoapService">
		<wsdl:port name="Performance" binding="impl:PerformanceSoapBinding">
			<wsdlsoap:address location="http://localhost:8080/axis2/services/PerfPortType"/>
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to