0 Replies Latest reply on Dec 27, 2019 4:58 AM by bhprasanna

    Unable to send attachment in soap response- JBOSS 6.4 EAP

    bhprasanna

      Hi All, Need help in resolving below given problem statement, this is very critical for my project delivery.

       

      Problem Statement : While migrating JAX-RPC Service from Weblogic10.3 to JBOSS 6.4 EAP . Service returns MIME attachments(images) in SOAP response which are not referenced in WSDL. This works well in Weblogic butsame code (removed weblogic library references in the code) migrated to JBOSS it is not returning attachments. We have restriction not to change WSDL and service client so unable to use MTOM feature.

       

      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);