0 Replies Latest reply on Dec 11, 2019 10:31 AM by amitgadre

    Unable to send attachment in soap response

    amitgadre

      I am migrating JAX-WS Service from Weblogic to JBOSS. Service returns MIME attachments(images) in soap response which are not referenced in WSDL. This works well in weblogic but same code migrated to JBOSS it is not returning attachments. I have restriction not to change WSDL and service client so unable to use MTOM feature.

      has anyone faced similar issue before ?

      I am Using JBOSS 6.4 EAP

      Attachments are handled by custom SOAPHandler

      AttachmentPart attachmentPart = message.createAttachmentPart(); 
      attachmentPart.setDataHandler(newDataHandler(new ImageDataSource(id,(ByteArrayInputStream)attachmentsStore.get(id))));
      attachmentPart.setContentType(contentType);
      attachmentPart.setContentId(id);
      message.addAttachmentPart(attachmentPart);
      aMessageContext.setMessage(message);