Examples of addMimeHeader()


Examples of javax.xml.soap.AttachmentPart.addMimeHeader()

                    AttachmentPart ap = soapMessage.createAttachmentPart(a.getDataHandler());
                    Iterator<String> i = a.getHeaderNames();
                    while (i != null && i.hasNext()) {
                        String h = i.next();
                        String val = a.getHeader(h);
                        ap.addMimeHeader(h, val);
                    }
                    if (StringUtils.isEmpty(ap.getContentId())) {
                        ap.setContentId(a.getId());
                    }
                    soapMessage.addAttachmentPart(ap);
View Full Code Here

Examples of javax.xml.soap.AttachmentPart.addMimeHeader()

        // The receiver should be smart enough to use the content id
        // to establish the correct order
        ByteArrayInputStream bais2 = new ByteArrayInputStream(bytes2);
        AttachmentPart attachment2 = request.createAttachmentPart();
        attachment2.setContentId("jpegImage2Request=SWAMTOMTestSOAPMessage");
        attachment2.addMimeHeader("FVT-source", "STR_BODY_ELEMENT_1");
        attachment2.setRawContent(bais2, "text/plain");
        request.addAttachmentPart(attachment2);
       
        ByteArrayInputStream bais1 = new ByteArrayInputStream(bytes1);
        AttachmentPart attachment1 = request.createAttachmentPart();
View Full Code Here

Examples of javax.xml.soap.AttachmentPart.addMimeHeader()

        request.addAttachmentPart(attachment2);
       
        ByteArrayInputStream bais1 = new ByteArrayInputStream(bytes1);
        AttachmentPart attachment1 = request.createAttachmentPart();
        attachment1.setContentId("jpegImage1Request=SWAMTOMTestSOAPMessage");
        attachment1.addMimeHeader("FVT-source", "STR_BODY_ELEMENT_1");
        attachment1.setRawContent(bais1, "text/plain");
        request.addAttachmentPart(attachment1);

        // invoke
        SOAPMessage reply = dispatch.invoke(request);
View Full Code Here

Examples of javax.xml.soap.AttachmentPart.addMimeHeader()

       
       
        ByteArrayInputStream bais1 = new ByteArrayInputStream(bytes1);
        AttachmentPart attachment1 = request.createAttachmentPart();
        attachment1.setContentId("notCompliant1SWAMTOMTestSOAPMessage");
        attachment1.addMimeHeader("FVT-source", "STR_BODY_ELEMENT_1");
        attachment1.setRawContent(bais1, "text/plain");
        request.addAttachmentPart(attachment1);
       
        ByteArrayInputStream bais2 = new ByteArrayInputStream(bytes2);
        AttachmentPart attachment2 = request.createAttachmentPart();
View Full Code Here

Examples of javax.xml.soap.AttachmentPart.addMimeHeader()

        request.addAttachmentPart(attachment1);
       
        ByteArrayInputStream bais2 = new ByteArrayInputStream(bytes2);
        AttachmentPart attachment2 = request.createAttachmentPart();
        attachment2.setContentId("notCompliant2SWAMTOMTestSOAPMessage");
        attachment2.addMimeHeader("FVT-source", "STR_BODY_ELEMENT_1");
        attachment2.setRawContent(bais2, "text/plain");
        request.addAttachmentPart(attachment2);

        // invoke
        SOAPMessage reply = dispatch.invoke(request);
View Full Code Here

Examples of javax.xml.soap.AttachmentPart.addMimeHeader()

      String cid = soapMessage.getCidGenerator().generateFromName(xmlName.getLocalPart());

      DataHandler dataHandler = XOPContext.createDataHandler(obj);
      AttachmentPart xopPart = soapMessage.createAttachmentPart(dataHandler);
      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

Examples of javax.xml.soap.AttachmentPart.addMimeHeader()

                    ap.setContentId(a.getId());
                    Iterator<String> i = a.getHeaderNames();
                    while (i != null && i.hasNext()) {
                        String h = i.next();
                        String val = a.getHeader(h);
                        ap.addMimeHeader(h, val);
                    }
                    soapMessage.addAttachmentPart(ap);
                }
            }
           
View Full Code Here

Examples of javax.xml.soap.AttachmentPart.addMimeHeader()

                    AttachmentPart ap = soapMessage.createAttachmentPart(a.getDataHandler());
                    Iterator<String> i = a.getHeaderNames();
                    while (i != null && i.hasNext()) {
                        String h = i.next();
                        String val = a.getHeader(h);
                        ap.addMimeHeader(h, val);
                    }
                    if (StringUtils.isEmpty(ap.getContentId())) {
                        ap.setContentId(a.getId());
                    }
                    soapMessage.addAttachmentPart(ap);
View Full Code Here

Examples of javax.xml.soap.AttachmentPart.addMimeHeader()

      QName xmlName = new QName(elementNamespace, elementLocalName);
      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

Examples of javax.xml.soap.AttachmentPart.addMimeHeader()

      CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
      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
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.