You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Christophe Roudet <cr...@activia.net> on 2004/04/22 18:20:05 UTC

Private accessor and BeanDeserializer

Hi,

Is it possible to deserialize an object with private accessors?

Christophe




RE: Private accessor and BeanDeserializer

Posted by Christophe Roudet <cr...@activia.net>.
More precision, I have a class like that:

Class MyClass {
   private String _id;
   ...
   // Public get method
   public String getId() {
     return _id;
   }

   ...
    // Private setter
    private void setId(String id) {
      _id = id;
    }
}

In the wsdl I have.

      <complexType name="MyClass">

        <sequence>

          <element name="id" nillable="true" type="xsd:string"/>

        </sequence>

      </complexType>

There is no problem with serialization, but with deserialization, I got a
null id because the setter method is private. 
Is there a way to tell the deserializer to check for private methods ?

Christophe

> -----Original Message-----
> From: Christophe Roudet [mailto:croudet@activia.net]
> Sent: Thursday, April 22, 2004 12:20 PM
> To: axis-user@ws.apache.org
> Subject: Private accessor and BeanDeserializer
> 
> Hi,
> 
> Is it possible to deserialize an object with private accessors?
> 
> Christophe
> 
>