axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ian_d_stew...@bankone.com
Subject RE: Custom Serializers and Public Data Members
Date Tue, 02 Mar 2004 18:19:05 GMT
That is how I do it (though I actually use a java.lang.reflect.Method
object).  There may be better ways, but nothing I've been able to identify.


Ian



                                                                                         
                         
                    "Bob Roberts"                                                        
                         
                    <broberts@virt       To:     <axis-user@ws.apache.org>      
                                  
                    uas.com>             cc:                                          
                            
                                         Subject:     RE: Custom Serializers and Public Data
Members               
                    03/02/2004                                                           
                         
                    12:24 PM                                                             
                         
                    Please respond                                                       
                         
                    to axis-user                                                         
                         
                                                                                         
                         
                                                                                         
                         




Thanks Ian. Do you know of a simple way to get the method target, other
than
just converting the localName to a setLocalName type string and then using:

public MethodTarget(java.lang.Object targetObject,
                    java.lang.String methodName)
             throws java.lang.NoSuchMethodException

Thanks,
Bob

-----Original Message-----
From: ian_d_stewart@bankone.com [mailto:ian_d_stewart@bankone.com]
Sent: Tuesday, March 02, 2004 8:32 AM
To: axis-user@ws.apache.org
Subject: Re: Custom Serializers and Public Data Members

If you provide accessor methods for those fields (e.g. getPrivateData(),
setPrivateData()), you can use the MethodTarget in place of the
FieldTarget.  That should do away with the NoSuchFieldException.


HTH,
Ian





                    "Bob Roberts"

                    <broberts@virt       To:     <axis-user@ws.apache.org>

                    uas.com>             cc:

                                         Subject:     Custom Serializers
and
Public Data Members
                    03/01/2004

                    11:16 PM

                    Please respond

                    to axis-user









Hello,

I have been working with some pretty simple Custom
Serializers/Deserializers
and I have noticed that I have had to make my private data members public.
If I don't, I get a java.lang.NoSuchFieldException message telling me that
Axis cannot find the private field.

Is this normal behavior? It just seems a bit odd that I have to expose my
data members. What if I don't have the source to the objects that I would
like to serialize?

Thanks,
Bob







This transmission may contain information that is privileged, confidential
and/or exempt from disclosure under applicable law. If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution, or use of the information contained herein (including any
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission
in error, please immediately contact the sender and destroy the material in
its entirety, whether in electronic or hard copy format. Thank you.







This transmission may contain information that is privileged, confidential and/or exempt from
disclosure under applicable law. If you are not the intended recipient, you are hereby notified
that any disclosure, copying, distribution, or use of the information contained herein (including
any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error,
please immediately contact the sender and destroy the material in its entirety, whether in
electronic or hard copy format. Thank you.


Mime
View raw message