Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 21773 invoked by uid 500); 5 Apr 2002 14:32:33 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 21763 invoked from network); 5 Apr 2002 14:32:33 -0000 Message-ID: <3CADB582.4CC7ADD4@genome.wi.mit.edu> Date: Fri, 05 Apr 2002 09:32:34 -0500 From: David Turner Organization: Whitehead Institute Center for Genome Research X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: axis-dev@xml.apache.org Subject: Deserializer (MethodTarget, FieldTarget) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I've posted a couple of messages already both to the user and dev lists, but got no response. I've been trying to write my own deserializer for the following simple class which is based on your encoding example: public class Data { private String name; private int age; public Data() {} pubic Data(String name, int age) { this.name = name; this.age = age; } public void setName(String name) { this.name = name; } public String getName() { return this.name; } public void setAge(int age) { this.age = age; } public int getAge() { return this.age; } } What doesn't work is the parameter to the method registerValueTarget(new FieldTarget(value, localname)) or registerValueTarget(new MethodTarget(value, methodName)). Using FieldTarget requires that the class being deserialized have public field members. FieldTarget is using Class.getField() which only works on public fields. MethodTarget, on the other hand doesn't work either. I pass in the name of the method so it can set the private field, but it can't find it because MethodTarget is using Class.getMethod(methodName, Class[] { Object.class }). My setters have a String parameter and the other has a int parameter. MethodTarget can't find my method because it's looking for an Object parameter in the method parm list. I need to deserialize and serialize some complex objects in my project, but this is stopping me. I need to have something that goes beyond the BeanSerializer. I could use some help and/or feedback. Thanks David