Package org.jboss.ws.core.soap

Examples of org.jboss.ws.core.soap.SOAPMessageImpl.addAttachmentPart()


            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)
               {
                  DataHandler dataHandler = (DataHandler)value;
View Full Code Here


      if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + "]");

      String cid = soapMessage.getCidGenerator().generateFromName(xmlName.getLocalPart());
      AttachmentPart xopPart = soapMessage.createAttachmentPart(data);
      xopPart.addMimeHeader(MimeConstants.CONTENT_ID, '<' + cid + '>'); // RFC2392 requirement
      soapMessage.addAttachmentPart(xopPart);

      if(log.isDebugEnabled()) log.debug("Created attachment part " + cid + ", with content-type " + xopPart.getContentType());

      return "cid:" + cid;
   }
View Full Code Here

      SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();

      String cid = soapMessage.getCidGenerator().generateFromCount();
      AttachmentPart swaRefPart = soapMessage.createAttachmentPart(dataHandler);
      swaRefPart.addMimeHeader(MimeConstants.CONTENT_ID, '<' + cid + '>'); // RFC2392 requirement
      soapMessage.addAttachmentPart(swaRefPart);

      if(log.isDebugEnabled()) log.debug("Created attachment part " + cid + ", with content-type " + swaRefPart.getContentType());

      return "cid:" + cid;
   }
View Full Code Here

/*  73 */     String cid = soapMessage.getCidGenerator().generateFromName(xmlName.getLocalPart());
/*     */
/*  75 */     DataHandler dataHandler = XOPContext.createDataHandler(obj);
/*  76 */     AttachmentPart xopPart = soapMessage.createAttachmentPart(dataHandler);
/*  77 */     xopPart.addMimeHeader("Content-Id", '<' + cid + '>');
/*  78 */     soapMessage.addAttachmentPart(xopPart);
/*     */
/*  80 */     if (log.isDebugEnabled()) log.debug("Created attachment part " + cid + ", with content-type " + xopPart.getContentType());
/*     */
/*  82 */     return "cid:" + cid;
/*     */   }
View Full Code Here

/*  81 */     if (log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + "]");
/*     */
/*  83 */     String cid = soapMessage.getCidGenerator().generateFromName(xmlName.getLocalPart());
/*  84 */     AttachmentPart xopPart = soapMessage.createAttachmentPart(data);
/*  85 */     xopPart.addMimeHeader("Content-Id", '<' + cid + '>');
/*  86 */     soapMessage.addAttachmentPart(xopPart);
/*     */
/*  88 */     if (log.isDebugEnabled()) log.debug("Created attachment part " + cid + ", with content-type " + xopPart.getContentType());
/*     */
/*  90 */     return "cid:" + cid;
/*     */   }
View Full Code Here

/* 118 */     SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
/*     */
/* 120 */     String cid = soapMessage.getCidGenerator().generateFromCount();
/* 121 */     AttachmentPart swaRefPart = soapMessage.createAttachmentPart(dataHandler);
/* 122 */     swaRefPart.addMimeHeader("Content-Id", '<' + cid + '>');
/* 123 */     soapMessage.addAttachmentPart(swaRefPart);
/*     */
/* 125 */     if (log.isDebugEnabled()) log.debug("Created attachment part " + cid + ", with content-type " + swaRefPart.getContentType());
/*     */
/* 127 */     return "cid:" + cid;
/*     */   }
View Full Code Here

/*     */
/* 193 */         if (paramMetaData.isSwA())
/*     */         {
/* 196 */           CIDGenerator cidGenerator = reqMessage.getCidGenerator();
/* 197 */           AttachmentPart part = createAttachmentPart(paramMetaData, value, cidGenerator);
/* 198 */           reqMessage.addAttachmentPart(part);
/*     */
/* 201 */           if (((value instanceof DataHandler)) && ((msgContext instanceof MessageContextJAXWS)))
/*     */           {
/* 203 */             DataHandler dataHandler = (DataHandler)value;
/* 204 */             Map attachments = (Map)msgContext.get("javax.xml.ws.binding.attachments.outbound");
View Full Code Here

/*     */         }
/* 447 */         if (retMetaData.isSwA())
/*     */         {
/* 449 */           CIDGenerator cidGenerator = resMessage.getCidGenerator();
/* 450 */           AttachmentPart part = createAttachmentPart(retMetaData, value, cidGenerator);
/* 451 */           resMessage.addAttachmentPart(part);
/* 452 */           epInv.setReturnValue(part);
/*     */
/* 455 */           if ((part.getDataHandler() != null) && ((msgContext instanceof MessageContextJAXWS)))
/*     */           {
/* 457 */             DataHandler dataHandler = part.getDataHandler();
View Full Code Here

/* 474 */         Object value = epInv.getResponseParamValue(xmlName);
/* 475 */         if (paramMetaData.isSwA())
/*     */         {
/* 477 */           CIDGenerator cidGenerator = resMessage.getCidGenerator();
/* 478 */           AttachmentPart part = createAttachmentPart(paramMetaData, value, cidGenerator);
/* 479 */           resMessage.addAttachmentPart(part);
/*     */
/* 482 */           if (((value instanceof DataHandler)) && ((msgContext instanceof MessageContextJAXWS)))
/*     */           {
/* 484 */             DataHandler dataHandler = (DataHandler)value;
/* 485 */             Map attachments = (Map)msgContext.get("javax.xml.ws.binding.attachments.outbound");
View Full Code Here

            if (paramMetaData.isSwA())
            {
               // NOTE: swa:ref is handled by the AttachmentMarshaller callback
               CIDGenerator cidGenerator = reqMessage.getCidGenerator();
               AttachmentPart part = createAttachmentPart(paramMetaData, value, cidGenerator);
               reqMessage.addAttachmentPart(part);

               // Add the attachment to the standard property
               if (value instanceof DataHandler && msgContext instanceof MessageContextJAXWS)
               {
                  DataHandler dataHandler = (DataHandler)value;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.