Using new bean types with introspection is the right way to go. Convert all collections to arrays.
Anne On 8/19/06, Asher Tarnopolski <[EMAIL PROTECTED]> wrote:
Hello gurus, I've never coded web services earlier, but now I have to develop a service for a pretty old and complicated application. I use AXIS and the problem I am expecting is as follows: I have to deliver beans that include ArrayLists, Vectors and Hashtables. While creating new beans for use with WS, AXIS replaces Hashtables with Hashmaps, ArrayLists with object arrays, and just Vectors are left as they are. As I already mentioned, the application is large and old and there is no way I can replace Hashtables and ArrayLists in the existing beans to fit The AXIS/SOAP requirements. My first idea was to create a new set of beans that will include Hashmaps and Vectors instead of Hashtables and ArrayLists to avoid the problems with AXIS/SOAP complex types mapping, and to build an introspection mechanism in my WS-handler class that will receive the new type of beans, parse them into the old types, trigger the existing system logics, introspect the old type beans received from the application back into the new types of beans and send a response back to the client. But then I realized that Hashmaps and Vectors won't solve the problem in case the client will be written in .NET. Which means I can't even use Hashmaps and Vectors, but just arrays of objects. In case of Vectors this also can be solved, but I'm pretty puzzled how can the Hashmaps be represented in this case. Anyway, my questions are: 1. Do you think the two bean types plus introspection scenario is the right one, or there are any other better solutions around? 2. Should I use Vectors and Hashmaps instead of ArrayLists and Hashtables, or the right way is to go down with simple arrays of objects? 3. If the answer to the second question is positive, how can Hashtables be represented by arrays of objects? Thank you for your time! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
