private int isNonWrappable(BindingOperationInfo bop) {
QName operationName = bop.getName();
MessageInfo bodyMessage = null;
QName headerMessage = null;
SoapHeader header = null;
boolean containParts = false;
boolean isSameMessage = false;
boolean isNonWrappable = false;
boolean allPartsHeader = false;
int result = this.noHEADER;
// begin process input
if (bop.getInput() != null
&& bop.getInput().getExtensors(ExtensibilityElement.class) != null) {
List<ExtensibilityElement> extensors = bop.getInput().getExtensors(ExtensibilityElement.class);
if (extensors != null) {
for (ExtensibilityElement ext : extensors) {
if (SOAPBindingUtil.isSOAPBody(ext)) {
bodyMessage = getMessage(operationName, true);
}
if (SOAPBindingUtil.isSOAPHeader(ext)) {
header = SOAPBindingUtil.getSoapHeader(ext);
headerMessage = header.getMessage();
if (header.getPart().length() > 0) {
containParts = true;
}
}
}
}
if (headerMessage != null && bodyMessage != null
&& headerMessage.getNamespaceURI().equalsIgnoreCase(bodyMessage.getName().getNamespaceURI())
&& headerMessage.getLocalPart().equalsIgnoreCase(bodyMessage.getName().getLocalPart())) {
isSameMessage = true;
}
isNonWrappable = isSameMessage && containParts;
// if is nonwrapple then return
if (isNonWrappable) {
result = this.inHEADER;
}
}
isSameMessage = false;
containParts = false;
// process output
if (bop.getOutput() != null && bop.getOutput().getExtensors(ExtensibilityElement.class) != null) {
List<ExtensibilityElement> extensors = bop.getOutput().getExtensors(ExtensibilityElement.class);
if (extensors != null) {
for (ExtensibilityElement ext : extensors) {
if (SOAPBindingUtil.isSOAPBody(ext)) {
bodyMessage = getMessage(operationName, false);
}
if (SOAPBindingUtil.isSOAPHeader(ext)) {
header = SOAPBindingUtil.getSoapHeader(ext);
headerMessage = header.getMessage();
if (header.getPart().length() > 0) {
containParts = true;
}
}
}
}