Hi,
I haven't realized the whole problem, when I submitted the mail with subject
'Problem with deserealizing boolean'. In fact, I can't invoke any method
with more than a single argument, independent of the arguments' (simple)
type! A java.lang.IllegalArgumentException is thrown, because only the first
value can be deseserialized:
"Tried to invoke method public java.lang.String
test.server.TestSoapBindingImpl.printLongs(long,long) with arguments
java.lang.Long,null. The arguments do not match the signature."
Here's an example of a simple web service, that takes two longs and should
return a string.
At the end of the mail I copied a part of Axis' log file, where only the
first argument of printLongs is properly converted before the exception is
thrown.
I would be really glad, if someone could give me a hint of what I'm doing
wrong. ;-)
BTW, I'm using Axis 1.2RC2, Tomcat 5.0.19 and JDK 1.5 on Win XP.
Bye, Dave
-------------------------
service implementation
------------------------
public class TestSoapBindingImpl implements test.server.Test{
public String printLongs(long long_1, long long_2){
return "long_1 = " +long_1 +", long_2 = " +long_2;
}
}
--------------------
client
--------------------
public class TestClient {
public static void main (String[] args) throws Exception {
TestService service = new TestServiceLocator();
Test testProxy = service.gettest();
long longVal = 1L;
response = testProxy.printLongs(longVal, longVal);
System.out.println(response);
}
}
--------------------
SOAP messsage
--------------------
<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>
<in6 xmlns="urn:TestNS">1</in6>
<in7 xmlns="urn:TestNS">1</in7>
</soapenv:Body>
</soapenv:Envelope>
-----------------
Axis' log file
-----------------
...
17555 org.apache.axis.message.SAXOutputter
- SAXOutputter.startElement ['urn:TestNS' in6]
17555 org.apache.axis.i18n.ProjectResourceBundle
- org.apache.axis.i18n.resource::handleGetObject(startElem00)
17555 org.apache.axis.encoding.SerializationContext
- Start element [urn:TestNS]:in6
17555 org.apache.axis.message.SAXOutputter
- SAXOutputter.characters ['1']
17766 org.apache.axis.message.SAXOutputter
- SAXOutputter.endElement ['urn:TestNS' in6]
17766 org.apache.axis.i18n.ProjectResourceBundle
- org.apache.axis.i18n.resource::handleGetObject(endElem00)
17766 org.apache.axis.encoding.SerializationContext
- End element in6
17766 org.apache.axis.i18n.ProjectResourceBundle
- org.apache.axis.i18n.resource::handleGetObject(empty00)
17766 org.apache.axis.utils.NSStack
- NSPop (empty)
17766 org.apache.axis.i18n.ProjectResourceBundle
- org.apache.axis.i18n.resource::handleGetObject(bodyIs00)
17766 org.apache.axis.providers.java.RPCProvider
- body is <in6 xmlns="urn:TestNS">1</in6>
17766 org.apache.axis.i18n.ProjectResourceBundle
- org.apache.axis.i18n.resource::handleGetObject(pushHandler00)
17766 org.apache.axis.encoding.DeserializationContext
- Pushing handler [EMAIL PROTECTED]
17766 org.apache.axis.encoding.DeserializationContext
- Enter: DeserializationContext::startPrefixMapping(, urn:TestNS)
17766 org.apache.axis.utils.NSStack
- NSPush (32)
17766 org.apache.axis.utils.NSStack
- NSPush (32)
17766 org.apache.axis.encoding.DeserializationContext
- Exit: DeserializationContext::startPrefixMapping()
17766 org.apache.axis.encoding.DeserializationContext
- Enter: DeserializationContext::startElement(urn:TestNS, in6)
17766 org.apache.axis.message.RPCHandler
- Enter: RPCHandler.onStartChild()
17766 org.apache.axis.i18n.ProjectResourceBundle
- org.apache.axis.i18n.resource::handleGetObject(typeFromAttr00)
17766 org.apache.axis.message.RPCHandler
- Type from attributes is: null
17876 org.apache.axis.message.RPCHandler
- Exit: RPCHandler.onStartChild()
17886 org.apache.axis.i18n.ProjectResourceBundle
- org.apache.axis.i18n.resource::handleGetObject(pushHandler00)
17886 org.apache.axis.encoding.DeserializationContext
- Pushing handler
[EMAIL PROTECTED]
17886 org.apache.axis.encoding.DeserializationContext
- Exit: DeserializationContext::startElement()
17886 org.apache.axis.encoding.DeserializationContext
- Enter: DeserializationContext::endElement(urn:TestNS, in6)
17886 org.apache.axis.i18n.ProjectResourceBundle
- org.apache.axis.i18n.resource::handleGetObject(popHandler00)
17886 org.apache.axis.encoding.DeserializationContext
- Popping handler
[EMAIL PROTECTED]
17886 org.apache.axis.i18n.ProjectResourceBundle
- org.apache.axis.i18n.resource::handleGetObject(setValueInTarget00)
17886 org.apache.axis.encoding.DeserializerImpl
- Set value 1 in target
[EMAIL PROTECTED]
17886 org.apache.axis.i18n.ProjectResourceBundle
- org.apache.axis.i18n.resource::handleGetObject(empty00)
17886 org.apache.axis.utils.NSStack
- NSPop (empty)
17886 org.apache.axis.encoding.DeserializationContext
- Popped element stack to org.apache.axis.message.SOAPBody:Body
17886 org.apache.axis.encoding.DeserializationContext
- Exit: DeserializationContext::endElement()
17886 org.apache.axis.i18n.ProjectResourceBundle
- org.apache.axis.i18n.resource::handleGetObject(convert00)
17886 org.apache.axis.utils.JavaUtils
- Trying to convert java.lang.Long to long
17886 org.apache.axis.i18n.ProjectResourceBundle
- org.apache.axis.i18n.resource::handleGetObject(value00)
17886 org.apache.axis.providers.java.RPCProvider
- value: 1
17886 org.apache.axis.i18n.ProjectResourceBundle
- org.apache.axis.i18n.resource::handleGetObject(dispatchIAE00)
17986 org.apache.axis.providers.java.RPCProvider
- Tried to invoke method public java.lang.String
test.server.TestSoapBindingImpl.printLongs(long,long) with arguments
java.lang.Long,null. The arguments do not match the signature.
java.lang.IllegalArgumentException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:384
)
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:2
81)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:450)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:653)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:
301)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
...