How to send a ton of data to Servlet

Hi,
I have a servlet to which I want to feed a ton of data from a c++ client that I have built. I do this by doing a GET request over a socket and then recieve data back. The following is my request:
GET /servlets/ConvertRequest?req=<a ton of data>
This however is coming back with the error saying that the URL is too large. How can I send all of this data to this servlet over this socket now? and have it return a processed version of it back. The data is a string form XML document. I would really appreciate any help I can get.
Thank you,
Jay.

The HTTP "GET" method has a specific limit on the length of the request. I can't recall the limit, but I'm sure it's specified in the RFC for HTTP.
What you really want to do is use the HTTP POST method.

Similar Messages

  • How to Send the material master data from sap4.6c to ECC6.0

    Hi
        Friends this is shalini Shah, i got one requirement that is
    how to send the materail master data  from SAP 4.6C to ECC6.0 using XI.
    i  know the file to idoc and idoc to file scenarios but i don't know this one.
    please help me friends, Thanks in advance.
    Regards
    Shalini Shah

    Hi Shalini,
    To trigger IDoc these configurations should be done in the SAP 4.6, XI and ECC 6.0.
    SAP XI
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (IDX1)
    a) Select create new button
    b) Enter the port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Load Meta Data for IDOC (IDX2)
    a) Create new
    b) IDOC Message Type
    c) Enter port created in IDX1.
    SAP R/3 (4.6 and ECC 6.0)
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (We21)
    a) First Select Transactional RFC and then click create button
    b) Enter the destination port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Create Partner Profile (WE20)
    a) Create New
    b) Create the Partner no. name as same the logical system name of the destination system.
    c) Select Partner type LS
    d) Enter details for Type: US/USER, Agent, and Lang.
    e) Click on the + button to select the message type.
    f) Select Partner no. and LS which ever create above.
    g) Select Message type
    h) Select Process code related to the Message type.
    I) save.
    Also go ther the Blog <a href="/people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi Configuration for Pushing IDOC's from SAP to XI</a> By Swaroopa Vishwanath
    U need to import the IDoc types both inbound and outbound to XI.
    1. Create Inbound and Outbound Message interface.
    2. Do one to one message mapping.
    3. Define an Interface mapping.
    ID:
    1. Create 1 Sender aggrement.
    2. Create 1 Receiver aggrement.
    3. Define 1 RD and ID.
    4. Only create an receiver IDoc CC.
    Regards
    San
    <a href="Remember to set the thread to solved when you have received a solution to set the thread to solved when you have received a solution</a>
    Where There is a <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/weblogs/topic/16">blog</a> there is a Way.

  • How to send array of bytes to a servlet and store it in a file

    Hi,
    How to send array of bytes to a servlet and store it in a file.
    I am new to Servlets. if possible for any one, please provide the code.
    Thanks,
    cmbl

    Through HTTP this is only possible with a POST request of which the encoding type is set to multipart/form-data. You can use Apache Commons FileUpload to parse such a multipart form data request into useable elements. From the other side (the client) you can use a HTML <input type="file"> element or a Java class with Apache Commons PostMethod API.
    You may find this article useful: http://balusc.blogspot.com/2007/11/multipartfilter.html

  • Flex: How to send Microphone Stream Audio data to a Rest API

    Hi,
    I needed to capture audio via a microphone and then sent ths instantanesouly to a REST API  for processing. I do not want to use a media server.
    So is it possible to send instataenous audio stream data to my custom servers.
    Thanks,
    Karan

    well i tried this once for one of my scripts and the final conclusion is its not possible to combine two streams into 1.....how would you time/encode the two voices......there is no know solution to this in flash. If you continue on despite me and find a solution please post it so we can explain to rest of world.

  • How to Send realtime MIDI CC data out of VI's (IAC bus?)

    Hello everyone!
    Im in need of some help/advice.. (Tried posting this in another help forum with no luck so trying here)
    Does  anybody know if it is possible to send 'Realtime' Midi CC data out of a Virtual Instrument used in Logic X and out of my MIDI port?
    EG: Turning the Cutoff knob in EXS24 and sending the cc data out of my Midi interface's OUT port?
    Im  hoping there is a way to somehow achieve this using the IAC Bus and  virtual cabling somehow to my Unitor 8 midi interface located in the  Audio Midi Setup section in OSX.. Or am i dreaming?
    (There is no way to assign a Midi OUT destination with a VI from what i can see. Or is there?)
    Really appreciate any help at all.
    Thanks

    Smoke wrote: You see, i would love to do what you said (above) and plug the Midi controller straight into the MPC and do it that way, but there is a simple problem.. The Midi Controller i want to buy, only sends MIDI out of a USB connection (no physical midi output port) which my MPC will not accept, only Midi cables.
    Strange. You intend to use your MPC as your sequencer yet you want buy a MIDI controller that only has a USB port? In your situation I would buy something with both 5pin DIN connectors and USB. It only makes sense.
    Smoke wrote: So! Correct me if i am wrong but the simple solution to this would be to:
    1) Plug this midi controller into my mac via USB and "Learn" Logic's VI's with the Controller's assignments
    2) Somehow, assign the Midi Controller to send to one of my Unitor 8's Midi Out port which will be connected to my MPC.. (This way, all those CC's i transmit will ALSO be sent out to my MPC )
    3) When i play back my MPC, its going to play the VI's just how i tweaked the knobs on that Midi controller.
    Do you see any problem with me achieving # 2?? (it should be possible to do that in the Environment right?)
    If this is all possible, then my question/objective is all solved thanks to you
    No, that won't work. Once you make the assignments with the Launch Control, the VI's will only respond to messages coming from the Launch Control.
    A workaround would be to hijack the Launch Control's port using Midipipe (freeware) so that Logic doesn't even see it, then route the Launch Control's data out of Midipipe via one of Unitor's output ports so that it reaches the MPC. The data would then go through the MPC and back to Logic via one of the Unitor's input ports. You would make the assignments with this data (data coming in from that Unitor port).
    J.

  • How to send different type of data

    Hello, everyone,
    I am trying to send different types of data between client and server.
    For example, from server to client, I need to send some String data, using PrintWriter.println(String n); and send some other stuff using OutputStream.write(byte[] b, int x, int y). What I did is setting up a socket, then send them one by one. But it didn't work.
    I am just wondering if there is anything I need to do right after I finished sending the String data and before I start sending other stuff using OutputStream. (Because if I only send one of them, then it works; but when I send them together, then the error always happened to the second one no matter I use PrintWriter first or the OutputStream first)

    To send mixed type of data by hand allways using the same output/input stream, you could do:
    on server side
            ServerSocket serverSocket = null;
            Socket clientSocket = null;
            OutputStream out = null;
            try
                /*setup a socket*/
                serverSocket = new ServerSocket(4444);
                clientSocket = clientSocket = serverSocket.accept();
                out = new BufferedOutputStream(clientSocket.getOutputStream());
                /*send a byte*/
                int send1 = 3;
                out.write(send1);
                /*send a string with a line termination*/
                String send2 = "a string sample";
                out.write(send2.getBytes("ISO-8859-1"));
                out.write('\n');
            finally
                try { out.close(); }
                catch (Exception e) {}
                try { clientSocket.close(); }
                catch (Exception e) {}
                try { serverSocket.close(); }
                catch (Exception e) {}
    on client side
            Socket clientSocket = null;
            InputStream in = null;
            try
                clientSocket = new Socket("localhost", 4444);
                in = new BufferedInputStream(clientSocket.getInputStream());
                /*receive the byte*/
                int receive1 = in.read();
                System.out.println("The received message #1 is: " + receive1);
                /*receive the string up to the line termination*/
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                int c;
                while (((c = in.read()) != '\n') && (c != -1))
                    baos.write(c);
                String receive2 = baos.toString("ISO-8859-1");
                System.out.println("the received message #2 is: " + receive2);
            finally
                try { in.close(); }
                catch (Exception e) {}
                try { clientSocket.close(); }
                catch (Exception e) {}

  • HOW TO SEND NUMBER OF ITEM DATA FOR ONE HEADER FROM SENDER TO RECEIVER ?

    HI FRIENDS,
    IF WE ARE SENDING A FILE TO IDOC ( SAP R/3. EX : CREMAS03). THEN HOW WE CAN SEND BANK DETAILS OF A VENDOR(TABLE CONTROL) TO RECEIVER IDOC(SAP R/3). PLEASE SEND THE SOLUTION WITH EXAMPLE( SCREEN SHOTS ALSO IF AVAILABLE)

    Hi !
    Check the E1LFBKM segment of the CREMAS03 idoc, it contains the banking data of the vendor.
    Regards,
    Matias.

  • Any idea how to send stereo 8 bit data to SO write.vi and make it work?

    I have two sine wave.vi's generating two different tones, I need to send them as stereo to the SO Write.VI and create left and right tones to someones ears.
    Attachments:
    Stereo_Test_[1].llb ‏303 KB

    You're almost there. You just need to transpose your stereo 2d array. See attached screenshot.
    Tim
    Attachments:
    transpose_2d_stereo.gif ‏4 KB

  • How to send texts to a data file like pdf or doc for legal submittal?

    How can I get my text history into a document format that can be submitted for legal proceedings? I was thinking a .pdf. or .doc format.

    http://www.wideanglesoftware.com/touchcopy/index.php 
    or take screen shot of the text message.

  • Does anyone know how to send additional tones after initial phone number?

    I dial in to many conference call services that require a code to be entered once the initial call has been connected. Is there any way to configure a phone number so that it delays sending the last few digits? This would be very helpful as i cant always remember the code once i have dialed the initial number. Thanks

    That won't work on the iPhone - the reason is that the other apps (Mail, browser, 3rd party apps) hand the number off to the Phone app via an html code (which is why the phone numbers appear as 'links'), and that code does not recognize pauses. It works for contacts because those are 'embedded' in the phone app so the number is dialed directly. Unfortunately, there's no workaround for what you're trying to do.
    You can submit feedback to Apple: http://www.apple.com/feedback/iphone.html.

  • How to send multiple objects from appleto to servlet and vice versa

    how can i send multiple objects(ArrayLists and String) from servlet to applet and applet to servlet?

    Use an HTTPUrlConnection from the Applet to the Servlet to send data to the server, or request information from the servlet. To actually transfer the objects you will have to use a serialized version of the objects, almost always by wrapping the streams generated via the UrlConnection in ObjectOutputStream and ObjectInputStreams.

  • Re: How to send data to  Application Server

    HI Experts,
    Can anyone tell me how to send alv report ouput data to the application server.
    Regards,
    p11272

    Hi,
    You can use Open dataset to transfer internal tables to application server.
    Given below is the Simple code that will help you to extend.
    Parameters to enter the path
    PARAMETERS FILENAME(128) DEFAULT '/usr/tmp/testfile.dat'
                             LOWER CASE.
    Table Declaration
    TABLES VBAK.
    Data Declaration
    DATA D_MSG_TEXT(50).
    Get data for file transfer
    DATA INT_VBAK LIKE VBAK OCCURS 100
                       WITH HEADER LINE.
    SELECT * FROM VBAK INTO TABLE INT_VBAK.
    SORT INT_VBAK BY VBELN.
    LOOP AT INT_VBAK.
      WRITE: / INT_VBAK-VBELN,
               INT_VBAK-KUNNR.
    ENDLOOP.
    Opening the File
    OPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE
                          MESSAGE D_MSG_TEXT.
    IF SY-SUBRC NE 0.
      WRITE: 'File cannot be opened. Reason:', D_MSG_TEXT.
      EXIT.
    ENDIF.
    Transferring Data
    LOOP AT INT_VBAK.
      TRANSFER INT_VBAK-VBELN TO FILENAME.
    ENDLOOP.
    Closing the File
    CLOSE DATASET FILENAME.
    Thanks
    shankar

  • Searching paricular field data using servlet programme

    **How can we search particular field data using servlet programming.**
    **Any one can give code**

    maneeshsahu wrote:
    **How can we search particular field data using servlet programming.**Field? In what?
    **Any one can give code**Sure:
    public class FieldSearcher extends HttpServlet
           public void doGet(HttpServletRequest req, HttpServletResponse resp)
                 String fieldName = req.getParameter("field");
                 if (field != null)
                     // put your "field search" code in here.
    }%

  • How to send data from internal table to the shared folder in ABAP

    Hi experts,
             My requirement is to transfer data from a file to shared folder. i just did reading data from a file to a internal table. Now i want to send this internal table data into a shared folder which is  "
    xxx\y\z....".
    I do not have any idea on how to send data from internal table to the shared folder path.
    can anybody please help me out how to do this?
    Thanks & Regards
    Sireesha.

    Where that folder is located, its on presentation server i.e. desktop or application server.
    If its on presentation server, use FM GUI_UPLOAD.
    If its on application server, then use DATASET functions. Have a look at below link.
    [File Handling in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm]
    I hope it helps.
    Thanks,
    Vibha
    Please mark all the useful answers

  • How to send PR & PO data for materials through IDOC in XML

    Hi Experts,
    I am looking for a solution to send open PR & open PO related data for diffrent materials through as IDCO in XML file.
    Scenario is i have to show a report in a 3rd party system for open PR & open PR that too will come after selection some materials. That means select a materials & it will show all the open PO & related data in a report.
    The rough idea for the solution i got is I can save the data in XML file in the system. For this i have to send IDOC. but the problem is there is no message type for PR. IF i am not wrong i can extend the MATMAS05 for a segment that will have PR related info.
    Now what to do with that how to send the IDOC do i need to create another report to send IDOC or i can send the extended one through BD10. I tried it but it shows error message "0 communication idoc sent" so I dont no y such error is coming i think i am not filling the extended idoc. But again my QUestion is how to do that. If anyone have any other solution Please help me out of this.
    Regards,
    Nik

    Hi Alpesh,
    Thanks for your reply.
    My requirement is bit different. i have to send Open PR data for diffrent materials. In a 3rd party application user will search for few materials which will generate a report that will show the PR related data for those material.
    Same thing i have to do for PO & Sales order also.
    Can u please help me to provide the solution how can i proceed for it. U have given the Message type & a bapi how it will help in my issue?
    I got a suggesion from someone that extend message type matmas for PR, PO, SD related data & send the idoc. but i am confused how to pass that much data ina single IDOC.
    Regards,
    Nik

Maybe you are looking for