Package org.apache.axis

Examples of org.apache.axis.Part


            // Instead of throwing NullPointerException like
            // we used to do, throw something meaningful.
            throw new IOException(Messages.getMessage("noAttachments"));
        }

        Part attachmentPart= attachments.createAttachmentPart(dh);

        AttributesImpl attrs = new AttributesImpl();
        if (attributes != null && 0 < attributes.getLength())
            attrs.setAttributes(attributes); //copy the existing ones.

        int typeIndex=-1;
        if((typeIndex = attrs.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
                                "type")) != -1){

            //Found a xsi:type which should not be there for attachments.
            attrs.removeAttribute(typeIndex);
        }

        attrs.addAttribute("", Constants.ATTR_HREF, "href",
                               "CDATA", attachmentPart.getContentIdRef() );

        context.startElement(name, attrs);
        context.endElement(); //There is no data to so end the element.
    }
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

        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

            // Instead of throwing NullPointerException like
            // we used to do, throw something meaningful.
            throw new IOException(Messages.getMessage("noAttachments"));
        }

        Part attachmentPart= attachments.createAttachmentPart(dh);

        AttributesImpl attrs = new AttributesImpl();
        if (attributes != null && 0 < attributes.getLength())
            attrs.setAttributes(attributes); //copy the existing ones.

        int typeIndex=-1;
        if((typeIndex = attrs.getIndex(Constants.URI_DEFAULT_SCHEMA_XSI,
                                "type")) != -1){

            //Found a xsi:type which should not be there for attachments.
            attrs.removeAttribute(typeIndex);
        }

        attrs.addAttribute("", Constants.ATTR_HREF, "href",
                               "CDATA", attachmentPart.getContentIdRef() );

        context.startElement(name, attrs);
        context.endElement(); //There is no data to so end the element.
    }
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

        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 {   

        // 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(JavaUtils.getMessage("return02",
                "getAttachmentByReference(\"" + id
                + "\"", ((ret == null)
                ? "null"
                : ret.toString())));

        return ret;
    }
View Full Code Here

        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 {
        //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

      throws java.io.IOException {
        if (dimeDelimitedStream == null) {
            //The whole stream has been consumed already
            return null;
        }
        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

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.