String reqNamespace = targetNamespace;
String respNamespace = targetNamespace;
if(binding != null && Style.RPC.equals(binding.getBinding().getStyle())){
QName opQName = new QName(binding.getBinding().getPortTypeName().getNamespaceURI(), operationName);
WSDLBoundOperation op = binding.getBinding().get(opQName);
if(op != null){
//it cant be null, but lets not fail and try to work with service namespce
if(op.getRequestNamespace() != null){
reqNamespace = op.getRequestNamespace();
}
//it cant be null, but lets not fail and try to work with service namespce
if(op.getResponseNamespace() != null){
respNamespace = op.getResponseNamespace();
}
}
}
QName reqElementName = new QName(reqNamespace, operationName);