Iterator<WsdlPortType> iterator = wsdl.portTypes().iterator();
while (iterator.hasNext()) {
WsdlPortType portType = iterator.next();
Iterator<WsdlPortTypeOperation> operations = portType.operations().iterator();
while (operations.hasNext()) {
WsdlPortTypeOperation operation = operations.next();
WsdlMessagePart leadHeaderPart = new WsdlMessagePart(LEAD_HEADER);
leadHeaderPart.setName(LEAD_HEADER);
// we hand set this element to xml because when you use the
// API it doent add the namespace correctly
leadHeaderPart.xml().setAttributeValue(ELEMENT, LC_CONTEXT);
wsdl.getMessage(operation.getInput().getMessage().getLocalPart()).addPart(leadHeaderPart);
}
}
Iterator<WsdlBinding> bindingItr = wsdl.bindings().iterator();
while (bindingItr.hasNext()) {