AxisOperation op = inMessage.getOperationContext().getAxisOperation();
AxisService service = inMessage.getAxisService();
OMElement methodElement = inMessage.getEnvelope().getBody()
.getFirstElement();
OMNamespace namespace = methodElement.getNamespace();
if (namespace==null || !service.getSchematargetNamespace().equals(namespace.getName())) {
throw new AxisFault("namespace mismatch require " +
service.getSchematargetNamespace() +
" found " + methodElement.getNamespace().getName());
}
String methodName = op.getName().getLocalPart();
Method[] methods = ImplClass.getMethods();
for (int i = 0; i < methods.length; i++) {
if (methods[i].getName().equals(methodName)) {
this.method = methods[i];
break;
}
}
Object[] objectArray = processRequest(methodElement);
Object resObject = method.invoke(obj, objectArray);
SOAPFactory fac = getSOAPFactory(inMessage);
// Handling the response
OMNamespace ns = fac.createOMNamespace(service.getSchematargetNamespace(),
service.getSchematargetNamespacePrefix());
SOAPEnvelope envelope = fac.getDefaultEnvelope();
OMElement bodyContent = null;
if (resObject instanceof Object[]) {