Actually a small correction to my email.
It's incorrect to say that there is a bug within RPCMessageReceiver,java as it is only where the problem is visible. A closer look at the code reveals that
AxisMessage inAxisMessage = op.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
inAxisMessage is not filled properly with the nessacery data from the incomming SOAP message. More specifically getElementQName() returns null.
if (inAxisMessage.getElementQName() == null) {
// method accept empty SOAPbody
resObject = method.invoke(obj, new Object[0]);
// method accept empty SOAPbody
resObject = method.invoke(obj, new Object[0]);
So I am wondering if something is wrong with my SOAP message.
However the element soapBody is present in my SOAP message.
Comments??
Regards,
Rajith
On 7/28/06, Rajith Attapattu <[EMAIL PROTECTED]> wrote:
Hi,
I have specified the RPCMessageReceiver as the Message Receiver in my services.xml.
The target method is "String greet(String name)"
When I send a request from my client, Axis2 throws anjava.lang.IllegalArgumentException: wrong number of arguments as the message receiver tries to invoked the above method with no arguments.When I remote debug it it looks like it has failed to parse the SOAP message properly for arguments and hence it is invoking with no arguments.So it looks likea) Something is wrong with my SOAP messsageb) there could be a bug within the RPCMessageReceiver.What could be wrong?The exception occurs within the following highlighted code segment in the RPCMessageReceiver.java, and the method is invokeBusinessLogic.
Object resObject = null;
if (inAxisMessage != null) {
if (inAxisMessage.getElementQName() == null) {
// method accept empty SOAPbody
resObject = method.invoke(obj, new Object[0]);
} else {
The SOAP body is not empty, following is the SOAP message I sent from the client.
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ "><soapenv:Header /><soapenv:Body><ns1:greet xmlns:ns1=" http://axis2/sample/namespace1 "><ns1:name>Rajith</ns1:name></ns1:greet></soapenv:Body></soapenv:Envelope>
Regards,Rajith