addHeaderOperations(soapHeaderInputParameterList, axisOperation, true);
//add header ops for output
addHeaderOperations(soapHeaderOutputParameterList, axisOperation, false);
PolicyInclude policyInclude = axisOperation.getPolicyInclude();
Policy policy = policyInclude.getPolicy();
if (policy != null) {
addAttribute(doc, "policy", PolicyUtil.getPolicyAsString(policy), methodElement);
}
methodElement.appendChild(getInputElement(doc, axisOperation, soapHeaderInputParameterList));
methodElement.appendChild(getOutputElement(doc, axisOperation, soapHeaderOutputParameterList));
methodElement.appendChild(getFaultElement(doc, axisOperation));
rootElement.appendChild(methodElement);
} else {
//mep is present - we move ahead only if the given mep matches the mep of this operation
if (mep.equals(axisOperation.getMessageExchangePattern())) {
//at this point we know it's true
opsFound = true;
List soapHeaderInputParameterList = new ArrayList();
List soapHeaderOutputParameterList = new ArrayList();
methodElement = doc.createElement("method");
String localPart = axisOperation.getName().getLocalPart();
addAttribute(doc, "name", localPart, methodElement);
addAttribute(doc, "namespace", axisOperation.getName().getNamespaceURI(), methodElement);
addAttribute(doc, "style", axisOperation.getStyle(), methodElement);
addAttribute(doc, "dbsupportname", portTypeName + localPart + DATABINDING_SUPPORTER_NAME_SUFFIX,
methodElement);
addAttribute(doc, "mep", axisOperation.getMessageExchangePattern(), methodElement);
addSOAPAction(doc, methodElement, axisOperation);
addHeaderOperations(soapHeaderInputParameterList, axisOperation, true);
addHeaderOperations(soapHeaderOutputParameterList, axisOperation, false);
/*
* Setting the policy of the operation
*/
Policy policy = axisOperation.getPolicyInclude().getPolicy();
if (policy != null) {
addAttribute(doc, "policy",
PolicyUtil.getPolicyAsString(policy),
methodElement);
}