msgContext.setTargetService(SOAPAction);
// Construct the soap request
SOAPEnvelope envelope = new SOAPEnvelope();
msgContext.setRequestMessage(new Message(envelope));
RPCElement body = new RPCElement(methodNS, method, parms);
envelope.addBodyElement(body);
// Invoke the Axis engine
engine.invoke(msgContext);
// Extract the response Envelope
Message message = msgContext.getResponseMessage();
envelope = (SOAPEnvelope)message.getSOAPPart().getAsSOAPEnvelope();
assertNotNull("SOAP envelope was null", envelope);
// Extract the body from the envelope
body = (RPCElement)envelope.getFirstBody();
assertNotNull("SOAP body was null", body);
// Extract the list of parameters from the body
Vector arglist = body.getParams();
assertNotNull("SOAP argument list was null", arglist);
if (arglist.size()==0) return null;
// Return the first parameter
RPCParam param = (RPCParam) arglist.get(0);