@SuppressWarnings("unchecked")
public Message handleMessage(Packet packet,String payloadName) throws Exception{
Map<String, Object> invocationProperties = packet.invocationProperties;
boolean OUT_BOUND = invocationProperties.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY) != null &&
(Boolean)invocationProperties.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
SEIModel seiModel = this.codec.getSEIModel(packet);
JAXBContextImpl context = (JAXBContextImpl)seiModel.getJAXBContext();
Style style = seiModel.getPort().getBinding().getStyle();
if(!OUT_BOUND){
// Request message
// TODO when operation <input><json:body contains different namespace than port level name space bellow call fails to identify operation.
WSDLBoundOperation operation = seiModel.getPort().getBinding().getOperation(seiModel.getTargetNamespace(),payloadName);
if(operation == null || !packet.invocationProperties.containsKey(JSONCodec.JSON_MAP_KEY)){
throw new RuntimeException("Operation %s input parameter(s) not found or invalid.");
}
JavaMethod javaMethod = seiModel.getJavaMethod(operation.getName());
if(javaMethod == null && javaMethodAccessor != null){
javaMethod = (JavaMethod) javaMethodAccessor.invoke(seiModel, operation.getName());
}else{
// TODO iterate all method and find
}