Thanks Dims. Using "--wrapArrays" option in WSDL2JAVA works well.
Thanks for your help. -Narayanan Davanum Srinivas wrote:
please try the --wrapArrays option in Axis 1.3 thanks, dims On 11/10/05, Narayanan Singaram <[EMAIL PROTECTED]> wrote:Hello All, I'm getting an IllegalArgumentException in the server while deserializing an array of array ([][]) object. Axis is calling the setter method with an array([]) where as the generated method expects an array of array([][]). I searched the mail list archive. Couldnt find anything helpful. Any idea how to rectify this or what mistake I'm doing?. Is there any property I should set in the server-config.wsdd? or is there a work around to overcome this error?. I'm using wsdl2java for generating both the server and client side stubs. I tried with both axis 1.2.1 & 1.3 and am getting the same result. Schema in the WSDL looks like <complexType name="columnType"> <attribute name="name" type="string" /> <attribute name="type" type="string" /> </complexType> <complexType name="rowValueType"> <attribute name="value" type="string" /> </complexType> <complexType name="rowType"> <sequence> <element name="Data" type="tns:rowValueType" minOccurs="1" maxOccurs="unbounded" /> </sequence> </complexType> <complexType name="exceptionType"> <sequence> <element name="ExceptionType" type="string" maxOccurs="1" minOccurs="1"/> <element name="Column" type="tns:columnType" minOccurs="1" maxOccurs="unbounded" /> <element name="Row" type="tns:rowType" minOccurs="1" maxOccurs="unbounded" /> </sequence> </complexType> Generated Java class for the ExceptionType contains a two dimensional array for 'row'. public class ExceptionType implements java.io.Serializable { private java.lang.String exceptionType; private pushresults.ColumnType[] column; private pushresults.RowValueType[][] row; public ExceptionType() { } public ExceptionType( java.lang.String exceptionType, pushresults.ColumnType[] column, pushresults.RowValueType[][] row) { this.exceptionType = exceptionType; this.column = column; this.row = row; } ..... other bean methods } When deserializing the incoming request in the server(Tomcat), axis calls the setRow() method with a RowValueType[] object, where as the signature of the setter method is RowValueType[][]. Exception from the axis log can be found at the end of this email. Thanks for your help. Thanks, Narayanan _ Exception in the Axis Log:_ - Could not convert [Lpushresults.RowValueType; to bean field 'row', type [Lpushresults.RowValueType; - NSPop (32) - Popped element stack to org.apache.axis.message.MessageElement:Exception - Exit: DeserializationContext::endElement() - org.apache.axis.i18n.resource::handleGetObject(toAxisFault00) - Enter: SOAPPart ctor(FORM_FAULT) - org.apache.axis.i18n.resource::handleGetObject(setMsgForm) - Setting current message form to: FORM_FAULT (currentMessage is now org.apache.axis.AxisFault) - Exit: SOAPPart ctor() - Enter: SimpleChain::onFault - Exit: SimpleChain::onFault - org.apache.axis.i18n.resource::handleGetObject(axisFault00) - AxisFault: - NSPush (32) - org.apache.axis.i18n.resource::handleGetObject(empty00) - NSPop (empty) - NSPush (32) - org.apache.axis.i18n.resource::handleGetObject(empty00) - NSPop (empty) - NSPush (32) - org.apache.axis.i18n.resource::handleGetObject(empty00) - NSPop (empty) AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.IllegalArgumentException: argument type mismatch faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.IllegalArgumentException: argument type mismatch 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.axis.utils.BeanPropertyDescriptor.set(BeanPropertyDescriptor.java:142) at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:100) at org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249) at org.apache.axis.encoding.ser.ArrayDeserializer.valueComplete(ArrayDeserializer.java:583) at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)-- Davanum Srinivas : http://wso2.com/blogs/
