axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Black <>
Subject Re: exposing only parts of a Java Bean
Date Tue, 23 Nov 2004 19:24:38 GMT
Hash: SHA1

Tim Dev wrote:
| Hello,
| I've just started looking into Axis and I couple of simple questions:
| 1)
| How can I expose only the Java Bean part of a complex type, in other words
| I have a Java Bean that has some extra methods also for use internally on
| the server side (e.g. one of the methods is getMap() *without* a
| corresponding setMap() method).
| When I expose a method that uses this bean, a "map" attribute is also
| exposed in the complex type in the WSDL (using Java2WSDL). I've used Sun's
| RI implementation in the past and only the true Java Bean methods would be
| exposed, the rest would be ignored and I liked this behavior.

The best approach is to separate the bean from the extra methods, and
just have your server use the extra methods by calling the class that
would extend the bean class.  That way, regardless of what happens, you
know what is going out as a webservice.

| 2)
| If I let the Map to be exposed as part of the complex type and it has its
| own custom (de)serializer, how's the interop with .NET? I read that it's
| not recommended to use maps but use an array instead and that's exactly
| what I am doing, except that on the server the internal representation is
| a map which I don't want exposed.

~  I don't believe it will work in .NET if you use your own serializer.

- --
"Love is mutual self-giving that ends in self-recovery." Fulton Sheen
James Black
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird -


View raw message