Webservice to grab the files using HTTP

Hi,
Can any one guide me how to create a webservice to grab a file using HTTP? The scenario is that a webservice call should contact a system through HTTP to grab the file.
Please help.
Thanks,
Sunny
Edited by: Sunny1890 on Apr 2, 2009 7:00 PM

Use classes available in java.net package.

Similar Messages

  • Code for reading the and placing the file using java webservice

    Hi All,
    Can anybody can guide me on how to read a file and place the file using java.
    Let  me know if any code is available which has been completed using java.
    Regards,
    Rahul

    Hi,
    The "square" symbol that you are referring to is probably a CRLF (Carriage Return - Life Feed) Control Character.
    This is more commonly known as a "Enter" at the end of a line / sentence.
    To clean this character from strings in Java, please use:
    String patternStr = "(?m)$^|[\\r\\n]+\\z";
    String replaceStr = " ";
    Pattern pattern = Pattern.compile(patternStr);
    Matcher matcher = pattern.matcher(inputStr);
    return matcher.replaceAll(replaceStr);
    Hope that helps.
    Thanks.
    p256960.

  • How to download video files using http urls through OSB

    Hi all,
    I am working on a requirement where I need to download the video using http url of that video through OSB. Is it possible to convert the video files hosted in a server into base64 code using OSB ? Kindly help me on this.
    Thanks
    Edited by: 887737 on Jul 25, 2012 3:26 AM

    Hi,
    I believe you can get the video file using file transport and then convert it into base64 using a java call out...
    This may help...
    https://blogs.oracle.com/ateamsoab2b/entry/an_example_of_how_to
    Cheers,
    Vlad

  • File Visibility in uploading the file using web DynPro java

    hello,
    i have gone through the tutorial " uploading & downloading the file using web DynPro java".
    the upload functionalty is working fine. but i need to know thw path where these files are getting uploaded ??
    Waiting for the reply..
    Regards,
    Viren Gupta

    Hi Viren,
    Are you are refering to the below tutorial for upload and download:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e10426-77ca-2910-7eb5-d7d8982cb83f?QuickLink=index&overridelayout=true
    If yes, then answer is that the file is stored in the context of the application only as "com.sap.ide.webdynpro.uielement-definitions.Resource" object. Please read through the tutorial to understand the full process.
    WD doesn't really upload to server automatically unless there is any explicit code written. All it does is to store the file in a temp context which you can access and write your own code to store it in a particular location.
    Regards,
    Mahesh

  • I am trying to delete pages from a PDF file. I opened the bookmarks, selected the pages to delete and choose Edit Delete. The selected pages are not deleted. Note: I have to open the file using a passport provided by an external party.

    I am trying to delete pages from a PDF file. I opened the bookmarks in the PDF file, selected the pages to delete and choose Edit > Delete. The selected pages are not deleted. Note: I have to open the file using a passport provided by an external party.

    Resolved

  • How to create a table in the file using java code.?

    HI,
    I should export the data from the view objects to a word document. I have done that but I should
    display the data in the form of a table.
    Kindly come up with the necessary information on how to create a table in the file using java.
    Thanks,
    Phani

    Hi, Thank you for responding to my query.
    The below are the details of my code.
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding StudentDetailsContent =
    (DCIteratorBinding)dcBindings.get("StudentView1Iterator");
    OutputStreamWriter w = new OutputStreamWriter(outputStream, "UTF-8");
    Row currentRow =
    StudentDetailsContent.getRowSetIterator().first();
    Object a[]= currentRow.getAttributeValues();
    int i;
    for(i=0 ;i<=a.length;i++){
    w.write(a.toString());
    w.write(" ");
    w.flush();
    I am usning this coding to achieve the task of exporting data to file.
    I need to display this information in the table that is where I need help from you people.
    Thanks,

  • Is it possible to read the file using File Adapter which is in client machi

    Is it possible to read the file using file Adapter which is in client machine(on the same network).Then what is thee need of FTP Adapter?

    You can achieve that by exposing your client machine as a drive, then you can go using file adapter.
    FTP adapter will help you to communicate with different machine which is in different network.
    It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    Thanks,
    Vijay

  • Add a line to end of the file using VBscript

    HI
    I am working with a software that only accept Vb script commands.
    I have a file that has 8 columns. I need to add a line at the end of the file using VB script
    I need this line to add numbers of amount column and put 22 in 7th column and leave the rest empty.
    example:
    2.01E+13
    77008900
    9.88
    6/3/2013
    1/14/2014
    1/17/2014
    2.01E+13
    77008900
    66.07
    6/5/2013
    1/14/2014
    1/17/2014
    added line
    66.07+9.88=75.95                                               
    22
    the files have different number of rows. please help

    why in the word you think you are smart as the fact is that you don't know shit.
    I explained to you that the software has the ability to edit the file using VBscript. Now if you cant do it dont say that it makes no sense. because others already help me to solve this.
    do everyone a favor and don't answer my questions please, Well you never answered any, don't post any nonsense comments
    I am sorry but I don't think any of us can understand what you are trying to ask.  What software?  VBScript is a scripting language that you use to write a script.  It cannot modify a file that is open by another process.
    We posted the suggestion to look into using the FileSystemObject to append a line to a file.  The examples show you how to do this.
    I suspect that the real problem is that, since you don't speak English natively, we are not understanding what you are trying to ask.  I know that, for me, what you are asking doesn't make sense. Another guess is that you have a program that is able
    to use VB to do things.  Is that what you mean by "softwares".  Are you saying that another program is written in VBScript and you want to modify it?
    You have to clarify these things.
    ¯\_(ツ)_/¯

  • How to Run scenario from the web using HTTP web page?

    Hi guys
    Please let me know How to Run scenario from the web using HTTP web page?
    Regards
    Janakiram

    Hi Janakiram,
    ODI provides web based UI for running the scenarios using Metadata Navigator (read only of ur ODI components) and Lighweight designer (u can edit the mapping here).
    Please explore how to install metadata navigator in ODI and have a look at ODI Setup document for more information.
    Thanks,
    Guru

  • How to view the file using the content

    Hi all,
    I have uploaded the data from a binary file to an internal table using GUI_UPLOAD.
    Could you please suggest any way how i can view the file using the content.
    The binary content looks as follows.
    345DCC27F35A291DFD5496E0609E8ED08F3405AF5FE3DDC574166CDE0D79B7A174BC6
    D87597FA824B3E56E82E451D4C2B4D32A423279A668BB6690C7E9956E90CFE766CB37
    39E70D650300006D08000011000000776F72642F73657474696E67732E786D6C9C56D
    69B6197B7F5BDD4C58841ECC06943522630781EC71767DF5504F0B6B3C4674DEE0D46
    Thanks,
    Vishnu

    Hi all,
    Thanks a lot for the reply.
    Here, my requirement is to open the content as a file.
    I have used 'GUI_UPLOAD' FM to upload the contents & need the same file(PDF, JPG, DOC etc) to be displayed using the content.
    Eg., If i upload an Image using the FM 'GUI_UPLOAD', based on the contents & extention can i see an image?
    Please help me in the regard,
    Thanks,
    Vishnu

  • HT4864 I have been using AOL for many years as my ISP but now I want to close my account and use iCloud.  My challenge is I don't want to lose five years worth of emails and attachments saved in AOL personal folders.  Can I can transfer the files using iC

    I have been using AOL for many years as my ISP but now I want to close my account and use iCloud.  My challenge is I don't want to lose five years worth of emails and attachments saved in AOL personal folders.  Can I can transfer the files using iCloud?

    Do you receive AOL mail in the Mail app or on the website?

  • I take a .NEF file and a .JPG file with every click. When I transfer the files using a flash drive to another computer I never get all of the files to transfer. I get some of the .NEF and some of the .JPGs but not all

    I take a .NEF file and a .JPG file with every click. When I transfer the files using a flash drive to another computer I never get all of the files to transfer. I get some of the .NEF and some of the .JPGs but not all. How come?

    If you're exporting a project then you'll only get the images in that project. Also if any of the masters are referenced then you won't get those masters unless you check Consolidate masters into exported library
    It might be best if you started from the beginning and explained what it is your are trying to do and how you're going about doing it. Also a description of you're hardware/software setup would be helpful.

  • Vaildating File name with the data in the file using sender file adapter

    Hi,
    Below is the scenario
    1)       Pick up files from a FTP server, the file name is dynamic, how do I put dynamic name in sender file adapter?
    2)       Determine if the user correctly named the file based on data in the file.
    a.       File naming structure that we will be concerned with is <company_code><accounting_time_period>.<extension>
    b.      The company code and the time period in the file name have to match the data in the file.
    i.      For example.  If the file name is 1001_200712.csv and the data in the file is for company code 1005, time period 200712, the file is incorrectly named.  Both values must be correct.
    How do we do this?

    Hi Sachin,
                    As Rightly said by Krishna, You can not put Dynamic name in sender File Adapter .You have to provide the name of the file like "*.txt" in Sender Adapter and at runtime you can access this file name by using following UDF:
    DynamicConfiguration conf  = (DynamicConfiguration) container
      .getTransformationParameters()
      .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String valueOld = conf.get(key);
    return (valueOld);
    As now you have picked up the file name at runtime.
    Now concatenate source file fields Company_code and Accounting_timeperiod using "_" as delimiter in properties.Also concat the extension .Now you have required file name.
    So using EQUALS standard function ,compare it with File Name fetched at runtime using above given UDF, and pass result as you desire to process further or not or to raise Alert to resend the file.
    Thanks & Regards,
    Anurag Garg
    You can validate this file name in Mapping itself.

  • How to get the file using file adapter.

    Hi All,
    We have a requirement, IDoc -> PI -> JMS Adapter. Here the IDoc is in Flat file format. How can i consume Flat file version of IDoc into PI using Sender File Adapter for further processing..
    The Flat file version is been created within the SAP Application server "/usr/sap/SID/SYS/global"
    Do I need to specific Source Directory as "/usr/sap/SID/SYS/global" in Sender comm channel? How about the remaining parameters like authentication details?
    plz guide me..
    Thnx

    Check the below link:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0901cba-f49e-2910-748c-d7ce4c0c4c1c?quicklink=index&overridelayout=true
    go to transaction AL11 and there you can find DIR_HOME with a path.
    D:usrsapPID..
    Double click on the filename, you would be able to view the file content.
    That path is ur Application Server path, there you can save your file. Then in the External Data tab in Scheduling screen select Application server and on the file name press F4 so u can get the AL11 files select that then double click DIR_HOME, select your file.
    It will ask for display contents or copy name. Give COPY NAME the file name with path will be copied.
    If we are using Sender File Adapter to consume the file then what should be the source directory (i.e., /usr/SAP/PID/Global/..)
    If you are on the same network then use File Aapter(NFS).
    Now, the path should be usrSAPPIDGlobal

  • Flat file using http

    Hi guys,
    I work on pi 7.1.
    A flat file is sent to me using http request. I want to read the file, remove the heading and then convert it to xml and pass it into R3 through an idoc.
    Do anybody have any suggestions.
    Thanks
    Ugur

    Thank you for the link. I have been working using that document. But the problem is that i  can not trigger a break point in that code, so i can not manipulate with that data coming in.
    Have you any input to how to invoke the debugger.
    Regards

Maybe you are looking for

  • New IPOD NANO (5th Generation)  - Copying music files from IPOD to ITUNES

    Help! I managed to sync all of my music files from my ITUNES on my new IMAC Apple computer and I also managed to sync one album to my IPOD NANO from my old G4 Tower Apple computer's ITUNES. Now I would like to copy that one album from my IPOD NANO to

  • What is the max hard drive size in an early 2008 MacBook?

    I've got an early 2008 black macbook.  I want to upgrade from a 250gb hard drive to either a 750gb 7200rpm drive or a 1tb 5200rpm drive.  Will either of these work in there?  I don't know if there is a maximum hard drive size/rpm that I can put in th

  • Security Certificate Error

    Hi. I have a Toshiba Notebook. For the last 6 months i have been getting this message on a few safe websites that i normally visit :- "There is a problem with this website's security certificate" The security certificate presented by this website was

  • How to use the knowledge base category hierarchy?

    Hi ! I read documents about the knowledge base, I know Oracle Text supplies English and French knowledge base, but I would like to know how to use it, how to handle it. If I want to had some themes, or delete some. Is there a table containing the kno

  • Why can't I alter the Gain control in the voiceover tool?

    Whether I use my USB mic or normal mic plugged into Line In, I cannot increase the value of the Gain control slider. Any ideas?