}
/*
* Setting the policy of the operation
*/
WSDLEndpoint endpoint = infoHolder.getPort();
if (endpoint != null) {
Policy policy = attachmentUtil.getOperationPolicy(endpoint.getName(), operation.getName());
if (policy != null) {
addAttribute(doc, "policy", PolicyUtil.getPolicyAsString(policy), methodElement);
}
}
methodElement.appendChild(getInputElement(doc, operation, soapHeaderInputParameterList));
methodElement.appendChild(getOutputElement(doc, operation, soapHeaderOutputParameterList));
rootElement.appendChild(methodElement);
//////////////////////
}else{
//mep is present - we move ahead only if the given mep matches the mep of this operation
if (mep.equals(operation.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 = operation.getName().getLocalPart();
addAttribute(doc, "name", localPart, methodElement);
addAttribute(doc, "namespace", operation.getName().getNamespaceURI(), methodElement);
addAttribute(doc, "style", operation.getStyle(), methodElement);
addAttribute(doc, "dbsupportname", portTypeName + localPart + DATABINDING_SUPPORTER_NAME_SUFFIX,
methodElement);
addAttribute(doc, "mep", operation.getMessageExchangePattern(), methodElement);
if (null != binding) {
WSDLBindingOperation bindingOperation = binding.getBindingOperation(operation.getName());
// todo This can be a prob !!!!!
if (bindingOperation != null) {
addSOAPAction(doc, methodElement, bindingOperation);
addHeaderOperations(soapHeaderInputParameterList, bindingOperation, true);
addHeaderOperations(soapHeaderOutputParameterList, bindingOperation, false);
}
}
/*
* Setting the policy of the operation
*/
WSDLEndpoint endpoint = infoHolder.getPort();
Policy policy = attachmentUtil.getOperationPolicy(endpoint.getName(), operation.getName());
if (policy != null) {
addAttribute(doc, "policy", PolicyUtil.getPolicyAsString(policy), methodElement);
}