Package org.apache.axiom.om.impl

Examples of org.apache.axiom.om.impl.OMMultipartWriter.complete()


        // Get the collection of ids associated with the attachments
        for (String id: attachments.getAllContentIDs()) {
          mpw.writePart(attachments.getDataHandler(id), id);
        }

        mpw.complete();
      }
      catch (IOException ex) {
        throw new OMException("Error writing SwA message", ex);
      }
    }
View Full Code Here


                try {
                    mpw.writePart(rootDataHandler, format.getRootContentId());
                    for (String cid : attachments.keySet()) {
                        mpw.writePart(attachments.get(cid), cid);
                    }
                    mpw.complete();
                    outputStream.flush();
                } catch (IOException ex) {
                    throw AxisFault.makeFault(ex);
                }
            } else {
View Full Code Here

                envelope.serialize(rootPartOutputStream);
                rootPartOutputStream.close();
                for (AttachmentPart ap : attachmentParts) {
                    mpw.writePart(ap.getDataHandler(), ap.getContentId());
                }
                mpw.complete();
            }

            saveRequired = true;
        } catch (Exception e) {
            throw new SOAPException(e);
View Full Code Here

            for (String contentID : attachments.getAllContentIDs()) {
                attachmentsWriter.writePart(attachments.getDataHandler(contentID), contentID);
            }
           
            if (MM7CompatMode) {
                attachmentsWriter.complete();
                innerOutputStream.close();
            }
           
            mpw.complete();
        } catch (IOException ex) {
View Full Code Here

                envelope.serialize(rootPartOutputStream);
                rootPartOutputStream.close();
                for (AttachmentPart ap : attachmentParts) {
                    mpw.writePart(ap.getDataHandler(), ap.getContentId());
                }
                mpw.complete();
            }
            saveChanges();
        } catch (Exception e) {
            throw new SOAPException(e);
        }
View Full Code Here

                envelope.serialize(rootPartOutputStream);
                rootPartOutputStream.close();
                for (AttachmentPart ap : attachmentParts) {
                    mpw.writePart(ap.getDataHandler(), ap.getContentId());
                }
                mpw.complete();
            }

            saveRequired = true;
        } catch (Exception e) {
            throw new SOAPException(e);
View Full Code Here

                envelope.serialize(rootPartOutputStream);
                rootPartOutputStream.close();
                for (AttachmentPart ap : attachmentParts) {
                    mpw.writePart(ap.getDataHandler(), ap.getContentId());
                }
                mpw.complete();
            }

            saveRequired = true;
        } catch (Exception e) {
            throw new SOAPException(e);
View Full Code Here

                                    DISPOSITION_TYPE + "; name=\"" + ele.getLocalName() + "\"")));
                    partOutputStream.write(ele.getText().getBytes());
                    partOutputStream.close();
                }
            }
            writer.complete();           
        }
    }

    /**
     * @param parent
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.