Error while uploading file using wininet in c++.

I'm going to upload text.txt file
using wininet.
Here is a code.
#include "stdafx.h"
#include "iostream"
#include "windows.h"
#include "wininet.h"
#include "tchar.h"
#include "iostream"
#include "string"
#include "sstream"
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Wininet.lib")
int main(){
TCHAR hdrs[] = _T("Content-Type: multipart/form-data; boundary=---------------------------7d82751e2bc0858");
TCHAR frmdata[] = _T("-----------------------------7d82751e2bc0858\r\nContent-Dis name=\"uploadedfile\"; filename=\"C:\\Users\Ahmer\Desktop\asd\test.txt\"\r\nContent-Type: text/plain\r\n\r\nfile contents here\r\n-----------------------------7d82751e2bc0858--\r\n");
LPCTSTR accept[] = {_T("*/*"), NULL};
HINTERNET hSession = InternetOpen(_T("MyAgent"), INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
HINTERNET hConnect = InternetConnect(hSession, _T("http://localhost/cpp/"), INTERNET_DEFAULT_HTTP_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 1);
HINTERNET hRequest = HttpOpenRequest(hConnect, _T("POST"), _T("uploadfile.php"), NULL, NULL, accept, 0, 1);
BOOL sent = HttpSendRequest(hRequest, hdrs, _tcslen(hdrs), frmdata, _tcslen(frmdata));
if(hSession==NULL)
cout<<"Error: InternetOpen";
if(hConnect==NULL)
cout<<"Error: InternetConnect";
if(hRequest==NULL)
cout<<"Error: HttpOpenRequest";
if(!sent)
cout<<"Error: HttpSendRequest";
//close any valid internet-handles
InternetCloseHandle(hSession);
InternetCloseHandle(hConnect);
InternetCloseHandle(hRequest);
return 0;
Here is a php file.
move_uploaded_file($_FILES["uploadedfile"]["tmp_name"], "/FileFolder");
there is error Error:
HttpSendRequest.

That's prefect, I changed only these two lines
HINTERNET hConnect = InternetConnect(hSession, _T("localhost"), INTERNET_DEFAULT_HTTP_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 1);
HINTERNET hRequest = HttpOpenRequest(hConnect, _T("POST"), _T("cpp/uploadfile.php"), NULL, NULL, accept, 0, 1);
and now there is no error in this code but this is not uploading  file yet.
Is there any error in the php file ? or in this line .
TCHAR frmdata[] = _T("-----------------------------7d82751e2bc0858\r\nContent-Dis name=\"uploadedfile\"; filename=\"C:\\Users\Ahmer\Desktop\asd\test.txt\"\r\nContent-Type: text/plain\r\n\r\nfile contents here\r\n-----------------------------7d82751e2bc0858--\r\n");
I have a file in this path 
C:\\Users\Ahmer\Desktop\asd\test.txt\
Thanks for you Time.

Similar Messages

  • Error while uploading File using af:inputFile

    Hi All,
    I used <af:inputFile> to upload the file,This is working fine if I use the Mouse for selecting the file,But when I use the keyboard to upload the file,It throws error saying
    "Please verify your upload data." Any reasons why Iam not able to upload a file using Keyboard.
    Since I am converting my application to be ADA complaince.
    I need to fix this issue of uploading the file using the keyboard.Iam using Jdev version of 11.1.1.4.0
    thanks
    Krishnaveni

    Hi,
    It works for me (though I am using 11.1.1.6). If you have a reproducible test case, please contact support and file a service request for them to analyze your problem
    Frank
    Edited by: Frank Nimphius on Jun 27, 2012 8:48 AM

  • Error while Uploading File using BLOB

    Hi All,
    I am trying to upload file into Database using simple JHeadstart generated screen for a table with a column having BLOB attribute. Wile inserting, I get this error message.
    JBO-25009: Cannot create an object of type:oracle.jbo.domain.BlobDomain with value:oracle.adfinternal.view.faces.webapp.UploadedFiles$FixFilename@1930089
    Any help would be appreciated..
    Mamun

    The problem you're getting is because the af:inputFile component does not support uploading into columns other than OrdDoc, OrdImage, OrdVideo types.
    I think you would need to implement the interface oracle.adf.view.faces.webapp.UploadedFileProcessor in a custom class which would
    handle the file upload and configure it in the
    adf-faces-config.xml file e.g.:
    <uploaded-file-processor>packagename.FileUploadProcessor</uploaded-file-processor>
    Someone correct me if I'm wrong, as I haven't tried it out myself yet.

  • UCCE / IPIVR : Error while uploading file. Please try again later.

    IPIVR version 8.5x
    Receive "Error while uploading file. Please try again later" 
    Renamed the script to a different name and still could not upload.   I am able to upload other scripts without any issue.   I did find the ICM subsystem in partial service.   If that was the issue I would think it would cause an issue with all the scripts.   The script does validate.   Not sure why at this point.

    Hi Aditya,
    Are you using  SharePoint 2010 or SharePoint 2013?
    Did this issue occur for all users or the special user?
    Please go to Central Administration->Manage service applications->User Profile service application->manage user profile, search and edit the user profile, then upload a picture for the user, compare the result.
    In addition, please check the log file to check more information about this issue.
    The path of the log file is:
    SharePoint 2010: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14\LOGS
    SharePoint 2013: C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • Error while uploading file in BPS

    Hi all,
    I am getting an error while uploading file to BPS through web interface
    I get a red stop button with error message : error while calling up RFC.
    when i double click the red stop button, i get no long text but the error message I get is UPC 202
    please advice me to resolve this issue.
    many thanks in advance,
    Ravi

    The informations are really not much to have an idea about the problem.
    The problem can be located in the fm that calls the file because is trying to search the file on a system where there are some kind of problems in the communication between the systems involved to read and pass the file. Did u map the file name with logical filenames ? Very strange problem. Can you browse in the server where the file is located . Is it on your pc ?
    Or, there is some problem in the datas provided, but this problem should arise more when you save than when you just press to load.
    With this kind of imformations is very hard to have an idea. You need to debug to see what s going on
    Regards

  • Error while uploading file into KM

    Hi Experts,
    I m getting error while uploading file into KM. Its throwing an error message like " Syngenta-POC.doc" does not exist, or file is empty; you cannot upload empty files"
    please assists me.

    Shantanu,
    Please check the files which you are upload is empty or unknown format. If everything seems valid then try to check for the corresponding SAP Note in service.sap.com
    Ram

  • Single Sign-On Error while uploading file via WEBADI

    Hello,
    I am getting error while uploading the file via WEBADI. Below is the error message.
    Error Message:
    The Single Sign-On server registration is invalid. Please contact the System Administrator.
    I noticed that this template is uploading data when I connect to Oracle applications and go to WEB ADI responsibility and create a new template.
    In order to make this WEBADI work do I have to create a new template each time I upload the file?
    Our goal is to use the same template, change the numbers and re load it.
    Also, Is there any way I can go to login screen when I click on UPLOAD under ORACLE in excel. That way connection is established.
    Thanks for the help.

    Hi, Actually NW Portal and SQL server has been installed on the same machine.
    Now I am trying to add my SQL server as a JDBC system and checking the connections and I do not see a property under User Management.
    When I try to connect to R/3 backend system "...Dedicated Application server" then I can see the property but not for the JDBC syste.
    any clue how to get rid of the error and to check the connection.
    Thanks in advance.
    Gopi m.

  • Error while  uploading stock using Mb1c and migo

    Hi
    Following error is showing,while  uploading stock using Mb1c and migo
    Return code 8 is not permitted with BAdI 'FAGL_PERIOD_CHECK'
    Can anyone help me?/
    Thanks

    Hi
    You will need the help of an abaper in solving this , as a BAdi FAGL_PERIOD_CHECK - Posting Period Check has been activated.
    Please check the implementation of the BAdi , i feel that it has not been implemented properly.
    This Business Add-In (BAdI) enables you to extend the existing check of open posting periods.
    The result of the period check is provided to you as a parameter (CH_SUBRC). In your implementation, you can derive this parameter again (for example, if a posting is rejected under a certain condition).
    The following values are allowed for parameter CH_SUBRC:
    0 Posting allowed
    4 Period & is not open for account type & and general ledger &
    6 No authorization for posting period & &
    This is a custome developemnt , so only the ABAper present at your end will be able to resolve it.
    Thanks & Regards
    Kishore

  • Error while uploading file in Collab 4.2

    I am getting following exception while uploading file in Collab 4.2, ALUI Portal 6.1
    Error Details
    ==============================
    Collaboration encountered an error.
    If the problem persists, contact a portal administrator.
    Hide Details
    Error storing file data.com.caucho.hessian.io.HessianProtocolException:
    com.plumtree.collaboration.docman.DocManException: Error storing file data.com.caucho.hessian.io.HessianProtocolException:
    at com.plumtree.collaboration.docman.FileDataAccessManager.closeOutputStreamAndCleanUp(FileDataAccessManager.java:229)
    at com.plumtree.collaboration.docman.FileDataAccessManager.storeFileData(FileDataAccessManager.java:304)
    at com.plumtree.collaboration.docman.FileDataAccessManager.storeFileData(FileDataAccessManager.java:259)
    at com.plumtree.collaboration.docman.DMFolder.internalInsertNewFile(DMFolder.java:772)
    at com.plumtree.collaboration.docman.DMFolder.insertNewFile(DMFolder.java:862)
    at com.plumtree.collaboration.api.docman.DocumentManagerImpl.insertNewDocument(DocumentManagerImpl.java:497)
    at com.plumtree.collaboration.webui.document.UpdateDocumentUploadAction.processFinish(UpdateDocumentUploadAction.java:89)
    at com.plumtree.collaboration.webui.common.BaseUpdateEditorAction.execute(BaseUpdateEditorAction.java:77)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at com.plumtree.collaboration.webui.framework.action.CollaborationController.service(CollaborationController.java:101)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol438Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool438ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: com.plumtree.dr.RepositoryIOException: com.caucho.hessian.io.HessianProtocolException:
    at com.plumtree.dr.transport.glue.client.operation.Operation.convertIOException(Operation.java:161)
    at com.plumtree.dr.transport.glue.client.ClientOutputStream.close(ClientOutputStream.java:81)
    at com.plumtree.dr.util.io.BoundedOutputStream.close(BoundedOutputStream.java:133)
    at com.plumtree.dr.util.io.SelfClosingOutputStream.close(SelfClosingOutputStream.java:265)
    at com.plumtree.dr.util.DocumentOutputStream.close(DocumentOutputStream.java:101)
    at com.plumtree.collaboration.docman.FileDataAccessManager.closeOutputStream(FileDataAccessManager.java:133)
    at com.plumtree.collaboration.docman.FileDataAccessManager.closeOutputStreamAndCleanUp(FileDataAccessManager.java:210)
    ... 38 more
    Caused by: com.plumtree.dr.RepositoryException: com.caucho.hessian.io.HessianProtocolException:
    at com.plumtree.dr.transport.glue.ServiceException.getRepositoryException(ServiceException.java:150)
    at com.plumtree.dr.transport.glue.client.operation.Operation.convert(Operation.java:139)
    at com.plumtree.dr.transport.glue.client.operation.Task.run(Task.java:68)
    at com.plumtree.dr.util.thread.DefaultThreadPool438Pooled.run(DefaultThreadPool.java:295)
    Caused by: com.plumtree.dr.transport.glue.ServiceException: com.caucho.hessian.io.HessianProtocolException: 2
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService438ServiceCall.call(GlueRepositoryService.java:198)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService.uploadDocumentNonChunked(GlueRepositoryService.java:90)
    at com.plumtree.dr.transport.glue.client.HessianOpenOutputStreamTask.execute(HessianOpenOutputStreamTask.java:43)
    at com.plumtree.dr.transport.glue.client.operation.Task.run(Task.java:52)
    ... 1 more
    Caused by: com.caucho.hessian.client.HessianRuntimeException: com.caucho.hessian.io.HessianProtocolException:
    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:194)
    at 438Proxy1.uploadDocumentNonChunked(Unknown Source)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService4382.execute(GlueRepositoryService.java:92)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService438ServiceCall.call(GlueRepositoryService.java:192)
    ... 4 more
    Caused by: com.caucho.hessian.io.HessianProtocolException:
    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:183)
    ... 7 more
    Caused by:
    com.plumtree.dr.RepositoryIOException: com.caucho.hessian.io.HessianProtocolException:
    at com.plumtree.dr.transport.glue.client.operation.Operation.convertIOException(Operation.java:161)
    at com.plumtree.dr.transport.glue.client.ClientOutputStream.close(ClientOutputStream.java:81)
    at com.plumtree.dr.util.io.BoundedOutputStream.close(BoundedOutputStream.java:133)
    at com.plumtree.dr.util.io.SelfClosingOutputStream.close(SelfClosingOutputStream.java:265)
    at com.plumtree.dr.util.DocumentOutputStream.close(DocumentOutputStream.java:101)
    at com.plumtree.collaboration.docman.FileDataAccessManager.closeOutputStream(FileDataAccessManager.java:133)
    at com.plumtree.collaboration.docman.FileDataAccessManager.closeOutputStreamAndCleanUp(FileDataAccessManager.java:210)
    at com.plumtree.collaboration.docman.FileDataAccessManager.storeFileData(FileDataAccessManager.java:304)
    at com.plumtree.collaboration.docman.FileDataAccessManager.storeFileData(FileDataAccessManager.java:259)
    at com.plumtree.collaboration.docman.DMFolder.internalInsertNewFile(DMFolder.java:772)
    at com.plumtree.collaboration.docman.DMFolder.insertNewFile(DMFolder.java:862)
    at com.plumtree.collaboration.api.docman.DocumentManagerImpl.insertNewDocument(DocumentManagerImpl.java:497)
    at com.plumtree.collaboration.webui.document.UpdateDocumentUploadAction.processFinish(UpdateDocumentUploadAction.java:89)
    at com.plumtree.collaboration.webui.common.BaseUpdateEditorAction.execute(BaseUpdateEditorAction.java:77)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
    at com.plumtree.collaboration.webui.framework.action.CollaborationController.service(CollaborationController.java:101)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol438Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool438ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: com.plumtree.dr.RepositoryException: com.caucho.hessian.io.HessianProtocolException:
    at com.plumtree.dr.transport.glue.ServiceException.getRepositoryException(ServiceException.java:150)
    at com.plumtree.dr.transport.glue.client.operation.Operation.convert(Operation.java:139)
    at com.plumtree.dr.transport.glue.client.operation.Task.run(Task.java:68)
    at com.plumtree.dr.util.thread.DefaultThreadPool438Pooled.run(DefaultThreadPool.java:295)
    Caused by: com.plumtree.dr.transport.glue.ServiceException: com.caucho.hessian.io.HessianProtocolException: 2
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService438ServiceCall.call(GlueRepositoryService.java:198)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService.uploadDocumentNonChunked(GlueRepositoryService.java:90)
    at com.plumtree.dr.transport.glue.client.HessianOpenOutputStreamTask.execute(HessianOpenOutputStreamTask.java:43)
    at com.plumtree.dr.transport.glue.client.operation.Task.run(Task.java:52)
    ... 1 more
    Caused by: com.caucho.hessian.client.HessianRuntimeException: com.caucho.hessian.io.HessianProtocolException:
    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:194)
    at 438Proxy1.uploadDocumentNonChunked(Unknown Source)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService4382.execute(GlueRepositoryService.java:92)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService438ServiceCall.call(GlueRepositoryService.java:192)
    ... 4 more
    Caused by: com.caucho.hessian.io.HessianProtocolException:
    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:183)
    ... 7 more
    Caused by: com.plumtree.dr.RepositoryException: com.caucho.hessian.io.HessianProtocolException:
    at com.plumtree.dr.transport.glue.ServiceException.getRepositoryException(ServiceException.java:150)
    at com.plumtree.dr.transport.glue.client.operation.Operation.convert(Operation.java:139)
    at com.plumtree.dr.transport.glue.client.operation.Task.run(Task.java:68)
    at com.plumtree.dr.util.thread.DefaultThreadPool438Pooled.run(DefaultThreadPool.java:295)
    Caused by: com.plumtree.dr.transport.glue.ServiceException: com.caucho.hessian.io.HessianProtocolException: 2
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService438ServiceCall.call(GlueRepositoryService.java:198)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService.uploadDocumentNonChunked(GlueRepositoryService.java:90)
    at com.plumtree.dr.transport.glue.client.HessianOpenOutputStreamTask.execute(HessianOpenOutputStreamTask.java:43)
    at com.plumtree.dr.transport.glue.client.operation.Task.run(Task.java:52)
    ... 1 more
    Caused by: com.caucho.hessian.client.HessianRuntimeException: com.caucho.hessian.io.HessianProtocolException:
    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:194)
    at 438Proxy1.uploadDocumentNonChunked(Unknown Source)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService4382.execute(GlueRepositoryService.java:92)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService438ServiceCall.call(GlueRepositoryService.java:192)
    ... 4 more
    Caused by: com.caucho.hessian.io.HessianProtocolException:
    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:183)
    ... 7 more
    Caused by: com.plumtree.dr.transport.glue.ServiceException: com.caucho.hessian.io.HessianProtocolException: 2
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService438ServiceCall.call(GlueRepositoryService.java:198)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService.uploadDocumentNonChunked(GlueRepositoryService.java:90)
    at com.plumtree.dr.transport.glue.client.HessianOpenOutputStreamTask.execute(HessianOpenOutputStreamTask.java:43)
    at com.plumtree.dr.transport.glue.client.operation.Task.run(Task.java:52)
    at com.plumtree.dr.util.thread.DefaultThreadPool438Pooled.run(DefaultThreadPool.java:295)
    Caused by: com.caucho.hessian.client.HessianRuntimeException: com.caucho.hessian.io.HessianProtocolException:
    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:194)
    at 438Proxy1.uploadDocumentNonChunked(Unknown Source)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService4382.execute(GlueRepositoryService.java:92)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService438ServiceCall.call(GlueRepositoryService.java:192)
    ... 4 more
    Caused by: com.caucho.hessian.io.HessianProtocolException:
    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:183)
    ... 7 more
    Caused by: com.caucho.hessian.client.HessianRuntimeException: com.caucho.hessian.io.HessianProtocolException:
    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:194)
    at 438Proxy1.uploadDocumentNonChunked(Unknown Source)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService4382.execute(GlueRepositoryService.java:92)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService438ServiceCall.call(GlueRepositoryService.java:192)
    at com.plumtree.dr.transport.glue.client.GlueRepositoryService.uploadDocumentNonChunked(GlueRepositoryService.java:90)
    at com.plumtree.dr.transport.glue.client.HessianOpenOutputStreamTask.execute(HessianOpenOutputStreamTask.java:43)
    at com.plumtree.dr.transport.glue.client.operation.Task.run(Task.java:52)
    at com.plumtree.dr.util.thread.DefaultThreadPool438Pooled.run(DefaultThreadPool.java:295)
    Caused by: com.caucho.hessian.io.HessianProtocolException:
    at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:183)
    ... 7 more
    Please help
    Edited by: electrazy on Aug 12, 2011 1:47 AM

    The informations are really not much to have an idea about the problem.
    The problem can be located in the fm that calls the file because is trying to search the file on a system where there are some kind of problems in the communication between the systems involved to read and pass the file. Did u map the file name with logical filenames ? Very strange problem. Can you browse in the server where the file is located . Is it on your pc ?
    Or, there is some problem in the datas provided, but this problem should arise more when you save than when you just press to load.
    With this kind of imformations is very hard to have an idea. You need to debug to see what s going on
    Regards

  • Error while uploading file?

    Hi all
    I am uploading data from CSV, while uploading i am getting error "Unable to interpret "7086,,203,23-Jul-10,,7086,,,B7306663,,72" as a number." Error is coming at some fields.. there i am using some data element which is of type int1 and another one is CURR field. Any specific type definitions required here... pleaes help...
    Thanks,
    Kris.

    Hi Sarbjeet,
    Please look at once to this code i am using...
    get the datasource Xstring
      wd_context->get_attribute(
         EXPORTING
           name =  'HEADER_DATASOURCE'
         IMPORTING
           value = lw_head_datasource ).
    *CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
    *EXPORTING
    *in_xstring = lw_head_datasource
    *IMPORTING
    *out_string = lw_head_string.
    DATA : conv   TYPE REF TO CL_ABAP_CONV_IN_CE.
    Creates a Conversion Instance
    CALL METHOD CL_ABAP_CONV_IN_CE=>CREATE
          EXPORTING
            INPUT       = lw_head_datasource
            ENCODING    = 'UTF-8'
            REPLACEMENT = '?'
            IGNORE_CERR = ABAP_TRUE
          RECEIVING
            CONV        = conv.
          conv->READ( importing data = lw_head_string ).
    get the data of file
       split  lw_head_string at cl_abap_char_utilities=>newline
        into TABLE lt_head_data.
    delete the header
      DELETE lt_head_data INDEX 1.
    get all the field name
      LOOP AT lt_head_data into lw_head_string.
        SPLIT lw_head_string at cl_abap_char_utilities=>horizontal_tab
         into table lt_head_field.
    ***get all the 6 fields of one line
        READ TABLE lt_head_field INTO lv_head_field INDEX 1.
        ls_head_context-DEALER_CODE = lv_head_field.
        READ TABLE lt_head_field INTO lv_head_field INDEX 2.
        ls_head_context-CLAIM_TYPE = lv_head_field.
    I have around 40 fields.. i am getting error here...
        READ TABLE lt_head_field INTO lv_head_field INDEX 23.
        ls_head_context-KMS_HRS_PERDAY= lv_head_field.
    If i change the type KMS_HRS_PERDAY from INT1 to CHAR1 it is working fine... can u help me .. please
    Thanks,
    kris.

  • Error while uploading files to AWS S3

    Hello Experts
    SAP PI 7.31
    I am working on the following scenario. SAP PI receives a file attachment from SOAP response and the same needs to be uploaded to AWS S3 using REST (Advantco REST Adapter) (PUT Method):
    File --> SAP PI --> REST
                     ||
                   SOAP
    To do this without using BPM, I am using RequestResponseBean and ResponseOnewayBean in Sender_File Adapter. In the module parameters, I have mentioned the details of the REST receiver channel. I am using PUT method in Receiver_REST and have checked option "keep attachments"
    When I run this interface, the message fails while sending the file to Receiver_REST with the following errors:
    Sender_File: ResponseOnewayBean - Attempt to process file failed with com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.af.lib.ra.cci.XIAdapterException
    Receiver_REST Adapter: Error: Broken pipe (Software version: 1.0.11)
    This is the first time we are using REST Adapter to upload files to AWS S3. Could you please provide pointers on the same?
    Thanks
    Jaya

    05/08/17 11:22:31 java.io.IOException: java.io.IOException: sqlldr: not found
    Does the client m/c have sqlldr installed (it will need Oracle client installation)? Does it have the ORACLE_HOME/bin directory in whatever path is appropriate for the client OS?
    Cheers, APC

  • Unknown File Format Error while Uploading file through SFP in Note Implemen

    Hello All,
    I am implementing SAP Note 1528165 - Form 16: Layout changes for financial year 2010-11 which has few PDF forms to be uploaded.
    While doing the manual steps given in the attachment; I am getting following error.
    Error occurred when uploading file (unknown file format)
    Message no. FPUIFB068
    Manual step listed in the attachment is given below:
    Step 6 u2013 Creation of PDF form HR_INTAXF162006_600
    a) Download attached file 'SFPF_HR_INTAXF162006_600.zip' on the local file system.
    b) Unzip the .zip file
    c) Execute transaction code 'SFP'.
    d) Enter 'Form' as 'HR_INTAXF162006'.
    e) Goto menu bar and select the 'Utilities' option and select 'Uploading form' from menu.
    f) Select the file, downloaded in the step u2018bu2019 (SFPF_HR_INTAXF162006_600.XML) from the local
    file system.
    g) Save the form and activate the same.
    Please help/suggest.
    Thanks in advance.
    Arti Dobariya

    Hi,
    ADS has to be configured to perform those manual steps.
    Please check the note 1580196 GTS: Error occurred when uploading file
    (unknown file format).
    The manual steps related to SFP transaction need to be performed if your are running the form 16 in pdf format.
    Since ADS was not configured in our system; we end up using  the option of running form 16 in SAP Script.
    Changes related to SFP transaction need not be perfored in case you are running the form in SAP Script format as these are pdf specific changes.
    Regards,
    Arti

  • Unknown File Format Error while Uploading file through SFP

    Hello All,
    I am implementing SAP Note 1528165 - Form 16: Layout changes for financial year 2010-11 which has few PDF forms to be uploaded.
    While doing manual steps given in the attachment; I am getting following error.
    Error occurred when uploading file (unknown file format)
    Message no. FPUIFB068
    Manual step listed in the attachment is given below:
    Step 6 u2013 Creation of PDF form HR_INTAXF162006_600
    a) Download attached file 'SFPF_HR_INTAXF162006_600.zip' on the local file system.
    b) Unzip the .zip file
    c) Execute transaction code 'SFP'.
    d) Enter 'Form' as 'HR_INTAXF162006'.
    e) Goto menu bar and select the 'Utilities' option and select 'Uploading form' from menu.
    f) Select the file, downloaded in the step u2018bu2019 (SFPF_HR_INTAXF162006_600.XML) from the local
    file system.
    g) Save the form and activate the same.
    Please help/suggest.
    Thanks in advance.
    Arti Dobariya

    Hi,
    ADS has to be configured to perform those manual steps.
    Please check the note 1580196 GTS: Error occurred when uploading file
    (unknown file format).
    The manual steps related to SFP transaction need to be performed if your are running the form 16 in pdf format.
    Since ADS was not configured in our system; we end up using  the option of running form 16 in SAP Script.
    Changes related to SFP transaction need not be perfored in case you are running the form in SAP Script format as these are pdf specific changes.
    Regards,
    Arti

  • Getting access denied error while importing file using input type="file"

    Hi All,
    I am using struts application wherein I need to import file for some purpose.I have used input type="file" for the same which goes like:
    <input type="file" id="uploadFile" name="uploadFile" size="50">
    I have the import button on which I have used onClick event to call javascript function submitValues() used to validate all the fields from the page which goes like:
    <input type="button" name="select" value="Import" class="CSSButton" onClick="javascript:submitValues();">
    The JS function then in turn submits the form and calls the action.The problem is sometimes even when the correct path is specified for the file to be imported results in access denied error.This error comes sometimes and other times it works fine.But when this error comes,I need to relogin into the application and then it works fine.I am using IE7 for this.
    Any idea why I am getting access denied error while importing? Has it got something to do with IE7 version or with the input type="file" which is being used here?
    Thanks for any help if anyone can provide.
    Edited by: passionateforjava on Mar 4, 2009 2:18 AM

    vishnuS1984 wrote:
    Hi Friends,
    I have gone through scores of examples and i am failing to understand the right thing to be done to copy a file from one directory to another. Here is my class...So let's see... C:\GetMe1 is a directory on your machine, right? And this is what you are doing with that directory:
    public static void copyFiles(File src, File dest) throws IOException
    // dest is a 'File' object but represents the C:\GetMe1 directory, right?
    fout = new FileOutputStream (dest);If it's a directory, where in your code are you appending the source file name to the path, before trying to open an output stream on it? You're not.
    BTW, this is awful:
    catch (IOException e)
    IOException wrapper = new IOException("copyFiles: Unable to copy file: " +
    src.getAbsolutePath() + "to" + dest.getAbsolutePath()+".");
    wrapper.initCause(e);
    wrapper.setStackTrace(e.getStackTrace());
    throw wrapper;
    }1) You're hiding the original IOException and replacing it with your own? For what good purpose?
    2) Even if you had a good reason to do that, this would be simpler and better:
    throw new IOException("your custom message goes here", e);
    rather than explicitly invokign initCause and setStackTrace. Yuck!

  • Problems while uploading files using the FileReference API

    I've built an image uploader module in Flex using the FileReference API and PHP.
    While this works perfect for images upto 1 MB, What I'm noticing is that for images greater that 1 MB even after the Event.COMPLETE  has triggered, the file hasn't yet been uploaded into the folder.. its only after a couple of seconds or minutes after the Event.COMPLETE,  that the image actually shows up in the FTP folder. Morever I also noticed that for such files the DataEvent.UPLOAD_COMPLETE_DATA that we are using to get feedback from PHP never gets called.
    I thought it would be related to the PHP script getting timed out... but the PHP script does get executed and the images do show up in the folder but thats way after the Event.Complete has been triggered and more importantly  DataEvent.UPLOAD_COMPLETE_DATA doesnt get called.
    Everything seems to work fine as long as the file size is under 1 MB
    Did others too face similar problems and any ideas on how to fix it?
    Thanks in advance

    I don't believe there is, as the browse button renders out as an html input type file component, and this has no ability to get native file size from the client. The only way to do it is to check the file size server side, but that kind of defeats the purpose to some extent, as the file is required to be uploaded before the file size can be checked.
    There is no way to do this on the client short of using a third party client side component - ie. java, flash or some other active component that gets file system level access.
    Ben

Maybe you are looking for

  • Profit center determination

    Hi, Can anyone help me understand how the profit centers are determined for the payables and receivables, customer vendor invoices line item postings in theory it says it is determined form the offset line item? can some one provide me with an exampl

  • HT2811 Cinema Displays 27", blank screen and doesn't come on.

    I have two Cinema Displays 27" on a Mac Pro, one display powers up and works fine, the other stays blank with the light blinking three times. Short, Long, Short, meaning my power adaptor is wrong, but switching adaptors doesn't work. I have read the

  • Can't get mail to work. 127.0.0.1 refused

    The server I had for mail died, so I am trying to get my companies mail over to the server we use for hosting our web sites. At one point before I worked here this server hosted the mail as well as the sites, so I thought this would not be such a dau

  • Steps after OCJP

    Hi i successfully completed my OCJP exam on 29 AUG 2011. Can anybody please tell me what all steps that i have to do compulsorily inorder to get the sucess kit.

  • Can't listen my burned CD's in regular stereos

    I found extremely easy to burn CD's in itunes, the problem is that I can't listen to them in normal cd players, auto stereos and home stereos, is it because of the ACC format? can I burn "normal format" CD's in itunes or do I need another software, a