Package org.apache.axis

Examples of org.apache.axis.Part


     *         should be prefixed by "cid:"
     */

    protected Part readTillFound( final String[] id) throws org.apache.axis.AxisFault {
        if (boundaryDelimitedStream == null) return null; //The whole stream has been consumed already
        Part ret = null;

        try {
            if ( soapStreamBDS == boundaryDelimitedStream ) { //Still on the SOAP stream.
                if (!eos) { //The SOAP packet has not been fully read yet. Need to store it away.

View Full Code Here


    }

    public Part getAttachmentByReference(final String[] id)
      throws org.apache.axis.AxisFault // if CID should still have CID: prefix. 
        //First see if we have read it in yet.
        Part ret = null;

        try {
            for (int i = id.length - 1; ret == null && i > -1; --i) {
                ret = (AttachmentPart) parts.get(id[i]);
            }

            if (null == ret) {
                ret = readTillFound(id);
            }
            log.debug(JavaUtils.getMessage("return02",
                    "getAttachmentByReference(\"" + id + "\"",
                    (ret == null ? "null" : ret.toString())));
        } catch (java.io.IOException e) {
            throw new org.apache.axis.AxisFault(e.getClass().getName()
              + e.getMessage());
        }
        return ret;
View Full Code Here

     */

    protected Part readTillFound(final String[] id)
      throws java.io.IOException {
        if (dimeDelimitedStream == null) return null; //The whole stream has been consumed already
        Part ret = null;

        try {

            if (soapStream != null) { //Still on the SOAP stream.
                if (!eos) { //The SOAP packet has not been fully read yet. Need to store it away.
View Full Code Here

        dimemultipart = null;

        mergeinAttachments();

        Part removedPart = getAttachmentByReference(reference);

        if (removedPart != null) {
            attachments.remove(removedPart.getContentId());
            attachments.remove(removedPart.getContentLocation());
            orderedAttachments.remove(removedPart);
        }

        return removedPart;
    }
View Full Code Here

        multipart = null;
        dimemultipart = null;

        mergeinAttachments();

        Part oldPart = (Part) attachments.put(newPart.getContentId(), newPart);

        if (oldPart != null) {
            orderedAttachments.remove(oldPart);
            attachments.remove(oldPart.getContentLocation());
        }

        orderedAttachments.add(newPart);

        if (newPart.getContentLocation() != null) {
View Full Code Here

                    Messages.getMessage(
                            "unsupportedAttach", datahandler.getClass().getName(),
                            javax.activation.DataHandler.class.getName()));
        }

        Part ret =
                new AttachmentPart((javax.activation.DataHandler) datahandler);

        addAttachmentPart(ret);

    // Store the current DataHandler with its key
View Full Code Here

        mergeinAttachments();

        //This search will pickit up if its fully qualified location or if it's a content-id
        // that is not prefixed by the cid.

        Part ret = (Part) attachments.get(reference);
        if( null != ret) return ret;


        if (!reference.startsWith(Attachments.CIDprefix) && (null != contentLocation)) {
            //Not a content-id check to see if its a relative location id.
View Full Code Here

    public java.util.Iterator getAttachments(
            javax.xml.soap.MimeHeaders headers) {
        java.util.Vector vecParts = new java.util.Vector();
        java.util.Iterator iterator = GetAttachmentsIterator();
        while(iterator.hasNext()){
            Part part = (Part) iterator.next();
            if(part instanceof AttachmentPart){
                if(((AttachmentPart)part).matches(headers)){
                    vecParts.add(part);
                }
            }
View Full Code Here

     */

    public void dispose() {
        java.util.Iterator iterator = GetAttachmentsIterator();
        while (iterator.hasNext()) {
            Part part = (Part) iterator.next();
            if (part instanceof AttachmentPart) {
                AttachmentPart apart=(AttachmentPart)part;
                apart.dispose();
            }
        }
View Full Code Here

    public Part getAttachmentByReference(final String[] id)
            throws org.apache.axis.AxisFault {

        // First see if we have read it in yet.
        Part ret = null;

        for (int i = id.length - 1; (ret == null) && (i > -1); --i) {
            ret = (AttachmentPart) parts.get(id[i]);
        }

        if (null == ret) {
            ret = readTillFound(id);
        }

        log.debug(Messages.getMessage("return02",
                "getAttachmentByReference(\"" + id
                + "\"", ((ret == null)
                ? "null"
                : ret.toString())));

        return ret;
    }
View Full Code Here

TOP

Related Classes of org.apache.axis.Part

Copyright © 2018 www.massapicom. 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.