Loading *.txt files in web service

I have a running web service on Axis, and can communicate with it from a j2se client and a browser test client.
I'm attempting to load a txt file of data in the web service (stores a list of usernames). But the code can't locate the text file. Where are external resource placed if they're needed in a web service? I was assuming I could just place it next to my *.java files.
Thanks

I should add that I'm using Eclipse , and as such my web service seems to be self contained in my workspace for Eclipse. The structure is
EclipseWorkspace -> myProject -> projectNamespace -> *.java
I thought I could place my *.txt files inside the namespace directory with my Java files. I have also tried placing the *.txt file in the project directory, still no luck.

Similar Messages

  • How to download a file via web service in Windows Phone 8.1?

    My project just got 2 part.
    1.Pivot app
    2.Webclient server (provide data for pivot app the view the data)
    My concert that how do i do a download button to download a file via web services in to isolated storage.
    urgent!

    something like this:
    public async System.Threading.Tasks.Task DownloadFile()
    using (var client = new Windows.Web.Http.HttpClient())
    var stream = await client.GetInputStreamAsync(new System.Uri("http://urltomyfile"));
    var file = await ApplicationData.Current.LocalFolder.CreateFileAsync("myfile.txt", CreationCollisionOption.GenerateUniqueName);
    using (var fileStream = await file.OpenAsync(FileAccessMode.ReadWrite))
    IBuffer buffer = new Windows.Storage.Streams.Buffer(1024);
    while ((buffer = await stream.ReadAsync(buffer, buffer.Capacity, InputStreamOptions.None)).Length > 0)
    await fileStream.WriteAsync(buffer);
    await fileStream.FlushAsync();
    how is your webservices offering the file?
    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

  • Download a XML file from Web Services Using Flex

    Hi All...
    I am new for flex, im developing a windows application using Flex/Air, i have connected the web services with user authentication, now I want to download a xml file using web services in flex,
    how can i do this?? please reply...
    Thanks in advance
    Vasanth

    Hi All....
    I have done this myself using sample tutorials...
    here is the code for your reference guys
              plyLoginName = txtEmailIdDownload.text;                
                     var urlpath:String = new String("your url p?LoginName=");
                    urlpath = new String(urlpath.concat(plyLoginName));
                    urlpath = new String(urlpath.concat("&PlayerType="));
                    urlpath = new String(urlpath.concat(chkseasonvalue));
                    Alert.show(urlpath);
                var request:URLRequest = new URLRequest(urlpath)
                var fileRef:FileReference = new FileReference();           
                fileRef.download(request,"yourfilename.xml");
                Alert.show('File downloaded Successfully');   
                 txtEmailIdDownload.text = "";
                txtPWDownload.text = "";
    thanks
    Vasanth

  • Unable to Find the Type Mapping Resource File (Two web services)

    Hello,
    I am using BEA weblogic 7.0 to deploy my applications. I have a web service and was able to deploy it sucessfully. I am trying to access this web service from another web service previously succesfully deployed too. When I call the second one, I have the next problem:
    java.io.IOException: unable to find the type mapping resource file for:tuoprec.sinsesion.TuOPRecService
    at weblogic.webservice.core.encoding.DefaultRegistry.<init>(DefaultRegistry.java:62)
    at weblogic.webservice.core.rpc.ServiceImpl.<init>(ServiceImpl.java:72)
    at tuoprec.sinsesion.TuOPRecService_Impl.<init>(TuOPRecService_Impl.java
    I put the client jar file (2nd web service) obtained from the <clientgen> in the class path of the ear file (1st web service), but I have the same error.
    Can anybody help me?,
    jose luis

    Hello,
    I am using BEA weblogic 7.0 to deploy my applications. I have a web service and was able to deploy it sucessfully. I am trying to access this web service from another web service previously succesfully deployed too. When I call the second one, I have the next problem:
    java.io.IOException: unable to find the type mapping resource file for:tuoprec.sinsesion.TuOPRecService
    at weblogic.webservice.core.encoding.DefaultRegistry.<init>(DefaultRegistry.java:62)
    at weblogic.webservice.core.rpc.ServiceImpl.<init>(ServiceImpl.java:72)
    at tuoprec.sinsesion.TuOPRecService_Impl.<init>(TuOPRecService_Impl.java
    I put the client jar file (2nd web service) obtained from the <clientgen> in the class path of the ear file (1st web service), but I have the same error.
    Can anybody help me?,
    jose luis

  • File to Web service (SOAP) to File scenario with out BPM in PI 7.1

    Hi All,
    I have scenario File to Web service (SOAP) to File scenario with out BPM.i am getting the below error:
    1) Error MP: unexpected exception caught com.sap.aii.af.service.cpa.impl.exception.CPAObjectKeyException: Value of key must not be null: ObjectId
    2) Error ROB: error during processing: com.sap.aii.af.lib.mp.processor.ModuleProcessorException: Processing Error
    PI server is 7.1 with SP:8
    I have configured the scenario like this
    1) 2 File channels - Sender & Receiver ,1 RFC channel - Receiver. We need to note that, the additional Module parameters need to be added only for sender File channel
    2) Created Sender Agreement
    3)Created Receiver Determination
    4)Created Interface Determination
    5)Created Receiver Agreement
    Regards,
    Ramesh

    Hi,
    Thanks for your reply!!
    My Scenario is File to SOAP to File.
    Configred modules  in Sender channal below:
    Prcessing sequence:
    Number       Module Name                                        Module Key
    1..........       AF_Modules/RequestResponseBean.......1
    2..........       CallSapAdapter..........................................2
    3..........       AF_Modules/ResponseOnewayBean.......3
    Module Configuration:
    Module Key                                       Parameter Name                                       ParameterValue
    1                                                        passThrough                                            true
    3                                                        receiverChannel                                       receiverChannel name
    3                                                        receiverService                                        receiverService name
    please tell any more confiration requered.
    Regards,
    Ramesh

  • File to Web Service - No back system in hoplist

    Hi guys
    I've implemented a File to Web service Scenario with XI. The file is picked up from the server.
    The message monitoring in the Runtime Workbench shows the following error:
    "XI-Systemfehler erhalten. ErrorCode: NO_BACK_SYSTEM_IN_HOPLIST ErrorText: ErrorStack: Legacy system to which acknowledgment message is to be sent is missing in hoplist (with wasread=false)"
    Has anybody a clue?

    Hi Gokhan,
    please go thru the links below and see if u have followed the steps mentioned in it while defining the web service..if it still doesnt help you, pleease do let me know.
    http://help.sap.com/saphelp_erp2004/helpdata/en/31/daa0404dd52b54e10000000a1550b0/content.htm
    /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
    /people/david.burdett/blog/2005/01/28/why-using-web-services-for-b2b-is-hard-to-do
    /people/dj.adams/blog/2004/06/24/forget-soap--build-real-web-services-with-the-icf
    /people/renald.wittwer/blog/2005/01/05/develop-a-web-service-that-sends-an-email
    I hope the info provided will help you to atleast some extent solve your problem.
    Regards,
    abhy

  • Loading .txt file in the Database

    I want to load .txt file in a table with datatype as LONG.
    Please Specify how i do i upload it using SQL Loader or any other Utility.
    Detail step would be a great help as this very urgent.
    Thanks
    Mona

    Check the SQL*Loader chapter of the Utilities book: http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a76955/toc.htm

  • Issues loading .txt files from server...

    Hi.
    I have an issue with a script I created that loads text strings from a file on my server.
    The swf file loads a message from a .txt file, displays it in an animation when the animation finishes it loops back to the start and loads the next message and displays it in the animation.
    All works fine. However the script reads the text file from the server on every loop ( 3 seconds ) This will be hard on my server so... Is there a way to read the text file once only and then loop through the eight statements?
    Thanks. Z
    Actionscript 2. Flash CS3. Flash Player 10.
    quotes.txt - text file containing eight quotes
    quote_txt - Dynamic field within animation
    ranQuote = new LoadVars();
    ranQuote.onLoad = function(success) {
        if (success) {
            RanNum = RanNum+1;
            if (RanNum>=9) {
                RanNum = 1;
                ran = this["quote"+(RanNum)];
                quote_txt.text = ran;
            } else {
                ran = this["quote"+RanNum];
                quote_txt.text = ran;
        } else {
            quote_txt.text = "Display if can't load txt file";
    ranQuote.load("quotes.txt");

    Unless I'm missing something, each time you load the file you are loading the entire file.  So you should have all of what's in it stored.  Your load function appears to just be picking out one of them out randomly after they're all loaded.
    I assumed wrongly that this isn't all the code you have and other loading code is what you are trying to inhibit.
    What you probably want to do is take most of your onLoad code and place it into a function.  What you have that is pulling up the quotes should utilize that function.  You shouldn't be using that loading code each time some button or whatever loop cycles.

  • Trasport file by web services

    hi sdn boys
    i have a problem.
    i have a abap program that trasfer a file to server, than this file is put on a web page.
    now i must download the file using web services.
    it 's possible and How can I do?
    thanks

    Hello everyone.
    I have the same problem like it is described in the first post.
    I create a Web Service and also in WSADIMN my Service doesn’t appear.
    When I go to WSCONFIG it is not possible for me to save the created (press F5) Web Service. It seems that it is not possible for me to save in the whole system. Doesn’t matter what I do, the save button is disabled.
    I extend my license and I specify as user “student” and not “developer”. Could that be the problem?
    Anyone an Idea
    Thx a lot

  • File upload - web services

    Hello All,
    I have to upload a file through web services...The file has content type: text/plain and can have max size - 7 MB...
    I tried converting the file into byte[] and send it over the web services ..it is working fine for small files but it hangs for large files...
    Please help...Help is greatly appreciated
    Thanks....

    Hai,
    I'm looking to upload file(pdf/doc) with size limitation less than 500KB using web service and store the file as an blob in the Oracle DB. Please help me if you used any similar approach in your project. I would appreciate your help/suggestions.
    Thank you for your time
    Regards
    VK

  • How to create a proxy to retrieve the xml file from web services

    Hi Every one,
    We have a requirment where we receive a xml file from Kenexa, a third party HR tool using a middleware tool. from SAP side We have to create a proxy to retrieve the xml  file from web services by initiating call through middleware tool i used earlier.
    these are the steps i intend to follow to accomlish the requirement.  
    1) middleware tool has to initiate the call to kenexa web services to  receive the xml file when it is available.
    2) On SAP we need to create a ABAP Proxy service provider to middleware where this file can be received.
    Can any one guide me how i can create a proxy to retrieve the xml  file from web services by initiating call through other middlewre (its not PI). 
    Any help would be really great, i am not a ABAP developer, so please help me with this. Thanks.

    Thank for reply.
    The computers are in different locations, but yes it's possible, the users in this enviroment are all local administrator of the machines, and we can distribute the script centrally from the DC automatically
    Acrobat use Java, right? I'm not so expert in java, but something about it could not be so difficult to manage.
    Do you know some place where i can get some info about JS and acrobat?

  • Sending audio files through web service

    Hi,
    How can we send audio (mp3,wmv) files through web services ? i have tried making a byte array of the file and then sending the byte array through the web service, but it give OutOfMemory error. so is there any better and practical way of doing it ?

    Just read catalina.bat and find where $JAVA command is called, for NT it should be "%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% "
    "%_EXECJAVA% is java
    %JAVA_OPTS% and %CATALINA_OPTS% are enviroment parameter for java command. Just added one of them in your case.
    By the way, " i am using a HP PDA on the client side, so i cannot increase the JVM heap size there", you should info. the client, otherwise the client may be get "out of memory".

  • Down-/Upload files via Web Services using a NON-SAP system!?

    Hello,
    is it possible to down-/upload files via web services using a NON-SAP system!?
    Regards,
    Jens

    Hi Jens,
    I am not sure about your requirement here. What i could understand is that you want to check whether service could handle file processing?
    1) Uploading file - You can build a Webservice which has import/export parameters as the file structures and implement the proxy class in such a way that the passed data is written to application server.
    2) Downloading file - Same as uploading file, but the proxy class would have the code to extract data from the application server and pass them as output parameter.
    Functionality of Non SAP system: The system which calls these services should be able to convert the output of proxy data into file in case of downloading the file and it should be able to convert the file data into export parameters in case of uploading file.
    Hope this helps.
    Regards,
    Prasanna

  • How to send large files using web service

    hello everyone,
    I am new to this forum, so please pardon me if I post some silly problem...
    I have created one service which sends file when client (jsp) request it. I am using JBOSS as my server. purpose of this application is when client request some fle then service will send this file... and most of the time we need to send only pdfs and ppts...
    Problem is, this service sends txt, java files easily of any size but when i tried sending PDF, PPT then i got xml.SAXParseException.......
    I thought this error is because of some characters, but how to fix it....
    I am working on Linux.
    code snippet is:
    import java.io.*;
    public class MyHelloService
    public String file_size (String name)
         String s = new String("");
    byte[] sendata1=new byte[100];
         try
              System.out.println("name recived is :::::::::::"+name);
              FileInputStream in=new FileInputStream(name);
              int size=0;
              size=in.available();
              System.out.println("FILE SIZE IS:::::"+size);
              byte[] sendata11=new byte[size];
              i=in.read(sendata11);
              System.out.println(new String(sendata11));
              s=new String(sendata11);
         catch(Exception e)
                   System.out.println("EXCEPTION IN JWS:::"+e);
                   s=new String("nofilefounderror");
         return s;
    pls tell me what am i doing wrong ad how to fix this?
    and one more thing can i send byte array from a web service as i tried but couldnt do that... so i am reading everything in a single byte array and then converted to string.....
    is it possibel to send file in a chunk?if yes, how to do that?
    waiting for the reply..... pls reply as soon as possible....
    Rashi

    hi,
    I am sending file from server to client i.e client will request for a file and service will send it back....... no socket connection is there...I am using JBOSS and apache axis.
    pls help me out.....
    Rashi

  • How to create XML data source/ and load data from a web service to BI

    All,
    I m trying to find a 'how to' document (or any document) that shows how to create an XML data source to load data directly from a web service or from an XML file.
    I appreciate any help.

    Hi Mike,
    Two more for you:----
    /thread/111488 [original link is broken]
    http://help.sap.com/saphelp_nw70/helpdata/en/e6/1dd53bb90cbb1ae10000000a11402f/content.htm
    Regards,
    Suman

Maybe you are looking for

  • Error while packaging or copying from a package

    Hi, I am getting the below error while I try to package ( entire project or individual objects) as well as when I try to copy objects from a package file. Client version: 9.0.3 (537) 15-Oct-2013 07:33:40 java.lang.NullPointerException at com.datanomi

  • 7 questions

    MODERATOR:  Please stop posting interview questions or the thread will be locked and points unassigned. 1. what is Transaction Key? Where we will use? 2.when payment to vendor what entry system will pass? 3. what is organization structure of your cli

  • Adding image file name and logo to image

    Can you do batch processing of images to automatically insert the image file name, say at the bottom along with a logo, in black font. The logo stays constant but the image deatils will change with each image? Can this be done in Lightroom or then th

  • How do I edit the "Content Created" date?

    I've been storing all of my DSLR video in Aperture 3, and would like to import that video (as referenced Events) into Final Cut Pro X.  So far, I've noticed that some of my video is showing a very inaccurate "Content Created" date; is there any way t

  • SMS and Contacts transfer to iponhe

    Hi Guys! I have q10 blackberry lots of contact and message. I already did the backup using blackberry link. how can I extract or transfer my sms and contacts to my ipone?