OMAttribute operationNS = policy.getAttribute(
new QName(XMLConfigConstants.NULL_NAMESPACE, "operationNamespace"));
if (key != null) {
PolicyInfo pi = new PolicyInfo(key.getAttributeValue());
if (type != null && type.getAttributeValue() != null) {
if ("in".equals(type.getAttributeValue())) {
pi.setType(PolicyInfo.MESSAGE_TYPE_IN);
} else if ("out".equals(type.getAttributeValue())) {
pi.setType(PolicyInfo.MESSAGE_TYPE_OUT);
} else {
handleException("Undefined policy type for the policy with key : "
+ key.getAttributeValue());
}
}
if (operationName != null && operationName.getAttributeValue() != null) {
if (operationNS != null && operationNS.getAttributeValue() != null) {
pi.setOperation(new QName(operationNS.getAttributeValue(),
operationName.getAttributeValue()));
} else {
pi.setOperation(new QName(operationName.getAttributeValue()));
}
}
proxy.addPolicyInfo(pi);