Uploading a file using PRC

I am trying to upload a file using PRC, I am using .Net 2.0. Here is my code
            IRemoteSession rSession = base.portletContext.GetRemotePortalSession();
            IDocumentManager dManager = rSession.GetDocumentManager();
            IRemoteDocument rDocument = dManager.CreateRemoteDocument(4079, 217, Server.MapPath("temp.txt"));
            rDocument.SetType("http://www.plumtree.com/dtm/mime", "text/plain");
            rDocument.SetOverrideName("Trying to upload");
            rDocument.SetOverrideDescription("No Description");
            int docID = -1;
            try
                docID = rDocument.Save();
            catch (Exception ex)
                Response.Write(ex);
            Response.Write("<BR><BR>" + docID);
The code always falis with following errorPlumtree.Remote.PRC.PortalException: Exception of type 'Plumtree.Remote.PRC.PortalException' was thrown. ---> System.Web.Services.Protocols.SoapException: java.rmi.RemoteException: Error in function PTDataSource.ImportDocument (vDocumentLocationBagAsXML == '1001text/plainD:\Plumtree\RemotePortlets\FileContainer\temp.txt', lDocumentTypeID == 104, pCard == com.plumtree.server.impl.directory.PTCard@65e83f, bSummarize == false, pProvider == null): Error in function PTDataSource.ImportDocument (vDocumentLocationBagAsXML == text/plain1001D:\Plumtree\RemotePortlets\FileContainer\temp.txt, lDocumentTypeID == 104, pCard == com.plumtree.server.impl.directory.PTCard@65e83f, bSummarize == false, pProvider == null): Error in function SOAPEnvelope.Restore (arrayText == [B@7aa6f0): SOAP fault: faultcode='soapenv:Server.userException' faultstring='java.lang.NullPointerException' at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at com.plumtree.remote.prc.soap.DirectoryAPIService.submitRemoteDocumentMerge(String sLoginToken, Int32 nDataSourceID, Int32[] nFolderIDs, String sLocation, String sTypeID, String sTypeNameSpace, String sOverrideName, String sOverrideDesc, String sLanguage, Boolean bMergeACLs) at com.plumtree.remote.prc.soap.DirectoryProcedures.SubmitRemoteDocument(String sLoginToken, Int32 nDataSourceID, Int32[] nFolderIDs, String sLocation, String sTypeID, String sTypeNameSpace, String sOverrideName, String sOverrideDesc, String sLanguage, Boolean bMergeACLs) --- End of inner exception stack trace --- at Plumtree.Remote.PRC.DocumentWrapper.Save() at Gov.NSW.CCSU.Portal.FileContainer.FileBrowser.cmdUpload_Click(Object sender, EventArgs e) in D:\MyWorks\CCSU\Portal\ALUI\Portlets\FileContainer\FileContainer\FileBrowser.aspx.cs:line 48
I thought that there might be some problem in getting the file from the client,
so i used my own uploading routines for copying the
file in current App's directory,
even then i get the same error.
Any help is greatly appreciated!!!
Thanks,
Avi
[pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Hello Dmitry,
Thanks a ton for your patience!
I have already tried step 1, still same error.
I have already tried step 2 and it works using Portal UI
Knowledge Directory-> Going to that specific folder - having ID 4079 -> selecting same file from same network share
Followed Step 3 and the result confirmed that I am using the correct DataSourceID
Here is the small piece of code
<Code>
IRemoteSession rSession = this.portletContext.GetRemotePortalSession();
IObjectManager oManager = rSession.GetObjectManager(ObjectClass.DataSource);
IObjectQuery oQuery = oManager.QueryObjects();
for (int i = 0; i < oQuery.GetRowCount(); i++)
Response.Write(oQuery.GetRow(i).GetName() + "-" + oQuery.GetRow(i).GetID() + "<BR>");
</Code>
Step 4 - We are not using ALI Content Service Windows File. Do you reckon I require this for Upload?
Step 5 – I ran PT Spy, reproduced the problem but couldn’t find any exception(On the portal server).
Let me give you a little insight of our dev environment here. Portal Server along with Remote Apps are installed on ServerX and Studio, Content Upload, Collaboration, Publisher are installed on ServerY. To neglect any permission issue I created the network share on ServerY as the Content Upload Service runs on Server Y.
Running PT Spy on other server (running Content Upload Service) showed few errors but I can not make much sense out of those.
What I can understand is
1.     It makes the call to [submitRemoteDocumentMerge] with correct parameters.
<Parameter List>
nDataSourceID = 217
nFolderIDs = (1) { 4079 }
sLocation = \\ccsu-gmt-952.gnet.ccsu.nsw.gov.au\TempShare\temp.txt
sTypeID = text/plain
sTypeNameSpace = http://www.plumtree.com/dtm/mime
sOverrideName = Trying to upload
sOverrideDesc = No Description
sLanguage = (null)
bMergeACLs = false <ptLogMsgEnd>
</Parameter List>
2.     But the call fails with following stack trace (copied partially)
<Stack Trace>
com.plumtree.server.impl.webservice.PTWebService     SOAP call failed, an internal error occured on the remote server. Attempting to parse the SOAP fault for detailed error info. Web Service='File Upload Web Service', SOAP Action='urn:plumtree-com:DocumentProvider.AttachToDocument', URL='http://ServerY:11910/ptupload/services/DocumentProvider'
</Stack Trace>
3.     Next line shows following Stack Trace
<Stack Trace>
com.plumtree.server.impl.soap.SOAPEnvelope     Error in function SOAPEnvelope.Restore (arrayText == [B@7bd8a5): SOAP fault: faultcode='soapenv:Server.userException' faultstring='java.lang.NullPointerException'
com.plumtree.server.impl.soap.OpenSoapException: SOAP fault: faultcode='soapenv:Server.userException' faultstring='java.lang.NullPointerException'
</Stack Trace>
4.     Then it starts giving the same error again.
5.     I thought it might be expecting a value in Language Parameter, so I Passed US-en but still it screams.
I can send you the entire trace file if that helps.
Thanks a lot for helping so far, Plumtree is pretty new to me and I am finding it difficult to get my steps going.
Thanks,
Avi
Edited by asolvent at 03/24/2008 10:05 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Upload failed your changes were saved but could not be uploaded because of an error. you may be able to upload this file using server web page. save a copy

    Hi All,
    upload failed your changes were saved but could not be uploaded because of an error. you may be able to upload this file using server web page. save a copy button.
    This is the issue which I am facing while working with SharePoint 2010. In a sharePoint 2010 document library I am having an excel file and I am trying to open it from Windows 7 and is office 2010.
    I cam e across few suggestion as mentined below but unable to find the location where to do
    Go to Resource Policies > Web >
    Rewriting > Custom Headers > (if 'Custom Headers' is not visible, click
    Customize on the right top to enable the view).
    Create a new policy with the Resource as <fully qualified domain name of the SharePoint server:*/*> (for example https://sharepoint.juniper.net:*/* ).
    Create the action as Allow Custom Headers.
    Apply the settings to the required roles.
    Please suggest.

    Hi rkarteek
    All things you have to do is as follows:
    1. Open regedit.exe
    2. Naviagate to following key:
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\14.0\Common\Internet]
    3. Click Edit Menu -> New -> DWORD with name of "FSSHTTPOff"
    (without quotes)
    4. Click on "FSSHTTPOff" and enter value of 1
    5.
    Close any Office Applications and browser sessions
    6. Try to reopen your document (no more read only or failure to upload)
    have a nice day!

  • Uploading image file using tcode se78  occuring some   Error

    Hai Gurus
          I am uploading image file using tcode se78 but while Uploading it giving some error i cant resolve the problem so any one help me plz
    Error    "Graphic LOGO could not be saved (2LOGO)"
    Regards
    Selvendran

    Hai
    Thanks
    I had done in all method but i can't save it 
    error is coming ..so plz help me to upload the image
    Error "Graphic LOGO could not be saved (2LOGO)"
    Regards
    Selvendran

  • How to upload multiple files using af:inputfile

    Hi,
    I am using J dev 11.1.1.3. I have a requirement wherein i need to upload multiple files using af:inputfile. Can we do in it ADF ? Is there any other work around to implement the same. I have checked previous questions but not able to find proper solution for this.
    Any pointer in this regard is highly helpful.
    Regards,
    Kalyan

    You have to do this your self by either (as vinod said) using a different component (not present in adf) or implementing this:
    1) allow the user to select multiple filenames (somehow)
    2) zip them together
    3) upload the zip
    4) unpack the zip on the server
    5) work with the files
    Timo

  • How to upload multiple files using wicket

    Hai,
    how to upload multiple files using wicket at a single browse.
    any suggestion?
    Thanks in advance

    You have to do this your self by either (as vinod said) using a different component (not present in adf) or implementing this:
    1) allow the user to select multiple filenames (somehow)
    2) zip them together
    3) upload the zip
    4) unpack the zip on the server
    5) work with the files
    Timo

  • Problem in Uploading excel file using WebDynpro for Java

    Hi  All
    I have followed for Uploading excel file using WebDynpro for Java added by  Tulasi Palnati
    I done all, but I'm getting 500 Exception please contact u r system admin meag  at run time also  Jxl/Workbook class not found msag  but i downloaded Jxl.jar file and  there is no error signals  in coding part. How can I solve the Problem.
    Thanks
    Polaka

    Please ask the people in the Web Dynpro Java forum for a solution.

  • How to Upload a File using FileReference + PHP??

    How to Upload a File using FileReference + PHP??
    If you could help me with a two code examples the AS code and
    the PHP code of a working example.
    Thanks
    Jorge

    http://www.flash-db.com/Tutorials/upload/upFiles.php?page=1

  • How to upload html files using Weblogic Bulkloader

    I hav uploaded image files using bulkloader.
    however with html files am facing a prob.
    only the file structure gets created but there is no html file present inside.
    in
    Filename.html.md.properties i agv the followin
    nodeType=html
    lifecyclestatus=2
    File=C:\ContentRepository\a.html
    encoding=UTF-8
    charset=us-ascii
    mimeType = text/html
    shud i add some more properties...

    You have to do this your self by either (as vinod said) using a different component (not present in adf) or implementing this:
    1) allow the user to select multiple filenames (somehow)
    2) zip them together
    3) upload the zip
    4) unpack the zip on the server
    5) work with the files
    Timo

  • URGENT: Is it possible to upload multiple files using STRUTS

    Hi,
    Is it possible to upload multiple files using STRUTS.
    I am able to upload a single file. But how do i upload multiple files ??
    upload.jsp
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html>
    <head>
    <title>New Page 1</title>
    </head>
    <body>
    <html:form action="/secure/uploadFile.do" enctype="multipart/form-data" method="POST" type="com.smartstream.webconnect.user.actions.UploadActionForm">
    <p>File to upload
    <html:file property="fileUpload" size="20"/></p>
    <p><html:submit/></p>
    </html:form>
    </body>
    </html:html>
    UploadAction.java
    public class UploadAction extends BaseAction {
        Logger log = Logger.getLogger(AttachMessageAction.class);
        public ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ActionException {
            System.out.println("executeAction of UploadAction");
            UploadActionForm uploadActionForm = (UploadActionForm) form;
            int fileSize = uploadActionForm.getFileUpload().getFileSize();
            System.out.println("uploadActionForm.getFileUpload().getFileSize() = " + uploadActionForm.getFileUpload().getFileSize());
            byte buffer[] = new byte[1024];
            try {
                BufferedInputStream bufferedInputStream = new BufferedInputStream(uploadActionForm.getFileUpload().getInputStream());
                FileOutputStream fos = new FileOutputStream("s:\\uploaded\\" + uploadActionForm.getFileUpload().getFileName());
                int read;
                while ( (read = bufferedInputStream.read(buffer,0,buffer.length)) != -1) {
                    fos.write(buffer, 0, read);
                fos.flush();
                fos.close();
                bufferedInputStream.close();
                return mapping.findForward("success");
            } catch (IOException e) {
                e.printStackTrace();
                return mapping.findForward("error");
            }catch(OutOfMemoryError o){
                o.printStackTrace();
                System.out.println("o.getMessage() " + o.getMessage());
                return mapping.findForward("error");
    UploadActionForm.java
    public class UploadActionForm extends ActionForm{
        private FormFile fileUpload;
        private byte[] fileContent;
        public FormFile getFileUpload() {
            org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0;
            return fileUpload;
        public byte[] getFileContent() {
            return fileContent;
        public void setFileUpload(FormFile fileUpload) {
            this.fileUpload = fileUpload;
        public void setFileContent(byte[] fileContent) {
            this.fileContent = fileContent;
    }--Bhupendra Mahajan

    Yes, you could try using the multipart handler...
    But I have a better idea...
    Determine the maximum number of file uploads that the
    user can do at one time. I mean, you can't
    realistically have the user upload a million files at
    one time. So say the max is 20. So you create your
    action form class with 20 FormFile fields called file1
    to file20.
    Then when you dynamically create your page, you
    dynamically create the specified number of file fields
    and 1 hidden field called "totalFiles" which contains
    the number of file fields you created. This should be
    an int field in the form bean.
    Then when you do your action processing, you just loop
    thru the totalFiles... Or well, actually, you may not
    need that at all. You could just check all the
    FormFile fields and whatever ones aren't null contain
    files.But what about UploadActionForm.java[b]
    How do i have exact mapping of the HTML form in this file ??
    --[b]Bhupendra Mahajan

  • Uploading xml file using ADF UIX and storing in ordsys.orddoc field

    I am using ADF UIX and I am using the messageFileUpload tag to upload an XML file into the database (the file contains special characters like hyphens, apostrophes, $, etc). Once in the database I have a procedure which puts it into a clob field using the dbms_lob package. However, what exactly does ordsys.orddoc do with special characters? If I debug my procedure I see that 1 of 4 hyphens and 3 apostrophes have been turned into a character that looks like a square. Anyone know what is going on?

    It should pass binary information only, no conversion at all.
    The conversion is likely in messageFileUpload or the dbms_lob package you are using. Or you may need to tell DBMS_LOB the character set the XML file is in?
    You may want to upload the file using the interMedia tag library... Using uploadFormData?
    http://www.oracle.com/technology/software/products/intermedia/htdocs/descriptions/tag_library.html
    http://www.oracle.com/technology/products/intermedia/htdocs/jsptaglib/html/toc.htm
    Larry

  • Upload multiple file using csom

    how to upload multiple files programmatically using csom and store in sharepoint list
    Blitz

    Hi,
    I have seen a similar post from you, you want to upload multiple file using csom.
    You can take a look at the following thread:
    http://social.msdn.microsoft.com/Forums/en-US/edd3bd86-417b-4174-9627-5a714c733256/upload-multiple-files-using-client-context-object-model?forum=sharepointdevelopment
    I would suggest you to open only single thread for single issue. You can discuss your problem in the above thread only.
    Thank you for your understanding and support.
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to upload a file using FTP tin JSP

    Hello friends ,
    I m actually looking to upload a file using FTP to a server(webserver) in JSP . If there any tags available to accomplish this r any information regading this plzz let me no.
    Thanks in advance
    P.Satish

    Not sure exactly what you're trying to do but you set the content type a stream it to the browser from a servlet

  • Problem in uploading a file using Ws_upload.

    Hi Experts,
                        I am using WS_UPLOAD for uploading .xls file into SAP Standard table T558A.
    Problem is file is not uploaded to DB table.....getting error like
    ERROR DURING FILE UPLOAD/DOWNLOAD as  pop up message.....
    can any boady please help on this issue.
    Regards,
    Praveena.

    Hi,
    If you want to upload the data using EXCEL file use the function module ALSM_EXCEL_TO_INTERNAL_TABLE.
    Examples for ALSM_EXCEL_TO_INTERNAL_TABLE.
    http://wiki.sdn.sap.com/wiki/display/Snippets/Howtouse+FM'ALSM_EXCEL_TO_INTERNAL_TABLE'

  • Uploading a file using input type=file

    Hi,
    I'm not sure if I'm in the right place or not. If not can you please let me know where to find and answer for my question.
    I'm trying to upload a file in oracle self-service (online page) and I found that the input type=file will let me select the file so I place the input type inside my htp.formopen command.
    I used the following when opening the formopen
    htp.formOpen(my_link, 'post',null, 'multipart/form-data');
    then I created the <input type="file"> tag
    But when I send the link to my second page to see if the input type works I get the page not found error.
    I'm thinking that maybe is because my 2nd page doesnt have a parameter that will hold the file but right now I'm not sure how to declare the file variables.
    Do you have any idea what could be wrong?
    Thanks

    What does your form do when you submit it? Handling file uploads is a bit of a convoluted process. I'd recommend starting here for some guidance:
    http://docs.oracle.com/cd/B14099_19/web.1012/b14010/concept.htm#i1005985

  • Multiple languges used while uploading a file using java appn

    Hi everybody,
    i have a problem with multiple languages , let me clear you the question, i were developing a java application using spring ,hibernate frame works, so i got a problem while uploading a file with chinees language or other
    it was saving with different format other than chiness in the database, can any one help me out ... i need the exact language when i upload the files
    thank you very much

    Santhosh_25 wrote:
    actually i have asked the users for the languages... they told some languages like chinees,japanese,german,french,koriean,spanish,italian,dutch,russsian,englishThat isn't deterministic.
    Again, this is pointless unless it is deterministic.
    But lets say that each language group only uses a single character set.
    And each language group stores their files in a specific directory (or server).
    That allows you to deterministically identify the character set of the file.
    So you can then read each file by using a text reader from the java.io package with the correct encoding set.
    This works because it is determinstic.
    The following will NOT work.
    You have a directory with a bunch of files with completely random content in different languages. There is NO way to write a program that will correctly handle those.
    So, again, the first step before doing anything in java is figuring out how you will differentiate the different files.

Maybe you are looking for

  • Transparency Issues with PSD files in FCP 7

    I'm having some weird file layer transparency issues with FCP 7. I'm working on a project that's made up entirely of graphics drawn in Photoshop CS5. They Photoshop settings were done to match an HDTV 1080i (16:9) sequence in FCP. In FCP, the pixels

  • Error on compile the Materialized view refresh

    Hello all, I am getting issue while compile the Materialized view refresh. ALTER MATERIALIZED VIEW FII_GL_AGRT_SUM_MV COMPILE;--( did successfully) exec DBMS_MVIEW.REFRESH('APPS.FII_GL_AGRT_SUM_MV','C'); Error: ORA-12008: error in materialized view r

  • Adobe microsoft surface

    I try to pen a pdf doc on microsoft surface, and this message appears :To view the full contents of this document, you need a later version of  the PDF viewer. You can upgrade to the latest version of Adobe Reader from www.adobe.com/products/acrobat/

  • Is there tether suoport for canon 70D in Lightroom 6

    Is there tether support for canon 70D in Lightroom 6

  • Which SAPCRYPTO.DLL for Web Dispatcher on WIN 2008 64-bit

    Hi all, I have installed WebDispatcher 7.20 on a Windows 2008 64-bit platform - according to PAM this is a supported platform. Now I cannot find a suitable Cryptographic Library that does not cause the following error message during startup in dev_we