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