Hi Hoogenboom; Pls create a JIRA attaching your wsdl.
Thanks Deepal >Hi, > >I have generated webservice client code with the Axis2 plugin for >Eclipse based on a wsdl file. One of the elements is a byte array. > >The generated client tries to convert the string array to a byte[] >by means of the ConvertToArray. Here I receive a ClassCastException. >If I change byte into short or String, it works ok. > >Example: > > import org.apache.axis2.databinding.utils.ConverterUtil; > > byte[] a ; > short[] a2; > String[] c = new String[2]; > c[0]="0"; > c[1]="1"; > > a = (byte[])ConverterUtil.convertToArray(byte.class, c); > >=> java.lang.ClassCastException > at > org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:696) > at > org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:654) > at > wsdl.simpapp2.TuxedoWebServiceTest.testStartOphalenMelding(TuxedoWebServiceTest.java:154) > 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:324) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:118) > at junit.framework.TestSuite.runTest(TestSuite.java:208) > at junit.framework.TestSuite.run(TestSuite.java:203) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) > > > a2 = (short[])ConverterUtil.convertToArray(short.class, c); > >=> Ok. > >Could it be a bug or am I missing something? If a bug, where should I post it? > >Thanks, >Mariska. > > >Disclaimer: >De inhoud van dit bericht is uitsluitend bestemd voor geadresseerde. >Gebruik van de inhoud van dit bericht door anderen zonder toestemming van het >Kadaster >is onrechtmatig. Mocht dit bericht ten onrechte bij u terecht komen, dan >verzoeken wij u >dit direct te melden aan de verzender en het bericht te vernietigen. >Aan de inhoud van dit bericht kunnen geen rechten worden ontleend. > >Disclaimer: >The content of this message is meant to be received by the addressee only. >Use of the content of this message by anyone other than the addressee without >the consent >of the Kadaster is unlawful. If you have received this message but are not the >addressee, >please contact the sender immediately and destroy the message. >No rights can be derived from the content of this message. > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
