Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 10477 invoked from network); 26 Oct 2006 00:32:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2006 00:32:28 -0000 Received: (qmail 10098 invoked by uid 500); 25 Oct 2006 10:51:15 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 10087 invoked by uid 500); 25 Oct 2006 10:51:15 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 10076 invoked by uid 99); 25 Oct 2006 10:51:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Oct 2006 03:51:15 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [209.68.5.16] (HELO relay02.pair.com) (209.68.5.16) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 25 Oct 2006 03:51:03 -0700 Received: (qmail 37202 invoked from network); 25 Oct 2006 10:50:41 -0000 Received: from unknown (HELO ?127.0.0.1?) (unknown) by unknown with SMTP; 25 Oct 2006 10:50:41 -0000 X-pair-Authenticated: 124.43.219.86 Message-ID: <453F413D.1020307@opensource.lk> Date: Wed, 25 Oct 2006 16:19:33 +0530 From: Deepal Jayasinghe User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: axis-user@ws.apache.org Subject: Re: [axis2] Serialization of Java-Classes References: <142351150610250258q58498834g87572e6ffbd84bf7@mail.gmail.com> In-Reply-To: <142351150610250258q58498834g87572e6ffbd84bf7@mail.gmail.com> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Benjamin; > Hi, > I am new to axis2 and I am trying to build a WebService which can > handle some complex Datatypes. Is there any Document, that describes > Serialization in Axis2? There is no document as such, what it does is uses java bean introspector and serialize java class into xml. > > My Method for the WebService is: > > ---------------------CODE-------------------------------- > /** > * Gets the first Light found in the desired Room. > * > * @return Light located in the Room, if found. > */ > public Light getLight(Room room) { > ArrayList lights = this.ninoRep.getLights(); > for (int i = 0; i < lights.size(); i++) { > Light l = lights.get(i); > Room r = l.getisInRoom(); > if (room.equals(r)) > return l; > } > return null; > } > ---------------------CODE-------------------------------- > > Both Classes Room and Light are rather complex. I need these classes, > because I want to use them in a Semantic Web Service. But fore that I > need a "normal" WS. > Do I have to make custom MessageReceivers for every Class? No you do not need , what you have to do is use RPCMessageReceiver as your message receiver. Then that will handle serialization and deserialization for you. > Or is there an easier, more general way? > > > > An other Problem: After deploying my Service everything is fine, > except when I want to get the WSDL-File. Then the following error > comes up: Where did you deploy your service ? in tomcat or smt else ? > > --------------------ERROR-------------------------------- > HTTP Status 500 - > > type Exception report > > message > > description The server encountered an internal error () that prevented > it from fulfilling this request. > > exception > > javax.servlet.ServletException: 32; nested exception is: > java.lang.ArrayIndexOutOfBoundsException: 32 > > org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:111) > javax.servlet.http.HttpServlet.service(HttpServlet.java:689) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > root cause > > org.apache.axis2.AxisFault: 32; nested exception is: > java.lang.ArrayIndexOutOfBoundsException : 32 > org.apache.axis2.description.AxisService.getWSDL(AxisService.java:558) > > org.apache.axis2.description.AxisService.printWSDL(AxisService.java:533) > org.apache.axis2.transport.http.ListingAgent.processListService > (ListingAgent.java:144) > > org.apache.axis2.transport.http.ListingAgent.handle(ListingAgent.java:89) > > org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:109) > javax.servlet.http.HttpServlet.service (HttpServlet.java:689) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > note The full stack trace of the root cause is available in the Apache > Tomcat/5.5.15 logs. > --------------------ERROR-------------------------------- > > With the java2WSDL-Tool the WSDL-generation works fine. > > Thanks for your help! > > Benjamin > > > --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org