Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / August 2005

Tip: Looking for answers? Try searching our database.

Java 5 enums with Axis 1.2

Thread view: 
Markus Weseloh - 31 Aug 2005 15:34 GMT
Hello,

we develop a prototype using JDK 1.5. In this prototype we use Axis 1.2
for SOAP communication between the client and the server (Tomcat
5.5.9). Our problem is that we want to use the new Java 5 enums but
Axis 1.2 won't work with them (e.g. when a get method returns an enum).
Is it possible to write user defined serializer and deserializer to
support Java 5 enums? Or is there a standard solution? Or is it
impossible at all :-)?

Regards
Markus
Roedy Green - 31 Aug 2005 21:48 GMT
>we develop a prototype using JDK 1.5. In this prototype we use Axis 1.2
>for SOAP communication between the client and the server (Tomcat
[quoted text clipped - 3 lines]
>support Java 5 enums? Or is there a standard solution? Or is it
>impossible at all :-)?

You could write the ordinal or the name instead.

You need a dummy class on the other end with the same name as the enum
or the enum constant (if you added custom methods to it) that will
behave sufficiently like an enum. Then it would not need custom
serialisation.

You could decompile the enum code to get you a first shot at such
code.   The enums in 1.4 still won't work in case labels.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.