Hi.
I switch sendMultiRefs in server-config.wsdd to false and Axis right return
boolean value.
-------------------------- Original message --------------------------
From: Tomáš Procházka <[EMAIL PROTECTED]>
Subject: again return Long value
Date: Monday, February 20, 2006, 10:56:36 PM
Attachments: <none>
msgid:[EMAIL PROTECTED]
TP> Hi.
TP> I have again the same problem with AXIS 1.3 and I can't find reason for it.
TP> I make server class Synchronisation with method
TP> public boolean authorize(String name,String password,double
client_version) {
TP> return true;
TP> }
TP> with ANT task I create from it WSDL file and consecutively client side
class with method authorize.
TP> In client side class Synchronisation.java is this
TP> public boolean authorize(java.lang.String name, java.lang.String
password, double
TP> client_version) throws java.rmi.RemoteException;
TP> This is OK, when I call it:
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:authorizeResponse
TP> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="urn:ws.bazartip.atomsoft.cz">
TP> <authorizeReturn href="#id0"/>
TP> </ns1:authorizeResponse>
TP> <multiRef id="id0" soapenc:root="0"
TP> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
TP> xsi:type="xsd:boolean"
TP> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">true</multiRef>
TP> </soapenv:Body>
TP> </soapenv:Envelope>
TP> Why this is too complicated?
TP> And when I use it, call this SOAP method fail with this error:
TP> java.lang.ClassCastException: java.lang.Long cannot be cast to
java.lang.Boolean
TP> at
TP>
cz.atomsoft.bazartip.ws.SynchronizationSoapBindingStub.authorize(SynchronizationSoapBindingStub.java:231)
TP> at
cz.atomsoft.bazartip.wservices.SynchroThread.synchro(SynchroThread.java:120)
TP> at cz.atomsoft.bazartip.wservices.SynchroThread.run(SynchroThread.java:87)
TP>
TP> This line of code:
TP> java.lang.Object _resp = _call.invoke(new java.lang.Object[] {name,
password, new java.lang.Double(client_version)});
TP> return to _resp Long value. Why?
TP> I had the same problem with HashMap, when I try return them.
TP> Nobody has the same problem?
----------------------- End of original message ----------------------
--
Tomas Prochazka