throw new RuntimeException("Problem with WSDL: mime content element in operation "
+ bmsg.getBindingOperation().getName().getLocalPart()
+ " does not specify a part.");
}
MessagePartInfo mpi =
msg.getMessagePart(new QName(msg.getName().getNamespaceURI(),
partName));
mpi.setProperty(Message.CONTENT_TYPE, mc.getType());
attParts.add(mpi);
// Attachments shouldn't be part of the body message
bmsg.getMessageParts().remove(mpi);
} else if (SOAPBindingUtil.isSOAPBody(content)) {
SoapBody sb = SOAPBindingUtil.getSoapBody(content);
if (sb.getParts() != null && sb.getParts().size() == 1) {
partName = (String) sb.getParts().get(0);
}
// We can have a list of empty part names here.
if (partName != null) {
addSoapBodyPart(msg, bodyParts, partName);
}
} else if (SOAPBindingUtil.isSOAPHeader(content)) {
SoapHeader header = SOAPBindingUtil.getSoapHeader(content);
SoapHeaderInfo headerInfo = new SoapHeaderInfo();
headerInfo.setUse(header.getUse());
if (StringUtils.isEmpty(header.getPart())) {
throw new RuntimeException("Problem with WSDL: soap:header element in operation "
+ bmsg.getBindingOperation().getName().getLocalPart()
+ " does not specify a part.");
}
MessagePartInfo mpi =
msg.getMessagePart(new QName(msg.getName().getNamespaceURI(),
header.getPart()));
if (mpi != null && header.getMessage() != null
&& !mpi.getMessageInfo().getName().equals(header.getMessage())) {
mpi = null;
//out of band, let's find it
for (MessagePartInfo mpi2 : msg.getOutOfBandParts()) {
if (mpi2.getName().getLocalPart().equals(header.getPart())
&& mpi2.getMessageInfo().getName().equals(header.getMessage())) {