You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Tomáš Procházka <t....@centrum.cz> on 2006/01/25 15:00:57 UTC

HashMap return Long value

Hi.

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

 I write this method on the server side:

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


 When invoke it on the client side get this error:

java.lang.ClassCastException: java.lang.Long
at cz.atomsoft.bazartip.ws.SynchronizationSoapBindingStub.getMap(SynchronizationSoapBindingStub.java:206)

 WS return Long number. Why?

 When I use SOPA monitor, get this as response:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <ns1:getMapResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:ws.bazartip.atomsoft.cz">
      <getMapReturn href="#id0"/>
    </ns1:getMapResponse>
    <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Map" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://xml.apache.org/xml-soap">
      <item>
        <key xsi:type="soapenc:string">SEX</key>
        <value xsi:type="soapenc:string">male</value>
      </item>
      <item>
        <key xsi:type="soapenc:string">NAME</key>
        <value xsi:type="soapenc:string">Tomas</value>
      </item>
    </multiRef>
  </soapenv:Body>
</soapenv:Envelope>

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


-- 
Tomas Prochazka


Re: HashMap return Long value

Posted by Tomáš Procházka <t....@centrum.cz>.
Hi.

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

    public HashMap getMap() {
        HashMap map = new HashMap();
        map.put("NAME","Tomas");
        map.put("SEX","male");
        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 <at...@gmail.com>
    Subject: HashMap return Long value
       Date: Thursday, January 26, 2006, 1:04:15 PM
Attachments: Zpráva.html
      msgid:bf414ee60601260404x15db07a3tf76c55671ebff167@mail.gmail.com

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

A> On 1/26/06, Tomáš Procházka <t....@centrum.cz> 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 <de...@opensource.lk>
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" <t.prochazka@centrum.cz >
D>> To: <ax...@ws.apache.org>; "Tomáš Procházka" <t....@centrum.cz> 
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 <t.prochazka@centrum.cz >
D>>     Subject: HashMap return Long value
D>>        Date: Wednesday, January 25, 2006, 3:00:57 PM
D>> Attachments: <none>
D>>       msgid:1964620144.20060125150057@centrum.cz 

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>>> 
D>> cz.atomsoft.bazartip.ws.SynchronizationSoapBindingStub.getMap(SynchronizationSoapBindingStub.java:206)

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="http://schemas.xmlsoap.org/soap/envelope/ "
TP>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
TP>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance ">
TP>>>   <soapenv:Body>
TP>>>     <ns1:getMapResponse
TP>>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
D>> xmlns:ns1="urn:ws.bazartip.atomsoft.cz">
TP>>>       <getMapReturn href="#id0"/>
TP>>>     </ns1:getMapResponse> 
TP>>>     <multiRef id="id0" soapenc:root="0"
TP>>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
D>> xsi:type="ns2:Map"
TP>>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
TP>>> xmlns:ns2="http://xml.apache.org/xml-soap ">
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 



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

-- 
 Tomas Prochazka


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: HashMap return Long value

Posted by Tomáš Procházka <t....@centrum.cz>.
Hi.

 In this zip file:
 http://atom.mamto.cz/archiv/temp/axis_hashmap.zip

 Is server class, server config, generated wsdl file and client generated stub.

 I thing, that all is OK.
   

-------------------------- Original message --------------------------
       From: Anne Thomas Manes <at...@gmail.com>
    Subject: HashMap return Long value
       Date: Thursday, January 26, 2006, 5:49:19 PM
Attachments: Zpráva.html
      msgid:bf414ee60601260849l412a5416p2137448ee98b3ba9@mail.gmail.com

A> It looks like something in the stub that is trying to cast the Map to aLong. I can't
A> imagine why. Are you sure you are using the right stub? Did you try to regenerate it? 
A>  
A> Anne 

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

A> I'm sorry, I wrote to personal address.
A> Anne Thomas Manes <at...@gmail.com> write me:

>> Please send your messages to the list rather than to me personally. 
>> Perhaps the problem is in the server. What is the actual return message?
>> And you should convert your HashMap to an array.

A> Actual return message is:


A>   <soapenv:Body>
A>     <ns1:getMapResponse soapenv:encodingStyle="
A> http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:ws.bazartip.atomsoft.cz">
A>       <getMapReturn href="#id0"/> 
A>     </ns1:getMapResponse>
A>     <multiRef id="id0" soapenc:root="0"
A> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ " xsi:type="ns2:Map"
A> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
A> xmlns:ns2="http://xml.apache.org/xml-soap ">
A>       <item>
A>         <key xsi:type="soapenc:string">SEX</key>
A>         <value xsi:type="soapenc:string">male</value>
A>       </item> 
A>       <item>
A>         <key xsi:type="soapenc:string">NAME</key>
A>         <value xsi:type="soapenc:string">Tomas</value>
A>       </item>
A>     </multiRef> 
A>   </soapenv:Body>


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

-- 
 Tomas Prochazka


Re: HashMap return Long value

Posted by Anne Thomas Manes <at...@gmail.com>.
It looks like something in the stub that is trying to cast the Map to a
Long. I can't imagine why. Are you sure you are using the right stub? Did
you try to regenerate it?

Anne

On 1/26/06, Tomáš Procházka <t....@centrum.cz> wrote:
>
> Hi.
>
> I'm sorry, I wrote to personal address.
> Anne Thomas Manes <at...@gmail.com> write me:
>
> > Please send your messages to the list rather than to me personally.
> > Perhaps the problem is in the server. What is the actual return message?
> > And you should convert your HashMap to an array.
>
> Actual return message is:
>
>
>   <soapenv:Body>
>     <ns1:getMapResponse soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:
> ws.bazartip.atomsoft.cz">
>       <getMapReturn href="#id0"/>
>     </ns1:getMapResponse>
>     <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="
> http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Map"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="
> http://xml.apache.org/xml-soap">
>       <item>
>         <key xsi:type="soapenc:string">SEX</key>
>         <value xsi:type="soapenc:string">male</value>
>       </item>
>       <item>
>         <key xsi:type="soapenc:string">NAME</key>
>         <value xsi:type="soapenc:string">Tomas</value>
>       </item>
>     </multiRef>
>   </soapenv:Body>
>
>
>
> -------------------------- Original message --------------------------
>        From: Tomáš Procházka <t....@centrum.cz>
>     Subject: HashMap return Long value
>        Date: Thursday, January 26, 2006, 1:54:04 PM
> Attachments: <none>
>       msgid:1976565374.20060126135404@centrum.cz
>
> TP> Hi.
>
> TP>  Axis 1.3 return Long Number, when I call this server method:
>
> TP>     public HashMap getMap() {
> TP>         HashMap map = new HashMap();
> TP>         map.put("NAME","Tomas");
> TP>         map.put("SEX","male");
> TP>         return map;
> TP>     }
>
> TP>  In SoapBindingStub class on the line:
>
> TP>   java.lang.Object _resp = _call.invoke(new java.lang.Object[] {map});
>
> TP>  And this raise Exception :-(
>
>
> TP>  And. How is best way to transfer many items with name and value via
> Soap?
>
> TP>  I have on booth side (server also in client) the same version Apache
> 1.3
>
> TP>
>
> TP> -------------------------- Original message --------------------------
> TP>        From: Anne Thomas Manes <at...@gmail.com>
> TP>     Subject: HashMap return Long value
> TP>        Date: Thursday, January 26, 2006, 1:04:15 PM
> TP> Attachments: Zpráva.html
> TP>
> msgid:bf414ee60601260404x15db07a3tf76c55671ebff167@mail.gmail.com
>
> A>> Axis 1.3 can handle a HashMap, but for interoperability reasons, it's
> better not to use Collection classes.
> A>>
> A>> Anne
>
> A>> On 1/26/06, Tomáš Procházka <t....@centrum.cz> 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 <de...@opensource.lk>
> 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" <t.prochazka@centrum.cz >
> D>>> To: <ax...@ws.apache.org>; "Tomáš Procházka" <
> t.prochazka@centrum.cz>
> 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 <t.prochazka@centrum.cz >
> D>>>     Subject: HashMap return Long value
> D>>>        Date: Wednesday, January 25, 2006, 3:00:57 PM
> D>>> Attachments: <none>
> D>>>       msgid:1964620144.20060125150057@centrum.cz
>
> 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>>>>
> D>>> cz.atomsoft.bazartip.ws.SynchronizationSoapBindingStub.getMap(
> SynchronizationSoapBindingStub.java:206)
>
> 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="http://schemas.xmlsoap.org/soap/envelope/ "
> TP>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> TP>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance ">
> TP>>>>   <soapenv:Body>
> TP>>>>     <ns1:getMapResponse
> TP>>>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
> D>>> xmlns:ns1="urn:ws.bazartip.atomsoft.cz">
> TP>>>>       <getMapReturn href="#id0"/>
> TP>>>>     </ns1:getMapResponse>
> TP>>>>     <multiRef id="id0" soapenc:root="0"
> TP>>>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> D>>> xsi:type="ns2:Map"
> TP>>>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> TP>>>> xmlns:ns2="http://xml.apache.org/xml-soap ">
> 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
>
>
>
> A>>
> TP> ----------------------- End of original message ----------------------
>
>
> ----------------------- End of original message ----------------------
>
> --
> Tomas Prochazka
>
>

Re: HashMap return Long value

Posted by Tomáš Procházka <t....@centrum.cz>.
Hi.

I'm sorry, I wrote to personal address.
Anne Thomas Manes <at...@gmail.com> write me:

> Please send your messages to the list rather than to me personally.
> Perhaps the problem is in the server. What is the actual return message?
> And you should convert your HashMap to an array.

Actual return message is:


  <soapenv:Body>
    <ns1:getMapResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:ws.bazartip.atomsoft.cz">
      <getMapReturn href="#id0"/>
    </ns1:getMapResponse>
    <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Map" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://xml.apache.org/xml-soap">
      <item>
        <key xsi:type="soapenc:string">SEX</key>
        <value xsi:type="soapenc:string">male</value>
      </item>
      <item>
        <key xsi:type="soapenc:string">NAME</key>
        <value xsi:type="soapenc:string">Tomas</value>
      </item>
    </multiRef>
  </soapenv:Body>

  

-------------------------- Original message --------------------------
       From: Tomáš Procházka <t....@centrum.cz>
    Subject: HashMap return Long value
       Date: Thursday, January 26, 2006, 1:54:04 PM
Attachments: <none>
      msgid:1976565374.20060126135404@centrum.cz

TP> Hi.

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

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

TP>  In SoapBindingStub class on the line:

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

TP>  And this raise Exception :-(


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

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

TP>    

TP> -------------------------- Original message --------------------------
TP>        From: Anne Thomas Manes <at...@gmail.com>
TP>     Subject: HashMap return Long value
TP>        Date: Thursday, January 26, 2006, 1:04:15 PM
TP> Attachments: Zpráva.html
TP>       msgid:bf414ee60601260404x15db07a3tf76c55671ebff167@mail.gmail.com

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

A>> On 1/26/06, Tomáš Procházka <t....@centrum.cz> 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 <de...@opensource.lk>
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" <t.prochazka@centrum.cz >
D>>> To: <ax...@ws.apache.org>; "Tomáš Procházka" <t....@centrum.cz> 
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 <t.prochazka@centrum.cz >
D>>>     Subject: HashMap return Long value
D>>>        Date: Wednesday, January 25, 2006, 3:00:57 PM
D>>> Attachments: <none>
D>>>       msgid:1964620144.20060125150057@centrum.cz 

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>>>> 
D>>> cz.atomsoft.bazartip.ws.SynchronizationSoapBindingStub.getMap(SynchronizationSoapBindingStub.java:206)

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="http://schemas.xmlsoap.org/soap/envelope/ "
TP>>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
TP>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance ">
TP>>>>   <soapenv:Body>
TP>>>>     <ns1:getMapResponse
TP>>>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
D>>> xmlns:ns1="urn:ws.bazartip.atomsoft.cz">
TP>>>>       <getMapReturn href="#id0"/>
TP>>>>     </ns1:getMapResponse> 
TP>>>>     <multiRef id="id0" soapenc:root="0"
TP>>>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
D>>> xsi:type="ns2:Map"
TP>>>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
TP>>>> xmlns:ns2="http://xml.apache.org/xml-soap ">
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 



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


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

-- 
 Tomas Prochazka


Re: HashMap return Long value

Posted by Tomáš Procházka <t....@centrum.cz>.
Hi.

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

    public HashMap getMap() {
        HashMap map = new HashMap();
        map.put("NAME","Tomas");
        map.put("SEX","male");
        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 <at...@gmail.com>
    Subject: HashMap return Long value
       Date: Thursday, January 26, 2006, 1:04:15 PM
Attachments: Zpráva.html
      msgid:bf414ee60601260404x15db07a3tf76c55671ebff167@mail.gmail.com

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

A> On 1/26/06, Tomáš Procházka <t....@centrum.cz> 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 <de...@opensource.lk>
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" <t.prochazka@centrum.cz >
D>> To: <ax...@ws.apache.org>; "Tomáš Procházka" <t....@centrum.cz> 
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 <t.prochazka@centrum.cz >
D>>     Subject: HashMap return Long value
D>>        Date: Wednesday, January 25, 2006, 3:00:57 PM
D>> Attachments: <none>
D>>       msgid:1964620144.20060125150057@centrum.cz 

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>>> 
D>> cz.atomsoft.bazartip.ws.SynchronizationSoapBindingStub.getMap(SynchronizationSoapBindingStub.java:206)

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="http://schemas.xmlsoap.org/soap/envelope/ "
TP>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
TP>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance ">
TP>>>   <soapenv:Body>
TP>>>     <ns1:getMapResponse
TP>>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
D>> xmlns:ns1="urn:ws.bazartip.atomsoft.cz">
TP>>>       <getMapReturn href="#id0"/>
TP>>>     </ns1:getMapResponse> 
TP>>>     <multiRef id="id0" soapenc:root="0"
TP>>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
D>> xsi:type="ns2:Map"
TP>>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
TP>>> xmlns:ns2="http://xml.apache.org/xml-soap ">
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 



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

-- 
 Tomas Prochazka


Re: HashMap return Long value

Posted by Anne Thomas Manes <at...@gmail.com>.
Axis 1.3 can handle a HashMap, but for interoperability reasons, it's better
not to use Collection classes.

Anne

On 1/26/06, Tomáš Procházka <t....@centrum.cz> wrote:
>
> 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.
>
> I tested it only Axis 1.3
>
> Axis 1.3 support HashMap?
>
> Axis 2.0 I never try yet.
>
> -------------------------- Original message --------------------------
>        From: Deepal Jayasinghe <de...@opensource.lk>
>     Subject: HashMap return Long value
>        Date: Thursday, January 26, 2006, 12:16:40 PM
> Attachments: <none>
>       msgid:004f01c62269$fe598d30$c201a8c0@Deepal
>
>
> D> Thanks,
> D>  Deepal
> D> ................................................................
> D> ~Future is Open~
>
> D> ----- Original Message -----
> D> From: "Tomáš Procházka" <t....@centrum.cz>
> D> To: <ax...@ws.apache.org>; "Tomáš Procházka" <
> t.prochazka@centrum.cz>
> 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 <t....@centrum.cz>
> D>     Subject: HashMap return Long value
> D>        Date: Wednesday, January 25, 2006, 3:00:57 PM
> D> Attachments: <none>
> D>       msgid:1964620144.20060125150057@centrum.cz
>
> 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>>
> D> cz.atomsoft.bazartip.ws.SynchronizationSoapBindingStub.getMap(
> SynchronizationSoapBindingStub.java:206)
>
> 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="http://schemas.xmlsoap.org/soap/envelope/"
> TP>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> TP>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> TP>>   <soapenv:Body>
> TP>>     <ns1:getMapResponse
> TP>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> D> xmlns:ns1="urn:ws.bazartip.atomsoft.cz">
> TP>>       <getMapReturn href="#id0"/>
> TP>>     </ns1:getMapResponse>
> TP>>     <multiRef id="id0" soapenc:root="0"
> TP>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> D> xsi:type="ns2:Map"
> TP>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> TP>> xmlns:ns2="http://xml.apache.org/xml-soap">
> 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 ----------------------
>
>
> ----------------------- End of original message ----------------------
>
> --
> Tomas Prochazka
>
>

Re: HashMap return Long value

Posted by Tomáš Procházka <t....@centrum.cz>.
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.

 I tested it only Axis 1.3

 Axis 1.3 support HashMap?

 Axis 2.0 I never try yet.

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


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

D> ----- Original Message ----- 
D> From: "Tomáš Procházka" <t....@centrum.cz>
D> To: <ax...@ws.apache.org>; "Tomáš Procházka" <t....@centrum.cz>
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 <t....@centrum.cz>
D>     Subject: HashMap return Long value
D>        Date: Wednesday, January 25, 2006, 3:00:57 PM
D> Attachments: <none>
D>       msgid:1964620144.20060125150057@centrum.cz

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>> 
D> cz.atomsoft.bazartip.ws.SynchronizationSoapBindingStub.getMap(SynchronizationSoapBindingStub.java:206)

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="http://schemas.xmlsoap.org/soap/envelope/"
TP>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
TP>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
TP>>   <soapenv:Body>
TP>>     <ns1:getMapResponse
TP>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
D> xmlns:ns1="urn:ws.bazartip.atomsoft.cz">
TP>>       <getMapReturn href="#id0"/>
TP>>     </ns1:getMapResponse>
TP>>     <multiRef id="id0" soapenc:root="0"
TP>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
D> xsi:type="ns2:Map"
TP>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
TP>> xmlns:ns2="http://xml.apache.org/xml-soap">
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 ----------------------


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

-- 
 Tomas Prochazka


Re: HashMap return Long value

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Axis2 can not handle HashMap yet , I mean default Aixs2 MessageRecivers , 
but you can write your own message reciver to handle this case.

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

----- Original Message ----- 
From: "Tomáš Procházka" <t....@centrum.cz>
To: <ax...@ws.apache.org>; "Tomáš Procházka" <t....@centrum.cz>
Sent: Thursday, January 26, 2006 1:34 PM
Subject: Re: HashMap return Long value


Hi.

 No body has this problem?

 Exist another way to send Map via Axis?

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


-------------------------- Original message --------------------------
       From: Tomáš Procházka <t....@centrum.cz>
    Subject: HashMap return Long value
       Date: Wednesday, January 25, 2006, 3:00:57 PM
Attachments: <none>
      msgid:1964620144.20060125150057@centrum.cz

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> 
cz.atomsoft.bazartip.ws.SynchronizationSoapBindingStub.getMap(SynchronizationSoapBindingStub.java:206)

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 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
TP> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
TP> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
TP>   <soapenv:Body>
TP>     <ns1:getMapResponse
TP> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:ns1="urn:ws.bazartip.atomsoft.cz">
TP>       <getMapReturn href="#id0"/>
TP>     </ns1:getMapResponse>
TP>     <multiRef id="id0" soapenc:root="0"
TP> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xsi:type="ns2:Map"
TP> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
TP> xmlns:ns2="http://xml.apache.org/xml-soap">
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 
on the server side.



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

-- 
 Tomas Prochazka




Re: HashMap return Long value

Posted by Tomáš Procházka <t....@centrum.cz>.
Hi.

 No body has this problem?

 Exist another way to send Map via Axis?

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

-------------------------- Original message --------------------------
       From: Tomáš Procházka <t....@centrum.cz>
    Subject: HashMap return Long value
       Date: Wednesday, January 25, 2006, 3:00:57 PM
Attachments: <none>
      msgid:1964620144.20060125150057@centrum.cz

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> cz.atomsoft.bazartip.ws.SynchronizationSoapBindingStub.getMap(SynchronizationSoapBindingStub.java:206)

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 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
TP> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
TP> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
TP>   <soapenv:Body>
TP>     <ns1:getMapResponse
TP> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:ws.bazartip.atomsoft.cz">
TP>       <getMapReturn href="#id0"/>
TP>     </ns1:getMapResponse>
TP>     <multiRef id="id0" soapenc:root="0"
TP> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Map"
TP> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
TP> xmlns:ns2="http://xml.apache.org/xml-soap">
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 on the server side.



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

-- 
 Tomas Prochazka