if (opMetaData.isDocumentWrapped())
value = ParameterWrapping.wrapResponseParameters(retMetaData, value, epInv.getOutParameters());
if (retMetaData.isSwA())
{
CIDGenerator cidGenerator = resMessage.getCidGenerator();
AttachmentPart part = createAttachmentPart(retMetaData, value, cidGenerator);
resMessage.addAttachmentPart(part);
epInv.setReturnValue(part);
// Add the attachment to the standard property
if (part.getDataHandler() != null && msgContext instanceof MessageContextJAXWS)
{
DataHandler dataHandler = part.getDataHandler();
Map<String, DataHandler> attachments = (Map<String, DataHandler>)msgContext.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
attachments.put(part.getContentId(), dataHandler);
}
}
else
{
SOAPContentElement soapElement = addParameterToMessage(retMetaData, value, soapBodyElement);
epInv.setReturnValue(soapElement);
soapElement.setObjectValue(value);
}
}
// Add the out parameters to the message
for (ParameterMetaData paramMetaData : opMetaData.getOutputParameters())
{
QName xmlName = paramMetaData.getXmlName();
Object value = epInv.getResponseParamValue(xmlName);
if (paramMetaData.isSwA())
{
CIDGenerator cidGenerator = resMessage.getCidGenerator();
AttachmentPart part = createAttachmentPart(paramMetaData, value, cidGenerator);
resMessage.addAttachmentPart(part);
// Add the attachment to the standard property
if (value instanceof DataHandler && msgContext instanceof MessageContextJAXWS)