You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Aj...@iflexsolutions.com on 2008/01/10 03:28:23 UTC

Using Map in DTO

HI group,
 
I amm trying to send a DTO which has a Map using Axis web services.
When the run the client , i am getting NPE at some deserealization..
 
If the use HashMap instead of Map, it works great.
 
Whats the issue here.
 
Thanks,
Ajit


DISCLAIMER:
This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore,  does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version.

RE: Using Map in DTO

Posted by Aj...@iflexsolutions.com.
Hi Hemant/Group,

 

I am using axis 1.4.

Hashmaps are working fine in DTO.

 

Could there be any problem when trying to create a .Net client if I use
Hashmap?

 

I have lots of maps in the DTOs . Should I create my own map
implementation class for Maps? Whats the alternative?

 

Thanks,

Ajit

 

________________________________

From: Hemant Borole [mailto:hemantborole@gmail.com] 
Sent: Thursday, January 10, 2008 9:42 PM
To: axis-dev@ws.apache.org
Subject: Re: Using Map in DTO

 

Axis 1.4 or Axis 2?
I am not sure about Axis 2.0. But I have used axis 1.4 with very little
success with searializing Maps, or for that matter even HashMaps. One
reason being the value for the keys in the HashMap can have an undefined
structure and hence I believe Axis cannot figure out how to serialize
it. 
And anyway SOAP is about Objects, and I think, in this respect, it means
objects with defined structures. (as per the wsdl).
Here are my 2 cents, dont use Map, hashMap or for that matter any data
type whose structure is undefined. Use rigid objects. 

Hope this helps

Regards
Hemant




On Jan 9, 2008 6:28 PM, <Aj...@iflexsolutions.com> wrote:

HI group,

 

I amm trying to send a DTO which has a Map using Axis web services.

When the run the client , i am getting NPE at some deserealization..

 

If the use HashMap instead of Map, it works great.

 

Whats the issue here.

 

Thanks,

Ajit

DISCLAIMER:
This message contains privileged and confidential information and is
intended only for an individual named. If you are not the intended
recipient, you should not disseminate, distribute, store, print, copy or
deliver this message. Please notify the sender immediately by e-mail if
you have received this e-mail by mistake and delete this e-mail from
your system. E-mail transmission cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete or contain viruses. The sender,
therefore, does not accept liability for any errors or omissions in the
contents of this message which arise as a result of e-mail transmission.
If verification is required, please request a hard-copy version. 




-- 
Thanks and Regards
Hemant 



DISCLAIMER:
This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore,  does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version.

Re: Using Map in DTO

Posted by Hemant Borole <he...@gmail.com>.
Axis 1.4 or Axis 2?
I am not sure about Axis 2.0. But I have used axis 1.4 with very little
success with searializing Maps, or for that matter even HashMaps. One reason
being the value for the keys in the HashMap can have an undefined structure
and hence I believe Axis cannot figure out how to serialize it.
And anyway SOAP is about Objects, and I think, in this respect, it means
objects with defined structures. (as per the wsdl).
Here are my 2 cents, dont use Map, hashMap or for that matter any data type
whose structure is undefined. Use rigid objects.

Hope this helps

Regards
Hemant



On Jan 9, 2008 6:28 PM, <Aj...@iflexsolutions.com> wrote:

> HI group,
>
> I amm trying to send a DTO which has a Map using Axis web services.
> When the run the client , i am getting NPE at some deserealization..
>
> If the use HashMap instead of Map, it works great.
>
> Whats the issue here.
>
> Thanks,
> Ajit
>
> DISCLAIMER:
> This message contains privileged and confidential information and is
> intended only for an individual named. If you are not the intended
> recipient, you should not disseminate, distribute, store, print, copy or
> deliver this message. Please notify the sender immediately by e-mail if you
> have received this e-mail by mistake and delete this e-mail from your
> system. E-mail transmission cannot be guaranteed to be secure or error-free
> as information could be intercepted, corrupted, lost, destroyed, arrive late
> or incomplete or contain viruses. The sender, therefore, does not accept
> liability for any errors or omissions in the contents of this message which
> arise as a result of e-mail transmission. If verification is required,
> please request a hard-copy version.
>



-- 
Thanks and Regards
Hemant