Send an IDoc over JCo

Hi,
I'm a newbie and I'm wondering if its possible to send an IDoc with the JCo to the SAP-System.
It's a work for university, but nobody here has any experiences with SAP.
I've got a Mini-WAS 6.20 Testsystem (the one with the Flightbooking example on it). I have an IDoc (with an order) generated from an java application.
My part is to get this IDoc in this SAP-System. Only get it somehow stored, thats all. No checking if order is somehow valid, concerning availability or whatever.
Question:
- Can I send an IDoc with JCo?
- In order to store this IDoc, can a BAPI (or whatever other possibilities there are) do the "storing" for me?
- What else must I configure?
- Is there a good tutorial for my problem?
Any suggestions are very welcome, since I need a starting point.
Thanks
Jonny

Hi, Johannes!
<b>- Can I send an IDoc with JCo?</b>
Yes you can. All you need is SAP Java IDoc Class Library.
<i>
The SAP Java IDoc Class Library consists of two parts, the SAP Java Base IDoc Class Library and the SAP Java Connector IDoc Class Library.
The packages of the SAP Java IDoc Class Library include the software as well as documentation. The SAP Java Base IDoc Class Library provides an API which helps navigating, reading, filling, and modifying IDocs. This base package is middleware independent. Creating, sending, and receiving IDocs is middleware dependent. To make use of the SAP Java Base IDoc Class Library you will need an additional middleware dependent add-on package implementing the defined interfaces like the SAP Java Connector IDoc Class Library. In the package of the SAP Java Connector IDoc Class Library examples are included.
The Windows NT / 2000 Ports of the SAP Java IDoc Class Library are shipped as zip files. The Unix Ports of the SAP Java IDoc Class Library are shipped as tgz files.</i>
<b>- In order to store this IDoc, can a BAPI (or whatever other possibilities there are) do the "storing" for me?</b>
Storing of IDoc is performed on the receiving part - system does it automatically.
<b>- What else must I configure?</b>
You have to set up logical destination for JCo partner as well as inbound partner profile for corresponding IDoc message type.
<b>- Is there a good tutorial for my problem?</b>
Working examples and java docs included in SAP Java IDoc Class Library distribution is a good starting point.
Regards,
Maxim.

Similar Messages

  • SEND IDOC using JCO(Priorty -HIGH)

    Hi, all
    I am facing to send IDOC through JCO(Java Connector Object). if some body have idea then reply me.
    In previous dovelopment i was using BAPI for save data . Now my requirement is IDOC.
    Regards,
    Sandeep
    Edited by: sandeep verma on Jan 2, 2009 2:41 PM
    Edited by: sandeep verma on Jan 2, 2009 2:41 PM

    hi sandeep,
    check this thread this will give the idea
    Re: Send an IDoc over JCo
    Sending Idoc to a java application
    Sending IDoc to java
    let me know  uneed any further info
    bvr

  • Send an IDOC

    Hi Team,
       i have a requirement like whenever the asset is created i need to send an idoc (From one client to another client)
    could you please suggest me the best method ...to do the same
    Regards,
      Pradeep.B

    Hi, Johannes!
    <b>- Can I send an IDoc with JCo?</b>
    Yes you can. All you need is SAP Java IDoc Class Library.
    <i>
    The SAP Java IDoc Class Library consists of two parts, the SAP Java Base IDoc Class Library and the SAP Java Connector IDoc Class Library.
    The packages of the SAP Java IDoc Class Library include the software as well as documentation. The SAP Java Base IDoc Class Library provides an API which helps navigating, reading, filling, and modifying IDocs. This base package is middleware independent. Creating, sending, and receiving IDocs is middleware dependent. To make use of the SAP Java Base IDoc Class Library you will need an additional middleware dependent add-on package implementing the defined interfaces like the SAP Java Connector IDoc Class Library. In the package of the SAP Java Connector IDoc Class Library examples are included.
    The Windows NT / 2000 Ports of the SAP Java IDoc Class Library are shipped as zip files. The Unix Ports of the SAP Java IDoc Class Library are shipped as tgz files.</i>
    <b>- In order to store this IDoc, can a BAPI (or whatever other possibilities there are) do the "storing" for me?</b>
    Storing of IDoc is performed on the receiving part - system does it automatically.
    <b>- What else must I configure?</b>
    You have to set up logical destination for JCo partner as well as inbound partner profile for corresponding IDoc message type.
    <b>- Is there a good tutorial for my problem?</b>
    Working examples and java docs included in SAP Java IDoc Class Library distribution is a good starting point.
    Regards,
    Maxim.

  • Error sending IDOC from JCO Client to PI AEX 7.3.1

    Hi All
    We have a requirement to send an IDOC from a non SAP System to our ECC via PI AEX :
    JCO.Client --> PI AEX --> SAP ECC
    At this time, we are testing this scenario with a JAVA Client with JCO Library (3.0.10).
    Destination to PI is OK
    Destination to our SAP ECC (for IDocRepository) is OK
    But by sending the IDOC to PI we are getting the following error, Exception is raised on the PI System and sent back to the JCO Client :
    com.sap.conn.jco.JCoException: (104) JCO_ERROR_SYSTEM_FAILURE: while trying to invoke the method java.lang.Object.hashCode() of an object loaded from local variable 'key' (raised by system <extern>|PiSystem)
        at com.sap.conn.jco.rt.MiddlewareJavaRfc.generateJCoException(MiddlewareJavaRfc.java:670)
        at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.execute(MiddlewareJavaRfc.java:1881)
        at com.sap.conn.jco.rt.ClientConnection.execute(ClientConnection.java:1120)
        at com.sap.conn.jco.rt.ClientConnection.execute(ClientConnection.java:953)
        at com.sap.conn.jco.rt.RfcDestination.execute(RfcDestination.java:1465)
        at com.sap.conn.jco.rt.AbapFunction.execute(AbapFunction.java:319)
        at com.sap.conn.idoc.jco.JCoIDoc.send(JCoIDoc.java:323)
        at com.sap.conn.idoc.jco.JCoIDoc.send(JCoIDoc.java:353)
        at sap_connector_examples.IDocClientExampleToJavaPO_pbs.main(IDocClientExampleToJavaPO_pbs.java:97)
    Caused by: RfcException: [<extern>|PiSystem]
        message: while trying to invoke the method java.lang.Object.hashCode() of an object loaded from local variable 'key'
        Return code: RFC_SYS_EXCEPTION(3)
        error group: 104
        key: RFC_ERROR_SYSTEM_FAILURE
    Exception raised by <extern>|PiSystem
    PI Destination:
    jco.destination.repository_destination=ABAP_AS_WITHOUT_POOL
    jco.client.gwhost=PiSystem
    jco.client.gwserv=sapgw01
    jco.client.tpname=XI_IDOC_DEFAULT_PID
    jco.client.type=E
    ECC Destination: (ABAP_AS_WITHOUT_POOL)
    jco.client.lang=en
    jco.client.client=100
    jco.client.passwd=****
    jco.client.user=User
    jco.client.sysnr=00
    jco.client.ashost=ECCSystem
    We have already set the PI VM System parameter  jco.allow_non_abap_partner to 1
    ECC User has S_RFC Rolle
    I will be thankful for any advise.
    Thank You
    Regards
    Stéphane

    Hi
    InboundRA (Resource Adapter) is green (Fully available).
    What do you mean by maintaining JCO RFC Destination in PI ?
    We have set the inboundRA Properties has follow :
    ProgramID : XI_IDOC_DEFAULT_PID
    DestinationName : XI_IDOC_DEFAULT_DESTINATION
    Local: true
    mutliRepository : ED1=XI_IDOC_DEFAULT_DESTINATION_ED1;ES4=XI_IDOC_DEFAULT_DESTINATION_ES4;MD1=XI_IDOC_DEFAULT_DESTINATION_MD1;ES1=XI_IDOC_DEFAULT_DESTINATION_ES1;PD1=XI_IDOC_DEFAULT_DESTINATION_PD1;
    GatewayServer and Service are pointing to our PI System
    BindingKey : PI_AAE_IDOC
    And for each Repository we created a destination in NWA pointing to the corresponding ECC System.
    (target host pointing to the ECC System and the Gateway host  pointing to the PI System)
    Our Installation isn't new but it is the first time we are configuring the System for this scenario:
    JCO.client --> PI AEX
    Regards
    Stéphane

  • Problem while sending idoc over xml http

    Hello all,
      We have developed a scenario to send the idocs from SAP to Java(Tomcat) web server. Its was working fine. But SOMETIMES the idoc status will be set to 03(Data passede to port OK) on the SAP side, but no data(no xml string) received in the web server. is this depends on the size of the idoc? or due to some JVM settings of webserver??Could someone suggest us a way to identify the problem.
    Thanks in advance
    Regards,
    Vishu.

    Asit Purbey,
      i have send 2 idocs  with different number of segments. idoc with 2 segments is successfully received in the webserver, but the idoc with 100 segments didnt received in the webserver. Then i processed RBDMOIND but both the idocs remain in status 03.. Please help me to figure out the problem......
    Regards,
    Vishu.

  • Limit send of IDoc from SAP-ERP to SAP-XI or a Non-SAP

    Hi guys,
    I send the following IDocs from SAP-ERP over SAP-XI to Non-SAP for an initialload: Artmas, Bommat, Infrec, Cond_a, Mmaddi, Cremas
    Example: Artmas with TA: BD10.
    Problem: SAP-ERP send all 25'000 IDoc to SAP-XI. The effect is that the qRFC and tRFC in SAP-XI is full, because the Non-SAP is not fast enough to takeover the Idocs. From then other systems can't send out or get in Idocs.
    I tried to limit in WE20, but it didnt work. TA: RSEOUT00 ist not so useful, because of the quantity of the IDocs.
    Is in SAP-ERP a possibility to limit the sending of IDocs to SAP-XI or Non-SAP?
    Example: Automatic sending of 200 Idocs every 2 Minute.
    Thanks

    may be u can write a wrapper above BD10 this way
    report zaRs message-id b1.
    select-options: matsel for marav-matnr matchcode object mat1.
    parameters: receiver like tbdlst-logsys no-display.
    start-of-selection.
      select * from mara into i_mara where matnr in matsel.
      refresh : matsel.  
      v_no = 0.
      loop at i_mara.
        move i_mara-matnr to matsel-low
    * fill up sign option etc.
        append matsel
      do.
       move mara
       if v_no = 200.
        submit rbdsemat  " Program behind BD10
              with logsys eq receiver
              with matsel in matsel
              with mestypat eq 'ARTMAS'
              and return.
              wait 20 seconds
        exit.
        clear v_no.
       endif.
      enddo.  

  • Send/Receive IDOCs (XML) from/to SAP R/3 with XI-SOAP without XI!

    Dear SAP specialists,
    (BACKGROUND) We are using the Microsoft BizTalk Adapter for SAP 1.0, developed on top of the SAP DCOM Connector (we are using the version 6.20 Patch Nr. 177), with Microsoft BizTalk Server 2002 SP1 in order to send and receive IDOC via the tRFC transport protocol. We are using the Microsoft BizTalk Adapter for SAP 1.0 since February 2002, and today we are exchanging more than 25,000 IDOC/day with this architecture.
    When we migrate our SAP R/3 system to the version 4.7 with WAS 6.20, I was very enthusiastic about the possibility of sending the IDOC in XML via the standard HTTP transport protocol, because it would considerably simplify my architecture, i.e. no need of any (expensive) adapter any more! But, I had to realise that the quality of service exactly once will not be there anymore with HTTP as it exists with tRFC. Then, we carry on using the tRFC transport protocol with the adapter.
    (QUESTION) But recently, I followed the SAP Course TBIT40 XI Foundations and I learn that:
    1.     On one hand, the XI-SOAP protocol supports the quality of service exactly once by the usage of a message GUID within the XI-SOAP envelope;
    2.     On the other hand, all mySAP solutions using WAS 6.20 (or higher) carry a “small” Integration Engine (with XI-SOAP as the “native” transport protocol).
    Then, my question is: << Is it possible to exchange IDOC (XML) directly with an SAP R/3 4.7 (WAS 6.20) via the XI-SOAP transport protocol using the “small” Integration Engine embedded into it, with the quality of service exactly once? >>
    Many thanks in advance and best regards,
    Patrice Krakow

    Hello Patrice
    We have same issue. Is it possible to use IDoc (XML) directly with SAP 5.0 with SOAP (HTTP) without XI?
    Since your que is three years old, I'm sure you must have found some method for this.
    We'll highly appreciate your help.
    Regards: Gaurave

  • How can i use an existing vpn connection without using the option "Send all traffic over vpn connection"?

    I have been trying to get my computer (os x.7) to astablish a remote desktop connection to my work computer via a vpn tunnel. In fact I have just discovered that it works fine if i select to "send all traffic over vpn connection" from the options in the advanced setup of the vpn.
    If the option is selected microsofts "Remote desktop connection for mac" works just fine. However without selecting the option it is not taking advantage of the tunnel but tries to connect as if the tunnel would not exist.
    Now the question is how do I get program to use the vpn tunnel without checking the above option?
    Thanks for any hints and pointers.

    Then can her computer be authorized to both accounts?
    Absolutely. You can authorize any given computer to up to five iTunes Store accounts.
    If purchases are made on her account, to a computer authorized to my account, can I put those songs on my iPod?
    If you connect your iPod to her computer, yes. Tracks download only to the computer from which they're purchased, regardless of which iTunes Store account is used for the purchase. Or you could copy the tracks from her computer to yours and then authorize your computer to her iTunes Store account. But that's sort of defeating the original purpose, it would seem to me.
    is it better to buy music through Amazon downloads and/or actually purchasing CDs to avoid the security features iTunes puts on its music?
    That's certainly an option. If it's an entire album I want, I buy CDs. That way I can import them at the quality I want and to whichever of my systems I want. Amazon or one of the other download stores that offer tracks as MP3 are also an option, though for me download stores are best when you just want a couple of tracks off a given CD.

  • Issue with the configuration of http xml port for sending the idoc

    Hello,
          I am planning to send multiple idocs in a single file using http xml port.
    Presently I am trying to send a single idoc, but am having the issue.
    I am trying to create a RFC for HTTP XML port of type H i.e. HTTP Connection to ABAP System
    In the how to guide for - How Tou2026 Send Multiple IDocs Within One XI Message
    ( https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30ea2fdf-f047-2a10-d3a2-955a634bde6b )
    the following parameters are defined for the path prefix -
    RFC destination of type H (HTTP Connection to R/3 System).
    Specify the path prefix as follows:
    /sap/xi/adapter_plain/
    ?namespace=< your namespace>
    &interface=<IDoc_Type>
    &service=<Sender System>
    &qos=EO (or EOIO).
    I am trying to use the following prefix -
    /sap/xi/adapter_plain/
    ?namespace=urn:sap-com:document:sap:idoc:messages ( this is the standard namespace of SAP for all the idocs)
    &interface=DEBMAS05 (Idoc type )
    &service=SNDLS100 ( ECC system name )
    &qos=EOIO
    On testing the RFC connection, I am getting the error of page not found.
    Can anyone please give me pointers for the issue.
    Regards,
    Mayank

    Thanks Barry!!!
    Now I am getting a different message.
    In RFC...it is giving me the following message ->
    Status HTTP Response     204
    Status Text     Body is empty
    In case of Idoc, the status is till 02...
    the error description for the idoc is --
    "When transferring the IDoc by HTTP, the return code with the message '500<SAP:Error><SAP:Category>XIServer</SAP:Category><S' has occurred.
    The target address was: http://emgeccsnd1:8001/sap/xi/adapter_plain/?namespace=urn:sap-com:document:sap:idoc:messages&interf
    Check whether the IDoc can be sent again.
    It is unfortunately not possible to determine automatically whether the IDoc has in fact arrived in the target system and the error occurred afterwards"
    I am still not able to resolve the issue.
    Regards,
    Mayank

  • What all configurations to do in SAP R/3 to send an iDOC to XI system

    I want to send an idoc from an SAP R/3 ECC5.0 to an XI system Netweaver 04's.
    Pls let me know the STEPS I HAVE TO DO IN MY r/3 SYSTEM .
    I have created the RFC destination in R/3 and XI system but still the idoc is not going into XI system.
    It would be a great help if i can get step bu step guide for the configurations i have to do in R/3 .

    Hi,
    First check the status , with we02
    Also see the below links
    IDOc testing - /people/suraj.sr/blog/2005/12/29/generate-test-case-for-an-idoc-scenario
    /people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters - IDoc to File
    /people/sravya.talanki2/blog/2005/10/27/idoc146s-not-reaching-xi133-not-posted-in-the-receiver-sap-systems133 - Idoc’s not reaching XI…. Not posted in the receiver SAP
    idoc settings /people/ravikumar.allampallam/blog/2005/02/23/configuration-steps-required-for-posting-idocsxi
    idoc erros - http://help.sap.com/saphelp_nw04s/helpdata/en/6a/e6194119d8f323e10000000a155106/content.htm
    IDoc erros troubleshooting - /people/raja.thangamani/blog/2007/07/19/troubleshooting-of-ale-process
    idoc mapping - /people/james.guanzon/blog/2006/03/23/how-to-support-industry-standards-in-xi-part-ii-of-iii--mapping
    Regards
    Chilla

  • ABOUT DATA SENDING IN idoc TO file SCENARIO

    How the data is sended in idoc to file scenario?
    what is the difference in sending data through BD10, BD14 and WE19 ?
    Is the data is sended through XI OR R/3 SYSTEM?

    Hi Rammohan
    >> How the data is sended in idoc to file scenario?
         Makeing settings in SAP R/3 side then based on the RFC
         destination,port,parterner profiles.....
         Idoc can hold the data with out any direction but RFC port will direct where to
        go ...based on the partner profiles (Out buond IDOCS)
    >>what is the difference in sending data through BD10, BD14 and WE19 ?
        BD10,BD11,BD12,BD13,BD14 will be to send the master data automatically
        generally will be in the production(But not for testing) and this will be depending
        on the declaration of profiles in the BD64
        --- But we19 will be used to test the Idocs with any data
            but here we need to give all the parameters like senders,receivers,ls,idoc...
    >>  Is the data is sended through XI OR R/3 SYSTEM?
         Data will send through XI  i.e XI will receive the Idoc and Convert into XI specific
         SOAP XML message and process all the pipe line steps ...based on the target
         it will send
         Here target is file so choose the file adapter as target and give all parameters
         it will work fine
    I hope this will answer your question
    regards
    --- prasad

  • Is it possible to use BAPI-ALE to send an idoc using the message control?

    Hi Guys
    Is it possible to use BAPi-ALE to send an IDOC using a message control?
    I have configured the system to send an IDOC when a outbound delivery is saved in the system.
    I have done the following.
    1). I am using the std BAPI-ALE interface provided by the object type LIKP.
    2). I am using the method SAVEREPLICA for which an interface already exists in BDBG transaction.
    3). I hace created a distribution model in BD64 and added the BAPI - LIKP and SAVEREPLICA
    4). Created a partner profile ( using the generate partner profile option in the BD64 transaction )
    QUESTION:
    1). How do i associate the custom OUTPUT type created for Delivery ?
    2). I tried to associate the custom output type in the Partner profile definition under the message control tab but i am not sure which Process code to be used? Since the partner profile was generated automatically from BD64 it has an entry for SHP_OBDLV_SAVE_REPLICA as a message type in the outbound parameters. and i am unable to find a process code for this Message type in WE41. So what process code should i use in the Message control tab against the custom output type?
    3). Do i need to leave the message control tab empty without making any entry? If yes then how would the system come to know that it needs to trigger this partner profile when the custom output type is proposed by the system?
    will award points for useful answers
    Edited by: Workflow  learner on May 29, 2008 8:49 PM

    "any way"
    Applications such as ScreenRecycler, http://www.screenrecycler.com/ScreenRecycler.html, can do it.

  • Error in sender sap idoc side

    Hi Experts,
                1,  When the sender post idoc to PI it shows the following
                  error in sender sap system.
                   Error:No service for system SAPQ01 client 118 in integration directory        
                2, Is it possible to post the idoc to PI With out activating the integ directory Object in PI(Integ.repoistery activated).
                3, If possible, where can i see the idoc datas in PI before activation.
    Thanks

    Hi Raja,
    You send IDocs from system ABC to XI. In the control record of the IDoc,the SNDPOR field contains the value "SAPABC". The client of the sending system is determined by the MANDT field of the control record. The system ID and client are then used to determine a service without party of the
    type (business-system/business-service):
    Business system
    -> Activities in the System Landscape Directory (SLD)(Create technical
    system):
    Create a technical system for system ABC in the SLD, and create the client for this. Do not forget to assign an "ALE logical system" (for example, "ABCCLNT123") to this technical system.
    SLD (Business system):
    You can now explicitly assign a business system to this client. For more details, refer to the SLD documentation.
    Activities in system ABC (self-registration in the SLD):
    Alternatively, you can register the system in the SLD in system ABC with Transaction RZ70. You will find detailed information about the SLD registration of systems on the SAP Service Marketplace for the
    "Exchange Infrastructure" in the document "Exchange_Installation_Guide.pdf".
    In system ABC, you can check your configuration with Transaction SLDCHECK.
    Activities in Integration Directory (import business system from SLD):
    You will find the business systems under Services Without Party in the Integration Services. In the Service menu, you will find the system identifiers, the client, and the corresponding ALE logical
    system under "Objects"->"Adapter-specific identifiers". Use the Import/Update button to copy the data from the SLD, to create business systems, or to update their identifiers.
    Business service
    -> Activities in the Integration Builder directory:
    You want to create a service without party that is not part of your system infrastructure and is therefore not maintained in the SLD. In the Integration Builder directory, you will find the "Business-Services" under Services Without Party. In the Service menu, you will find the system identifiers, the client, and the corresponding ALE logical system under "Objects"->"Adapter-specific
    identifiers".
    Activate the change list in Integration Directory.
    In system ABC, you can restart the incorrect entry from Transaction SM58 .
    Regds,
    Pinangshuk.

  • Send BufferedOutputStream content over network in the order I choose

    Hi,
    The following method send a file over the network, it sends a couple of bytes arrays, including a file.
    I need to include the byte arrays and the file array in the same output buffer, and in my code i'm reading the File first to "outFileBuffer.write(buffer, 0, len);" to get the length, and then creating another buffer with the rest of the arrays.
    If there was a way to copy the from one buffer to another i had my problem fixed.
    public void sendOrder() {
            //Enviar encomenda (ver protocolo para identificar formatação dos pacotes)
            byte[] tipo = new byte[2];
            byte[] dataLength = new byte[4];
            byte[] fileNameLength = new byte[4];
            byte[] fileName;
            byte[] fileLength = new byte[4];
            byte[] file;
            String fxName;
            int fxNameLength;
            int len;
            int fxLength = 0;
            int length;
            int BUFFER_SIZE = 1024*50;  
            byte[] buffer = new byte[BUFFER_SIZE];
            fxName = "EO10001.DAD";
            fileName = fxName.getBytes();
            //Get and Send File Block
            try{
                //Get File Stream
                InputStream is = new FileInputStream("c:\\encomendas\\" + fxName);
                //Open Output Streams to send data to server
                OutputStream out = socket.getOutputStream();
                outBuffer = new BufferedOutputStream(out);
                while ((len = is.read(buffer)) > 0){
                    outFileBuffer.write(buffer, 0, len);
                    fxLength = fxLength + len;
                    System.out.println(fxLength);
                //initialize file byte array with file length size
                file = new byte[fxLength];
                //Wrap data into ByteBuffers
                ByteBuffer tipoBB = ByteBuffer.wrap(tipo);
                ByteBuffer dataLengthBB = ByteBuffer.wrap(dataLength);
                ByteBuffer fileNameLengthBB = ByteBuffer.wrap(fileNameLength);
                ByteBuffer fileNameBB = ByteBuffer.wrap(fileName);
                ByteBuffer fileLengthBB = ByteBuffer.wrap(fileLength);
                ByteBuffer fileBB = ByteBuffer.wrap(file);
                //Order data to least significant byte first
                tipoBB.order(ByteOrder.LITTLE_ENDIAN);
                dataLengthBB.order(ByteOrder.LITTLE_ENDIAN);
                fileNameLengthBB.order(ByteOrder.LITTLE_ENDIAN);
                fileLengthBB.order(ByteOrder.LITTLE_ENDIAN);
                //Fill the arrays with the data
                tipoBB.put((byte) 0,(byte) 4);
                fxNameLength=fxName.length();
                length = 32 + fxNameLength + 32 + fxLength;
                dataLengthBB.putInt(length);
                fileNameLengthBB.putInt(fxNameLength);
                fileNameBB.put(fileName);
                fileLengthBB.putInt(fxLength);
                //fileBB.putInt();
                //Write and flush the data to Stream
                incoming.append("\n\nSending file...");
                outBuffer.write(tipo);
                outBuffer.write(dataLength);
                outBuffer.write(fileNameLength);
                outBuffer.write(fileName);
                outBuffer.write(fileLength);
                outBuffer.flush();
                outBuffer.close();
                out.close();
                outFileBuffer.flush();
                debugData(tipo, dataLength, fileNameLength, fileName, fileLength, file); //append data to JTextArea for debugging purposes
            } catch (IOException ex){
                ex.printStackTrace();
    } // close methodThanks in advance for your help, I hope I was clear.
    Regards.

    darted wrote:
    That is not contrary to what I said - FIFO - first in First out.
    Yes, your buffer stream - (not TCP/IP packet (your stream will be broken up into many packets) by the way but still they are seeing it as two separate communications.
    So, timing will be an issue since you do not want them timing your communication out.
    You are sending known sizes on everything else, so create an out buffer of the inbuffer size plus known additional then send the two to the out stream. That will hopefully prompt them to look for complete data.
    Are you sure they are not timing out your communication?
    Edited by: darted on Dec 17, 2008 2:46 PMYou are right, it's FIFO, what i meant to say is that, the same order that i put things in the buffer is the same order that goes out to the stream, so it's the order i like it to be.
    What i realize from my testing is that whatever i put in the buffer before sending it, goes all in one packet (because is a small amount of data off course, but this will always be true), so i figure, if i can put the file in the same buffer I had my problem fixed, so sending two buffers (which is what i already was doing) is not, i think, the solution i want.
    They are not timing out my communication that i know, in the log file i can see that it receives my first packet, but it says the packet is incomplete (because the file should be part of this packet) :S
    Sure their's application should be able to get around this, but that's out of my control unfortunately.
    I'm still trying to put everything else in the same buffer before sending it.

  • 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

Maybe you are looking for

  • Asian Text options on Photoshop CC

    Hello! Well, I was working with japanese text on Photoshop CC and when I was going into its formatation, I wasn't able to do the specific asian options because they do not appear. I already enabled them as I saw on the site once, and it worked fine w

  • Trouble launching a custom HTML5 UI in Photoshop CC

    Problem: I am trying to get Photoshop CC to launch custom built HTML5 UI's.  In doing so I have hit a few roadblocks: Roadblocks: • The documentation online to install and launch HTML5 UI's from scratch is out-of-date: http://www.adobe.com/devnet/cre

  • My rotate tool won't work? (FreeHand MX, Mac OS 10.6.3)

    Hi All, I recently loaded FreeHand MX on a Macbook Pro.  It seems to run pretty happily, except I can't get the "rotate" tool to select. I added this tool to the default toolbar (using "toolbar/customize" but when try to I select it, the cursor rever

  • Getting tunes from iPod to PC after OS upgrade

    Hi, I upgraded my OS to XP Pro today and in the process, as expected, it wiped my iTunes from my computer. I have a second drive wherein I copied all of my music. How can I get iTunes to recognize my iPod's settings (playlists and such) and apply the

  • How do I put a key back on a 2011 macbook pro?

    So one of my keys was sort of pushed in, so my original plan was to remove the key and remove the scissor mechanism(i think) and then buy a new key and mechanism. But... I managed to remove the key(not the mechanism) without doing any harm, I think.