ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomáš Procházka <>
Subject Re: HashMap return Long value
Date Thu, 26 Jan 2006 12:50:04 GMT

 Axis 1.3 return Long Number, when I call this server method:

    public HashMap getMap() {
        HashMap map = new HashMap();
        return map;

 In SoapBindingStub class on the line:

  java.lang.Object _resp = _call.invoke(new java.lang.Object[] {map});

 And this raise Exception :-(

 And. How is best way to transfer many items with name and value via Soap?

 I have on booth side (server also in client) the same version Apache 1.3


-------------------------- Original message --------------------------
       From: Anne Thomas Manes <>
    Subject: HashMap return Long value
       Date: Thursday, January 26, 2006, 1:04:15 PM
Attachments: Zpráva.html

A> Axis 1.3 can handle a HashMap, but for interoperability reasons, it's better not to
use Collection classes.
A> Anne 

A> On 1/26/06, Tomáš Procházka <> wrote:
A> Hi. 

D>> Axis2 can not handle HashMap yet , I mean default Aixs2 MessageRecivers ,
D>> but you can write your own message reciver to handle this case.

A>  I tested it only Axis 1.3

A>  Axis 1.3 support HashMap? 

A>  Axis 2.0 I never try yet.

A> -------------------------- Original message --------------------------
A>        From: Deepal Jayasinghe <>
A>     Subject: HashMap return Long value 
A>        Date: Thursday, January 26, 2006, 12:16:40 PM
A> Attachments: <none>
A>       msgid:004f01c62269$fe598d30$c201a8c0@Deepal

D>> Thanks,
D>>  Deepal
D>> ................................................................ 
D>> ~Future is Open~

D>> ----- Original Message -----
D>> From: "Tomáš Procházka" < >
D>> To: <>; "Tomáš Procházka" <>

D>> Sent: Thursday, January 26, 2006 1:34 PM
D>> Subject: Re: HashMap return Long value

D>> Hi.

D>>  No body has this problem?

D>>  Exist another way to send Map via Axis?

D>>  And what About Axis2? It's in usable version? 

D>> -------------------------- Original message --------------------------
D>>        From: Tomáš Procházka < >
D>>     Subject: HashMap return Long value
D>>        Date: Wednesday, January 25, 2006, 3:00:57 PM
D>> Attachments: <none>

TP>>> Hi.

TP>>>  I Have problem with HasMap in Axis.
TP>>>  Can you help me somebody, please.

TP>>>  I write this method on the server side: 

TP>>>     public HashMap getMap() {
TP>>>         HashMap map = new HashMap();
TP>>>         map.put("NAME","Tomas");
TP>>>         map.put("SEX","male"); 
TP>>>         return map;
TP>>>     }

TP>>>  When invoke it on the client side get this error:

TP>>> java.lang.ClassCastException: java.lang.Long
TP>>> at

TP>>>  WS return Long number. Why?

TP>>>  When I use SOPA monitor, get this as response: 

TP>>> <?xml version="1.0" encoding="UTF-8"?>
TP>>> <soapenv:Envelope
D>> xmlns:soapenv=" "
TP>>> xmlns:xsd=""
TP>>> xmlns:xsi=" ">
TP>>>   <soapenv:Body>
TP>>>     <ns1:getMapResponse
TP>>> soapenv:encodingStyle=" "
D>> xmlns:ns1="">
TP>>>       <getMapReturn href="#id0"/>
TP>>>     </ns1:getMapResponse> 
TP>>>     <multiRef id="id0" soapenc:root="0"
TP>>> soapenv:encodingStyle="" 
D>> xsi:type="ns2:Map"
TP>>> xmlns:soapenc=""
TP>>> xmlns:ns2=" ">
TP>>>       <item>
TP>>>         <key xsi:type="soapenc:string">SEX</key>
TP>>>         <value xsi:type="soapenc:string">male</value> 
TP>>>       </item>
TP>>>       <item>
TP>>>         <key xsi:type="soapenc:string">NAME</key>
TP>>>         <value xsi:type="soapenc:string">Tomas</value> 
TP>>>       </item>
TP>>>     </multiRef>
TP>>>   </soapenv:Body>
TP>>> </soapenv:Envelope>

TP>>>  I tested it with Apache Axis 1.3 a and 1.4 CVS on the client and also 
D>> on the server side.

D>> ----------------------- End of original message ----------------------

A> ----------------------- End of original message ----------------------

A> --
A>  Tomas Prochazka 

----------------------- End of original message ----------------------

 Tomas Prochazka

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message