SoapBody soapBody = SOAPBindingUtil.getSoapBody(ext);
use = soapBody.getUse();
}
if (SOAPBindingUtil.isSOAPHeader(ext)) {
SoapHeader soapHeader = SOAPBindingUtil.getSoapHeader(ext);
boolean found = false;
for (JavaParameter parameter : jm.getParameters()) {
if (soapHeader.getPart().equals(parameter.getPartName())) {
setParameterAsHeader(parameter);
found = true;
}
}
if (Boolean.valueOf((String)context.get(ToolConstants.CFG_EXTRA_SOAPHEADER)).booleanValue()
&& !found) {
// Header can't be found in java method parameters, in
// different message
// other than messages used in porttype operation
ParameterProcessor processor = new ParameterProcessor(context);
MessagePartInfo exPart = service.getMessage(soapHeader.getMessage())
.getMessagePart(new QName(soapHeader.getMessage().getNamespaceURI(),
soapHeader.getPart()));
JavaType.Style jpStyle = JavaType.Style.IN;
if (isInOutParam(soapHeader.getPart(), operation.getOutput())) {
jpStyle = JavaType.Style.INOUT;
}
JavaParameter jp = processor.addParameterFromBinding(jm, exPart, jpStyle);
if (soapHeader.getPart() != null && soapHeader.getPart().length() > 0) {
jp.getAnnotation().addArgument("partName", soapHeader.getPart());
}
setParameterAsHeader(jp);
}
}
if (ext instanceof MIMEMultipartRelated && jm.enableMime()) {
MIMEProcessor mimeProcessor = new MIMEProcessor(context);
mimeProcessor.process(jm, (MIMEMultipartRelated)ext, JavaType.Style.IN);
}
}
// process output
if (operation.getOutput() != null) {
List<ExtensibilityElement> outbindings =
operation.getOutput().getExtensors(ExtensibilityElement.class);
if (outbindings == null) {
outbindings = new ArrayList<ExtensibilityElement>();
}
for (ExtensibilityElement ext : outbindings) {
if (SOAPBindingUtil.isSOAPHeader(ext)) {
SoapHeader soapHeader = SOAPBindingUtil.getSoapHeader(ext);
boolean found = false;
for (JavaParameter parameter : jm.getParameters()) {
if (soapHeader.getPart().equals(parameter.getPartName())) {
setParameterAsHeader(parameter);
found = true;
}
}
if (jm.getReturn().getName().equals(soapHeader.getPart())) {
found = true;
}
if (Boolean.valueOf((String)context.get(ToolConstants.CFG_EXTRA_SOAPHEADER))
&& !found) {
// Header can't be found in java method parameters, in
// different message
// other than messages used in porttype operation
ParameterProcessor processor = new ParameterProcessor(context);
MessagePartInfo exPart = service.getMessage(soapHeader.getMessage())
.getMessagePart(new QName(soapHeader.getMessage().getNamespaceURI(),
soapHeader.getPart()));
JavaParameter jp = processor.addParameterFromBinding(jm, exPart, JavaType.Style.OUT);
setParameterAsHeader(jp);
}
}
if (ext instanceof MIMEMultipartRelated && jm.enableMime()) {