400 on  Post File Item

Using the Integration API , I'm trying to upload a file to an activity, yet I always get a 400 error message.
POST https://streamwork.com/v1/activities/JTxjdeK5gmOq7zSvMmvK0U/items?oauth_consumer_key=*****&oauth_token=****&oauth_signature_method=PLAINTEXT&oauth_signature=***%26****&oauth_timestamp=1271956816&oauth_nonce=956049075&oauth_version=1.0
Here are some elements:
  - a code review by co-workers did not uncover a problem
  - I took the sample code from  com.sap.streamwork.activities.Post_NewFileItem
  - Posting other kind of items on the same activity works fine.
  - the url is signed like the rest of the urls
What is the most likely source of the problem?
Thanks!
Christophe
Here is the actual content of the POST request, minus the binary part.
--mime_boundary
Content-Disposition: form-data; name="SocialProxy - API.pdf"; filename="dummy.xml"
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<item name="SocialProxy - API.pdf">
<description>Uploaded using SAP Workspace</description><file_item/></item>
--mime_boundary
Content-Disposition: form-data; name="file"; filename="SocialProxy - API.pdf"
Content-Type: application/pdf
Content-Transfer-Encoding: binary
--mime_boundary--
Note: all lines are terminated by \r\n, including the last line.

It looks like the name of the field containing the description xml is wrong, it should be 'item'.  You can confirm this by checking the response body, I suspect it looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<error>
  <http_status>400 Bad Request</http_status>
  <message>multipart/form-data format error: expecting a part with name 'item'.</message>
</error>
The first few lines of your POST request should be
--mime_boundary
Content-Disposition: form-data; name="item"; filename="dummy.xml"
Content-Type: application/xml
Hopefully that will fix things.

Similar Messages

  • Internal server error when adding a file item

    Hi Gurus,
    We have Portal 9.0.2.0.1. We add all our documents to portal as file item. I am getting the following error when I try to add a file item. The file size varies from 1 MB to 10MB. It's all .pdf or .doc files. I am able to add 1 or 2 files, then I get this error.
    please post a reply if you have any idea about this one.
    Thanks
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    Oracle HTTP Server/1.3.22 Server at prtl.nw.us Port 7778

    I suggest that you log a TAR and work with Oracle Support on resolving this problem.
    Regards,
    Jerry
    PortalPM

  • FI Posting line Items

    Dear all,
    It,s a very urgent......I want know maximam how much line item we have to post at time of MIRO in planned delivery cost.And where is the SAP setting for that?
    I have facing following problem........
    In my import PO three condition 1) Custom duty  2) Vat input & 3) Whithholding Tax. So that If in one PO suppose 400 line items, then at the time of MIRO for planned delivery cost toral 400 * 3 = 1200 line items that time system given a message error like- Maximum number of  items in FI reached.
    Please give the suggetion.
    Thanks & Regards,
    Vinay Patel

    Hi
    you can post up to maximum 999 line entries in FI document.
    System response
    FI documents have a 3-digit item counter that limits the number of items permitted per document. 
    If the documents with an excessive number of items come from another application area (e.g. sales, logistics, order accounting), you can configure the system to the effect that these documents are summarized in FI.  
    To overcome this, the only way was to break the accounting invoices, 1 with 950 items and the other with the rest.
    Regards
    Ramakrishna

  • IE won't post files

    I'm trying to upload a file through a servlet. My code works fine with Firefox, but IE6 won't send me any data. I've never had this sort of trouble using ASP.NET, so I think that MS must have done something naughty.
    I'm using Jetty 6 and Jakarta Commons FileUpload. My form contains one file input and one submit button. It sets the action using Javascript and also adds some parameters to the action (as in a GET request).
    Is there some trick to get IE to send the data?

    Well, it does work with Firefox. Anyway, my form is
    <html>
      <head>
        <title>Upload test</title>
      </head>
      <body>
        <form method="post" action="http://localhost:9000/brcontratos/editor/editor/filemanager/connectors/java/connector.do?Command=FileUpload&Type=Image&CurentFolder=" enctype="multipart/form-data">
          File: <input type="file" name="NewFile"/>
          <input type="submit" value="Go!"/>
        </form>
      </body>
    </html>and my doPost() starts with:
    try {
                   // Create a factory for disk-based file items
                   FileItemFactory factory = new DiskFileItemFactory();
                   // Create a new file upload handler
                   ServletFileUpload upload1 = new ServletFileUpload(factory);
                   // Parse the request
                   List<FileItem> /* FileItem */ items = upload1.parseRequest(request);
                   for(FileItem item : items) {
                        System.out.println(item.getFieldName());
              } catch(Exception e) {
                   e.printStackTrace();
              }And items always comes out empty, even though ServletFileUpload.isMultipartContent(request) returns true.

  • ORA-29861 Error while editing or adding search keywords in a File Item

    Hi,
    We are getting the following error while editing or adding search keywords to a file item:
    ORA-29861: domain index is marked LOADING/FAILED/UNUSABLE
    DAD name: portal30 PROCEDURE : PORTAL30.wwv_edit_tab.edititem
    Can you please tell us what went wrong.
    Thanks

    Vikas,
    From the server error messages reference:
    Cause: An attempt has been made to access a domain index that is being built or is marked failed by an unsuccessful ODCIIndexCreate or is marked unusable by a DDL operation.
    Action: Wait if the specified index is marked LOADING Drop the specified index if it is marked FAILED Drop or rebuild the specified index if it is marked UNUSABLE.
    It's possible you were loading the document while the index was being rebuilt. Search all_indexes where DOMIDX_STATUS <> 'VALID' OR DOMIDX_OPSTATUS <> 'VALID' to find the offending index and rebuild it.
    Regards,
    Jerry
    null

  • How to view file item count in finder window?

    Hi all,
    Pre-Lion, I had things set up so that I was able to view the number of files/items in a finder window that was in list view. This information would show up at the bottom of my finder windows. I know I had intially pressed some kind of OS X shortcut to get it to show up there and now would *really* like to be able to easily view that information once again. Not only did I get a file count, I was also shown a file path if I clicked on one of the files in the finder window.
    For the life of me though I just cannot remember how to do this. Can anyone help me out?
    Thank you very much in advance:)
    Christine

    Got it! That was SO EASY...thank you very much

  • Post open items with clearing for a account nt previously open item managed

    Hi,
    We have a current VAT account which was not open item managed till April 2008. Since the account has a zero balance we were able to make it open item managed from May onwards.
    Using transaction code FS10N we see that there are some items which are open  (type SB and SA). We want to post these items with clearing.
    Moreover the postings made in the vat account are done every month but they are manual postings only using T.Code FB50 and as checked using the transaction code OB40.
    We are not also allowed to run program RSEPA02. as this is not a standard program and not recommended to be run by SAP.
    Could anyone please sujjest how can we post the previous items with clearing.
    Thanks and regards,
    Priyajit.

    Hi,
    In this case when you are shifting account from open item to non open item all the open item debit and credit side to a dummy account and when account is converted into open item you have to reverse the earlier entries.
    Check this with what exactly you have done.
    Assign points if solved the problem.
    Warm Regards
    Edited by: MILIND on May 20, 2008 10:29 AM

  • Displaying file items in-line

    I want to be able to display a HTML file that I have loaded into my content area in-line. You can do this with text items, but are limited to 32K.
    Are there any plans to enable this for file item types.
    Or has anybody done this before.
    URL items are not an option I have 11000 documents.
    null

    Am not sure if you will want to do this considering you have so many files ... it is a cumbersome wayout but you can try this
    1. Upload the file and then hide the item you just added.
    2. Now define a link in your folder pointing to the hidden file - you can display the file in your content area.
    You can keep a folder that will contain the hidden files.
    Rama Krishnan

  • GL posting clearing item amount and do not show doc status on the header

    Hello,
    GL post clearing amount both side and increase the no of items in the GL balance display. Inaddition, these clearing line item document header does not show document status field.  I have another GL which does not post extra two lines and clearing item document is empty and header shows document status as A (cleared item).
    Could you let me know what the difference and what need to be changed to make it not to post clearing items + and - and show doc status.
    Both are same FSG and only difference tick mark not done for balance in local currency.

    Thanks for your reply...but thats did not work. As I said earlier, I have a Structure in my rows and 2 characteristics in my free chracteristics and in my columns I have a selection of key figures...
    What I want is when I drill down on one of my 2 free characteristics, I do not want to see rows with amounts (KFs) zero or space.
    RR

  • How to post open item balance in mass ( ECC6.0)?

    Hi experts,
    In order to change alternative account in a principal account, I have to post a lot of open item to zero. After changing the alternative account, I have to reverse this open item and display the original open item.
    How to post open item balance in mass?
    For your information, my SAP system=ECC6.0
    Thanks for your feed back
    Rgds

    Hi,
    thanks for you information. I check also with Ecatt.

  • Is there a limit to number of File items loaded to a single portal page?

    Hi,
    Does anyone know if there is a limit to the number of File items that can be loaded to one single portal (10.1.4) content page?
    thanks,
    Bret

    Hi Arnaud,
    Don't recall that we ever investigated a threshold value where portal was not performing anymore. It also depends on other circumstances as well :
    - what kind of caching is used on the page, i.e. pages cached on system level for a period of 24 hours will generally perform well, even if they have a large number of file items. The performance penalty is paid by the person who needs to generate the page from the back-end database.
    - Are all files in a single region or are they divided over several regions. I seem to recall that we use a fetcher thread for each region.
    My advice :
    Built a prototype, add file items to a page and start load tests. This will allow you to determine how many files can be added to a page without an unacceptable loss of performance.
    Regards,
    Erik

  • HTTP error: could not POST file

    Hi experts,
    I am working with scenario: WS <-soap-> XI <-rfc-> R3.
    I have created all the stuff in IR, ID, define my WSDL and tested it with Altova, and everything works ok!.
    However, if i use https and 50001 instead of http and 50000 (from the URL), i get following error:
    <i>HTTP error: could not POST file
    Error sending SOAP request</i>
    I have checked that 50001 service is active and i can reach:
    https://<hostname>:<50001>/XISOAPAdapter/MessageServlet?
    Can you guys tell me if i have missed any step in my configuration or in the java visual admin to let this work?
    Please, help me out.
    Best regards,
    david

    Hi David,
    Check if these threads can help you,
    SOAP-Web Service Error
    /community [original link is broken]://Payload of SOAP-Message cannot be read
    Error while calling webservice created in XI
    **Reward points if helpfull**

  • Execute query when post text item

    Anybody can help ?
    I create 2 block, first a data block and another is a control block with field customer_search field,
    after inputing customer id in search field on control block,
    I want to execute query.
    my code :
    set_block_property('customer',default_where,'custid=:control.customer_search');
    execute_query;
    error : frm-407 : illegal restricted procedure execute_query in post-text-item trigger.
    How to solve this problem ?
    notes: If I create one push button and put execute_query in there, every thing is fine.
    but the my user does not like that.
    Thank.

    hi,
    first of all change ur statement as
    set_block_property('customer',default_where,'custid='||:control.customer_search);
    means u must use pipe sign while using bind variable
    secondly
    u should use key next item trigger
    go_block(user desired item or block);
    --and then use this satemant
    clear_block(no_validate);
    execute_query(no_validate);
    i hope it wil slove ur peoblem if it will NOT then please acknowledge otherwise we will go for a other solution
    thanks
    imran
    manager IT
    www.masoodtextile.com

  • Posting intercompany items in FB01 (business area problem)

    Hi guys,
    Have you tried posting intercompany items in FB01?
    My problem occured when i tried to post concur documents in FB01.
    In line item1, i didn't enter a business area.
    In line item2, i entered business area 0005.
    I clicked simulation.
    The business area in line item 1 is now populated with 0005.
    When i debug the program, item 1's business area was populated because of OSS notes 566083.
    I look for OSS notes that may solve this problem but i haven't found any.
    I considered using the substitution exit that is called before simulation, but i'm afraid it might cause conflict in other modules!
    Help.
    Any suggestion is highly appreciated.
    warm thanks,
    navi

    Hi Prabhu,
    Thank you so much for sharing your thoughts.
    Yes, i ikow I can manipulate the business area's value in a substitution exit.
    But the problem is, the OSS note was called after the line item passed through the substitution exit.
    Meaning the filling-up of the BA happens after the program executed the substitution exit.
    It could have solved the problem if the substitution exit comes after the OSS note but its not the case, so I really can't use that exit.
    I search for another exits that occurs when simulation was ticked, but there's none.
    I asked my functional to ask SAP for OSS notes that may solve this problem and I am also conducting thorough investigation in my end.
    Do you have any other idea regarding this problem?
    Thanks again so much in advance.
    Navi

  • Posting line item currency different than header curency

    Hi ALL,
    Is there any way in SAP where I can post line items in a different currency that header currency?
    for e.g.  Doc header currency - USD
    Line item 1 Dr A/c -  Amount in USD
    Line item 2 Cr A/C - Amount in CAD
    Can you please let me know if it is possible to post in SAP?
    Thanks,
    Ram

    Absolutely not possible.
    Currency is at header level and not at line item level.
    Regards,
    SDNer

Maybe you are looking for