Package org.apache.axis.attachments

Examples of org.apache.axis.attachments.AttachmentPart


        {
          if (oLog != null) oLog.debug("Meridio: Exiting getLatestVersionFile method with null.");
            return null;
        }

        AttachmentPart ap = (AttachmentPart) attachments[0];
        if (oLog != null && oLog.isDebugEnabled())
          oLog.debug("Meridio: Temp File is <" + ap.getAttachmentFile() + ">");

        if (oLog != null) oLog.debug("Meridio: Exiting getLatestVersionFile method.");
          return ap;
      }
      catch (RemoteException e)
View Full Code Here


          /*=================================================================
          * Get the object's content, and ingest the document
          *================================================================*/
          try
          {
            AttachmentPart ap = meridio_.getLatestVersionFile((int)docId);
            if (null == ap)
            {
              if (Logging.connectors.isDebugEnabled())
                Logging.connectors.debug("Meridio: Failed to get content for document '" + new Long(docId).toString() + "'");
              // No document.  Delete what's there
              activities.deleteDocument(documentIdentifier,docVersion);
              i++;
              continue;
            }
            try
            {
              // Get the file name.
              String fileName = ap.getDataHandler().getName();
              // Log what we are about to do.
              if (Logging.connectors.isDebugEnabled())
                Logging.connectors.debug("Meridio: File data is supposedly in "+fileName);
              File theTempFile = new File(fileName);
              if (theTempFile.isFile())
              {
                long fileSize = theTempFile.length();                   // ap.getSize();
                if (activities.checkLengthIndexable(fileSize))
                {
                  InputStream is = new FileInputStream(theTempFile);      // ap.getDataHandler().getInputStream();
                  try
                  {
                    repositoryDocument.setBinary(is, fileSize);

                    if (null != activities)
                    {
                      activities.ingestDocument(documentIdentifier, docVersion,
                        fileURL, repositoryDocument);
                    }
                  }
                  finally
                  {
                    is.close();
                  }
                }
                else
                  activities.deleteDocument(documentIdentifier, docVersion);
              }
              else
              {
                if (Logging.connectors.isDebugEnabled())
                  Logging.connectors.debug("Meridio: Expected temporary file was not present - skipping document '"+new Long(docId).toString() + "'");
                activities.deleteDocument(documentIdentifier, docVersion);
              }
            }
            finally
            {
              ap.dispose();
            }

          }
          catch (java.net.SocketTimeoutException ioex)
          {
View Full Code Here

        {
          if (oLog != null) oLog.debug("Meridio: Exiting getLatestVersionFile method with null.");
            return null;
        }

        AttachmentPart ap = (AttachmentPart) attachments[0];
        if (oLog != null && oLog.isDebugEnabled())
          oLog.debug("Meridio: Temp File is <" + ap.getAttachmentFile() + ">");

        if (oLog != null) oLog.debug("Meridio: Exiting getLatestVersionFile method.");
          return ap;
      }
      catch (RemoteException e)
View Full Code Here

                for (int i = 0; i < attachments.length; i++) {
                    if (i > 0) {
                        throw new S3ServiceException(
                            "Received multiple SOAP attachment parts, this shouldn't happen");
                    }
                    AttachmentPart part = (AttachmentPart) attachments[i];
                    object.setContentType(part.getContentType());
                    object.setContentLength(part.getSize());
                    object.setDataInputStream(part.getDataHandler().getInputStream());
                }
            }
           
            // Populate object's metadata details.
            MetadataEntry[] metadata = result.getMetadata();
View Full Code Here

                for (int i = 0; i < attachments.length; i++) {
                    if (i > 0) {
                        throw new S3ServiceException(
                            "Received multiple SOAP attachment parts, this shouldn't happen");
                    }
                    AttachmentPart part = (AttachmentPart) attachments[i];
                    object.setContentType(part.getContentType());
                    object.setContentLength(part.getSize());
                    object.setDataInputStream(part.getDataHandler().getInputStream());
                }
            }
           
            // Populate object's metadata details.
            MetadataEntry[] metadata = result.getMetadata();
View Full Code Here

                for (int i = 0; i < attachments.length; i++) {
                    if (i > 0) {
                        throw new S3ServiceException(
                            "Received multiple SOAP attachment parts, this shouldn't happen");
                    }
                    AttachmentPart part = (AttachmentPart) attachments[i];
                    object.setContentType(part.getContentType());
                    object.setContentLength(part.getSize());
                    object.setDataInputStream(part.getDataHandler().getInputStream());
                }
            }
           
            // Populate object's metadata details.
            MetadataEntry[] metadata = result.getMetadata();
View Full Code Here

          /*=================================================================
          * Get the object's content, and ingest the document
          *================================================================*/
          try
          {
            AttachmentPart ap = meridio_.getLatestVersionFile((int)docId);
            if (null == ap)
            {
              if (Logging.connectors.isDebugEnabled())
                Logging.connectors.debug("Meridio: Failed to get content for document '" + new Long(docId).toString() + "'");
              // No document.  Delete what's there
              activities.deleteDocument(documentIdentifier,docVersion);
              i++;
              continue;
            }
            try
            {
              // Get the file name.
              String fileName = ap.getDataHandler().getName();
              // Log what we are about to do.
              if (Logging.connectors.isDebugEnabled())
                Logging.connectors.debug("Meridio: File data is supposedly in "+fileName);
              File theTempFile = new File(fileName);
              if (theTempFile.isFile())
              {
                long fileSize = theTempFile.length();                   // ap.getSize();
                if (activities.checkLengthIndexable(fileSize))
                {
                  InputStream is = new FileInputStream(theTempFile);      // ap.getDataHandler().getInputStream();
                  try
                  {
                    repositoryDocument.setBinary(is, fileSize);

                    if (null != activities)
                    {
                      activities.ingestDocument(documentIdentifier, docVersion,
                        fileURL, repositoryDocument);
                    }
                  }
                  finally
                  {
                    is.close();
                  }
                }
                else
                  activities.deleteDocument(documentIdentifier, docVersion);
              }
              else
              {
                if (Logging.connectors.isDebugEnabled())
                  Logging.connectors.debug("Meridio: Expected temporary file was not present - skipping document '"+new Long(docId).toString() + "'");
                activities.deleteDocument(documentIdentifier, docVersion);
              }
            }
            finally
            {
              ap.dispose();
            }

          }
          catch (java.net.SocketTimeoutException ioex)
          {
View Full Code Here

        {
          if (oLog != null) oLog.debug("Meridio: Exiting getLatestVersionFile method with null.");
            return null;
        }

        AttachmentPart ap = (AttachmentPart) attachments[0];
        if (oLog != null && oLog.isDebugEnabled())
          oLog.debug("Meridio: Temp File is <" + ap.getAttachmentFile() + ">");

        if (oLog != null) oLog.debug("Meridio: Exiting getLatestVersionFile method.");
          return ap;
      }
      catch (RemoteException e)
View Full Code Here

          /*=================================================================
          * Get the object's content, and ingest the document
          *================================================================*/
          try
          {
            AttachmentPart ap = meridio_.getLatestVersionFile((int)docId);
            if (null == ap)
            {
              if (Logging.connectors.isDebugEnabled())
                Logging.connectors.debug("Meridio: Failed to get content for document '" + new Long(docId).toString() + "'");
              // No document.  Delete what's there
              activities.deleteDocument(documentIdentifier,docVersion);
              i++;
              continue;
            }
            try
            {
              // Get the file name.
              String fileName = ap.getDataHandler().getName();
              // Log what we are about to do.
              if (Logging.connectors.isDebugEnabled())
                Logging.connectors.debug("Meridio: File data is supposedly in "+fileName);
              File theTempFile = new File(fileName);
              if (theTempFile.isFile())
              {
                long fileSize = theTempFile.length();                   // ap.getSize();
                if (activities.checkLengthIndexable(fileSize))
                {
                  InputStream is = new FileInputStream(theTempFile);      // ap.getDataHandler().getInputStream();
                  try
                  {
                    repositoryDocument.setBinary(is, fileSize);

                    if (null != activities)
                    {
                      activities.ingestDocument(documentIdentifier, docVersion,
                        fileURL, repositoryDocument);
                    }
                  }
                  finally
                  {
                    is.close();
                  }
                }
                else
                  activities.deleteDocument(documentIdentifier, docVersion);
              }
              else
              {
                if (Logging.connectors.isDebugEnabled())
                  Logging.connectors.debug("Meridio: Expected temporary file was not present - skipping document '"+new Long(docId).toString() + "'");
                activities.deleteDocument(documentIdentifier, docVersion);
              }
            }
            finally
            {
              ap.dispose();
            }

          }
          catch (java.net.SocketTimeoutException ioex)
          {
View Full Code Here

        {
          if (oLog != null) oLog.debug("Meridio: Exiting getLatestVersionFile method with null.");
            return null;
        }

        AttachmentPart ap = (AttachmentPart) attachments[0];
        if (oLog != null && oLog.isDebugEnabled())
          oLog.debug("Meridio: Temp File is <" + ap.getAttachmentFile() + ">");

        if (oLog != null) oLog.debug("Meridio: Exiting getLatestVersionFile method.");
          return ap;
      }
      catch (RemoteException e)
View Full Code Here

TOP

Related Classes of org.apache.axis.attachments.AttachmentPart

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.