component.addExtensibilityElement(soapBodyExtensibilityElement);
//add the header
} else if (SOAPConstants.Q_ELEM_SOAP_HEADER.equals(
wsdl4jElement.getElementType())) {
SOAPHeader soapHeader = (SOAPHeader) wsdl4jElement;
org.apache.wsdl.extensions.SOAPHeader soapHeaderExtensibilityElement = (org.apache.wsdl.extensions.SOAPHeader) extensionFactory.getExtensionElement(
soapHeader.getElementType());
soapHeaderExtensibilityElement.setNamespaceURI(
soapHeader.getNamespaceURI());
soapHeaderExtensibilityElement.setUse(soapHeader.getUse());
Boolean required = soapHeader.getRequired();
if (null != required) {
soapHeaderExtensibilityElement.setRequired(required.booleanValue());
}
if (null!=wsdl4jDefinition){
//find the relevant schema part from the messages
Message msg = wsdl4jDefinition.getMessage(soapHeader.getMessage());
Part msgPart = msg.getPart(soapHeader.getPart());
soapHeaderExtensibilityElement.setElement(msgPart.getElementName());
}
soapHeaderExtensibilityElement.setMessage(soapHeader.getMessage());
soapHeaderExtensibilityElement.setPart(soapHeader.getPart());
soapHeader.getMessage();
component.addExtensibilityElement(soapHeaderExtensibilityElement);
} else if (SOAPConstants.Q_ELEM_SOAP_BINDING.equals(
wsdl4jElement.getElementType())) {
SOAPBinding soapBinding = (SOAPBinding) wsdl4jElement;
org.apache.wsdl.extensions.SOAPBinding soapBindingExtensibilityElement = (org.apache.wsdl.extensions.SOAPBinding) extensionFactory.getExtensionElement(