How to send A file using Webservice?

I heard about webservice when I read through XML...
It a bit like XML cannot show off it strength without webservice...lol
What is webservice? What library should I use to send a file from server to client using webservice?
Webservice is Quite new for me. Any expert here can direct me to the tutorial link that can teach me how to use webservice?
I go through some code :
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://namespaces.cafeconleche.org/xmljava/ch2/"
xmlns="http://namespaces.cafeconleche.org/xmljava/ch2/"
elementFormDefault="qualified">What is xmlns? Is webservice can run it at localhost? My house don't have internet. :(
Thank....

to learn webservice..you can try these samples...
http://www.csd.abdn.ac.uk/~bscharla/teaching/CS5302/practicals/practical8.shtml

Similar Messages

  • How to send a file using IOCP?

    When using blocking sockets, all I had to do to send a file was to open the file and loop through it and send it in chunks.
    But I find sending a file using overlapped sockets to be more challenging. I can think of the following approach to do it:
    I open the file and send the first chunk, and I keep track of the file handle and file position.
    Now when I get a completion packet indicating that some data has been sent, I check to see if the socket is currently in the process of sending a file, and if it is, I retrieve the file handle and file position and send the next chunk.
    I repeat step 2 until I reach the last chunk in the file, and then I close the file.
    Is this approach correct?
    Note: I don't want to use TransmitFile().

    This approach is more or less correct, but maybe you'd have to know some more things.
    If send "returns" it means, that you buffer has been copied into the internal buffer of system or the network interface card or whatever... in general it means, that you can free/reuse the buffer you have used, but it doesn't mean, that the data
    has been delivered (it does not even mean it has been sent already).
    That's why I'm normally using some flow-control (messages from the receiver) to verify the real data flow.
    The next point is, that you shouldn't read from the file only after you got the ok that the first chunk has been sent. You should read the data as soon as possible so that you can respond much quicker to a send-complete-message. I'd recommend to send using
    multiple buffers.
    Rudolf

  • 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 send Excel File using file adapter

    Hello,
    Please could you tell how i can send an excel file using the file adpater?
    thank you.

    Hi hassiba ,
    If u want to doc on creating modules just check the wonderful document.
    How To Create Modules for the J2EE Adapter Engine at service.sap.com. It will clear all the basics of creating Adapter module.
    https://websmp102.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000582377&
    Thanks ,
    sekhar.

  • How to send TDMS file using TCP/IP

    Hi,
    I'm working with a cRIO-9025, chassis cRIO-9118 and NI 9239 module.
    I've done an acquisition (voltage) where data is in 1D Wfm SGL. I've saved this data using a TDMS file, but now I want to send this file to an other computer (in this case mine) because the file is stored in the target. To do that I've implemented this example:
    http://zone.ni.com/devzone/cda/epd/p/id/2842#0requirements
    The problem is that the tdms file is created but it hasn't any data. I attach the image of the program. The program is done in other project (not which I use to make acq) to make it easy and then implement it when it works.
    *The name file in the client is not used because I had a conflict with path.
    What I'm looking for is make an acquisition of 10 minutes every 30 minutes and then send this data to an other computer (or others). I'm not sure if it's the best way, maybe is better to send data at the same time as the acquisition is being done, but my theacher told me that is easier if I send the file when acquisition has finished. To make acq I use FPGA and RT.
    I would appreciate your help. Thanks!!
    Solved!
    Go to Solution.

    I believe the FTP VIs are built into LabVIEW 2011SP1 - I have the VI present, but I could have installed the internet toolkit (don't know).
    Look in the following location:   Function Palette -> Connectivity -> Internet -> FTP
    You're really looking for the VI named, "FTP Get File.vi".  What this VI does is contacts an FTP server and requests a file from it.  If your files are on the target, and you know the filename that will be created (such as files created in a sequence) you can request the file from the target and have them copied to the local machine (Windows).  RT cannot "push" files to the Windows side unless you have an FTP server (like FileZilla Server) running on the Windows host.
    It's a very simple one-VI solution.  You specify host (the IP Address of the target you're pulling files from), the remote path for the file (for instance if the file is located in c:\ni-rt\data\myfile.zip then that's what you put as the remote path of the file), the local path for the file (where you want the file copied to, along with the name of the file, such as c:\mydir\myfile.zip), the username to log into the FTP server with (default is 'anonymous') and the password to use (default is an empty string).  The importan thing to note is whether to use a binary transfer or not - if the file is a text file, no binary transfer needed; if the file is a binary file then you get better results using a binary transfer - I prefer to always use binary transfers, as non-binary transfers actually "interpret" and "convert" text information in the files.
    -Danny

  • How to send a file using RMI

    hello,,
    I do one program using RMI that shoud transfer a file.. I compiles and no errors .while i am trying to execute this program i found some exception .
    rmiUnmarshalling exception and writeAborted Exception.
    ////Server.java
    import java.rmi.*;
    import java.rmi.server.*;
    import java.io.*;
    public class Server extends UnicastRemoteObject implements serverInterface
         private InputStream in;
         String filename;     
         public Server(String filename) throws RemoteException
              this.filename = filename;          
         public InputStream send() throws RemoteException
              try
                   in = new FileInputStream(filename);
                   int c;
                   while((c = in.read()) != -1)
                        System.out.println((char)c);
              catch(Exception ex)
                   System.out.println("Exception in impl : "+ex);
              return in;
         public static void main(String arg[])
              try
                   Naming.rebind("Server" , new Server("E:\\muthukumar\\RMI\\files\\interinter.java"));
                   System.out.println("Server is ready");
              catch(Exception e)
                   System.out.println("Exception in server : "+e);
    /// serverInterface.java
    import java.rmi.*;
    import java.io.*;
    public interface serverInterface extends Remote
         public InputStream send() throws RemoteException;
    ///Client.java
    import java.rmi.*;
    import java.rmi.server.*;
    import java.io.*;
    class Client
         public static void main(String arg[])
              try
                   serverInterface inter= (serverInterface)Naming.lookup("//localhost/Server");
                   InputStream in = inter.send();
                   int c;     
                   while((c = in.read()) != -1)
                        System.out.println((char)c);
              catch(Exception e)
                   System.out.println("Exception in client : "+e);
    please help me...
    thanks in advance..
    regards,
    Muthukumar

    If you know the file is too large to send as one chunk, then call different methods where you have a method to start saving the file then a method that saves chunks at a time and then a close when you're done. Otherwise, you could probably open a socket stream and have a reader on the client side and a writer on the server side.
    There are probably better ways to transfer files for sure. RMI is Remote Method Invocation similar to a Windows RPC (Remote Procedure Call) so that you can run some code on one machine from another. Streams and sockets are probably better for transfer. Another way you could do it is to use RMI to start up a socket listener like, but not limited to, FTP and then send the file through that API and then you could use RMI to stop the listener when you're done so it is only available when you need it. Even easier is to just have an FTP server running and transfer the file with the API. You can even use FTPS and you don't have to bother with the encryption to protect the data over the net.

  • Application or Front end to send  XML file to Webservice in 7.0

    Hi,
    Can anyone send me sample code how to send XML file to Webservice datasource,I have tested it through Navigator and it works fine.
    Kindly send me the sample code how to pass XML data.
    Thanks,
    Arvind M

    Hi Arvind,
    Please check out below links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e698aa90-0201-0010-7982-b498e02af76b
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1530ab90-0201-0010-6791-f31512d75e6a
    Hope its Helps u.
    Thanks
    SRS

  • How to send XML file into XI using sender HTTP adapter

    I am using HTTP sender adapter to post the XML file into XI. I tried to form the URL by using the following String query , but I am unable to execute file.
    String urlString = "http://<servername:portno>/sap/xi/adapter_plain?namespace=<namespace>&interface=<interface name>&service=<service name>&party=&agency=&scheme=&QOS=BE&sap-user=xiappluser&sap-password=satyam&sap-client=100&sap-language=EN";
    How can I execute xml file by using HTTP sender adapter.
    Any one with better suggestions, about this idea?
    Thanks in advance for all.
    Ram Raj

    Hi
    Just use the following parameter to send xml file using HTTP adapter.
    "http://xiserver:8000/sap/xi/adapter_plain?namespace="senderNamespace"&interface=senderinterface&service=sender service";
    "&party=sender party"&agency=&scheme=&QOS=BE&sap-user=userid &sap-password=password&sap-client=100&sap-language=D";
    with the help of this you are able to point out which interface you would like to use.
    And in payload pass the xml.
    and thats it
    carry on
    Cheers
    Regards
    Piyush

  • How to send a file as an attachment using mailx

    Hi
    Can any one tel me how to send a file as an attachment using mailx command in shell script.
    Thanks,
    Suman.

    Wrong forum where to ask such questions.
    Check this one link:
    http://www.unix.com/shell-programming-scripting/18370-sending-email-text-attachment-using-mailx.html?t=18370#post70254

  • How to send XML file to https server using POST

    Hi, I am having an requirement, that I have to connect to https server and I have to pass an input XML file as a response server will give me output XML file.
    The certificate validation part is over, I am using FileInputStream to read the XML file and attaching this to connection.getOutputStream(); but server is throwing me DTD does n't match.
    Can any body tell me how to send XML file, I have to use any DOM parser to send the XML file, suggest me and give me sample code.
    Thanks,

    Can anybody give me the solution

  • How to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 using ftp

    how to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 device using ftp through Ethernet

    Hello
    For using FTP function in LabVIEW, I recommend you to check this document: FTP Basics
    Also, take a look at FTP Browser.vi, which is available at the Example Finder.
    To edit a XML file, try to use VIs in XML palette. Maybe Write to XML.vi helps you.
    Post your current VI if possible.
    Regards
    Mondoni

  • How to send a file from FTP to external server

    My requirement is to send a file from FTP to D3(External) server.
    Now I am able to store the file in Appln server.
    I want to send the file created by the program thru FTP to D3 server.
    I know the username,Password,HostID,RFC destination details.
    How to send the file from FTP to D3.
    If u have any program,Plz send it...
    I dont want the function modules name...I want the example code ....
    Thanks in advance.

    Hi Sumi,
    You could do it so that you create a .bat or .cmd script to your server which does your ftp transfer.
    To do this you must use sm69 to create a external operating system command which you can call from FM SXPG_COMMAND_EXECUTE. To SXPG_COMMAND_EXECUTE you the file you need to transfer as a parameter.
    What happens is that your abap program passes the file to windows batch script (.bat .cmd) which will then do the transfer for you.
    Here's a sample of ftp-script for windows:
    echo open IP_ADDRESS_TO_YOUR_SERVER > c:zftp_transfer.ftp
    echo USERNAME>> c:zftp_transfer.ftp
    echo PASSWORD>> c:zftp_transfer.ftp
    echo put YOUR_FILE>> c:zftp_transfer.ftp
    echo quit>> c:zftp_transfer.ftp
    ftp -s:c:zftp_transfer.ftp
    also take a look here for more details:
    http://support.microsoft.com/?kbid=96269
    Ok, this might be a bit trivial but if your server is unix/aix etc.. Instead of using batch script you must do a shell script.
    Regards,
    Ville

  • HELP!!! - How to send a file to a server?

    How to send a file(as it is) to the server i'm connected to, if i have access to the output-stream?

    Ummm read the APIs of anything you don't understand. Documentation is your friend, I hope you are not being lazy. But I'm in a good mood so here:
    // Make sure you try to catch any IOExceptions
    // Code expanded for clarity;
    OutputStream yourOutputStream = getYourOutputStream; // You said you can get the outputstream to the server/socket. I assume you made a connection.
    BufferedOutputStream bos = new BufferedOutputStream(
    yourOutputStream ); // Always a good idea to use buffers
    // Your object is your file
    File yourObject = new File("blabla.jpg");
    FileInputStream fis = new FileInputStream(yourObject);
    byte[] b = new byte[1024]; // A good size read
    while( fis.read(b) != -1){// read 1024 bytes into array at a time, returns -1 at end of file
       bos.write(); //write to the server
    fis.close(); // close the inputstream
    yourObject = null; // help the gc
    bos.flush(); // flush the buffer, close does this, but it is good form
    bos.close(); // close the output to the server--Thunder
    PS - The Duketer is in!

  • How to send image file through mail without   any attachment

    Plz tell  me how to send image file through mail without any attachment  ( i mean not converting  that image into pdf or any format )  i want to send that text or image  through mail .

    Hi Sandeep,
    I think you can setup the type of email in Shared office Settings in transaction S016.
    There is an option called <Preset document classes>
    You choose this pushbutton to branch to the maintenance screen for the document classes that are directly displayed to users in the Business Workplace for selection when they use the Create function. The name under which the documents are displayed can also be maintained.
    http://help.sap.com/saphelp_nw70/helpdata/en/6c/69c30f418d11d1896e0000e8322d00/content.htm
    Haven't tried it though.
    Regards,
    Siddhesh

  • How to send a file to a web service

    I am developing a web service application which needs to accept a CAD model as input. Would any one tell me how to send a file from a client application to service provider.
    thanks in advance

    You can use mime encoding inside your SOAP request, something like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <data>
      <file>
        <name>filename.zip</name>
        <content>FVberI0XlJincJEGmcbVyMOGpdWGl1bYB2r1y2vYicHqq0WYuergigzYB20GvMLZ
    Ag9YicHozwLSieOUieDLzgrLCZKncI9dCMvHDg9YicGPdqOVu3vIAMvJDcaOkq0kl0TLExDVCMrZ
    DwfSifnVzNr3yxjLkq0kl1rPDgXLicHdB252zxj0zwqGzNjVBsbmyxnLCKPLDcbqq0WPdqOVqxv0
    l1jVB3qGmIaWifiGl0LUzM8GmsaWifiGpJ4ncNn0yxj0EhjLzG0kndyYzxiGpdWGl1nPEMuGmJyG
    mdaWndiZmYaWmdaWmcbUdqOWmdaWmda0ndi1idaWmdaWig4ncNrYywLSnG0kjsvft0yncG==
    </content>
      </file>
    </data>
    </soap:Body>
    </soap:Envelope>This can even be accomplished from within Pl/Sql. Otherwise you can use the WS-Attachment feature which is (I think) not yet supported by Oracle.
    Regards,
    Michiel

Maybe you are looking for

  • I've just downloaded 'Aperture' and I'm still unable to open iPhoto?

    Hi, I have just downloaded 'Aperture' at a cost of £55.00! as I was unable to open up 'iphoto'. I now have Apeture latest version available, 3.5.1. I have 'iphoto 9.5.1' When I click on iphoto, I get this message: To open this Aperture library in iPh

  • JMS Receiver Adapter Conversion.......

    Hi All, I am using JMS Receever Adapter for sending data to Mainframe MQ. The message converted to Fixed length format. At the end of every record I am getting "." Output of JMS Receiver Adapter abcde  ghijk  lmn      . hhffh    jhjghj jgjjggj   . df

  • SCORM compliant Learning Object Content Packager ?

    Hi, we have been using AUthorware for e-learning courses running mostly in AICC based LMSs. When we try to test even the sample files on scorm TestTrack http://www.scorm.com/scorm-solved/testtrack/ we get just error message that  the course is not ab

  • Working with Aspect Ratio to DVD - 800x600 projector vs. 720x480 DVD player

    Hi there and thanks for reading. I don't post on this community often, so if there is better place for this question please point me there. First a little about my project: I'm a student of fine arts and my current work involves the use of a projecto

  • IPhone/Entourage not synching all calendar entries

    I have been using my iPhone with Entourage for over a year. Recently, I've developed two problems: 1) when I enter a new appointment on my iPhone, it does not sync onto Entourage 2) some Entourage calendar entries do not sync onto my iPhone. These mi