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 <[EMAIL PROTECTED]> wrote:
Hi.

I'm sorry, I wrote to personal address.
Anne Thomas Manes <[EMAIL PROTECTED]> 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=""
    </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 <[EMAIL PROTECTED] >
    Subject: HashMap return Long value
       Date: Thursday, January 26, 2006, 1:54:04 PM
Attachments: <none>
      msgid:[EMAIL PROTECTED]

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 <[EMAIL PROTECTED]>
TP>     Subject: HashMap return Long value
TP>        Date: Thursday, January 26, 2006, 1:04:15 PM
TP> Attachments: Zpráva.html
TP>       msgid:[EMAIL PROTECTED]

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 < [EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
A>>     Subject: HashMap return Long value
A>>        Date: Thursday, January 26, 2006, 12:16:40 PM
A>> Attachments: <none>
A>>       msgid:[EMAIL PROTECTED]


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

D>>> ----- Original Message -----
D>>> From: "Tomáš Procházka" <[EMAIL PROTECTED] >
D>>> To: < [email protected]>; "Tomáš Procházka" <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED] >
D>>>     Subject: HashMap return Long value
D>>>        Date: Wednesday, January 25, 2006, 3:00:57 PM
D>>> Attachments: <none>
D>>>       msgid: [EMAIL PROTECTED]

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="">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


Reply via email to