Actually, I’m using a .NET client, so BeanDeserialization isn’t an issue for me.  Is this perhaps an interoperability issue?

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 15, 2002 4:35 PM
To: [EMAIL PROTECTED]
Subject: Re: Read-only bean properties and ?WSDL.

 


The bean requires editable properties in order to pass the data over the wire.

Is your client going to have a different simple bean mapping that uses an editable property? If not there is no way that the BeanDeserializer will be able to set the value.

If you still want to pursue this issue, open a bugzilla bug. I know that the BeanSerializer uses the BeanUtils to generate BeanPropertyDescriptors, and the code does examine read-only properties if the javaType is an Exception.

I think that this is one of those cases where you don't want to deviate from the JSR 101 specification. It is best to make the property editable.

Rich 'Shirley' Scheuerle
IBM WebSphere & Axis Web Services Development
512-838-5115 (IBM TL 678-5115)
"Cameron Ross" <[EMAIL PROTECTED]>

"Cameron Ross" <[EMAIL PROTECTED]>

07/15/2002 02:31 PM
Please respond to axis-user



To: <[EMAIL PROTECTED]>
cc:
Subject: Read-only bean properties and ?WSDL.


Hello,

I have deployed an axis web service with a service method that returns a complex type. This return type follows the java bean naming conventions to define a simple bean with a single read-only property, that is, it has a single private String data member with a getter method only. When I deploy the service and check the ?WSDL output I find that the sequence element under the associated complex type is empty (i.e. <sequence />). If I add a setter method for the property and re-deploy the service I get the expected result (i.e. <sequence> <element name=”message” nillable=”true” type=”xsd:string” />).

Is their a way to employ the BeanSerializer for beans with read-only properties, or must I write custom serialization code?

Cheers,

Cameron.

"If you can't explain something to a six-year old, you really don't understand it yourself." Albert Einstein.

Reply via email to