I need to send a message via socket from a C program to a Java program

Hi,
I need to send a message via socket from a C program to a Java program. The message has three data: a long, an integer and a string.
How can I put those three fields in a array of bytes in C? How can I extract those same three fields from an array of bytes in java?
Thanks a lot!

A few options:
JNI
Corba
Using sockets directly
take your pick.

Similar Messages

  • Whats the difference between sending messages via socket and MQs?

    Whats the difference between sending messages via socket and MQs?

    Soph wrote:
    Whats the difference between sending messages via socket and MQs?With JMS (and the like) your application uses a socket to connect to a central server called a "*Message Broker*". Over this connection it can send or receive messages.
    A Message Broker is somewhat analogous to a database server. Multiple clients connect to it to exchange messages. As with a database a client first establishes a connection, then requests specific facilities like subscriptions.
    It creates a strong decoupling between sender and receiver and handles stuff like allowing multiple receivers for the same message, queuing of messages for applications not currently running and so on.
    (And don't worry, you can get perfectly good message brokers for free such as openMQ and activeMQ.)

  • Need to send Smart form via email through Driver program

    Hi All,
    We need to send smart form via email through a new driver program (z program). Can you please guide me on this.
    I have used the following code to achieve this. We are getting message saying 'Mail request has created' when executed, but the mail is not sent.
    lvs_comm_type = 'INT'.
    lvs_comm_values-adsmtp-SMTP_ADDR = e_mail.
    lvs_comm_values-adsmtp-R3_USER = 'X'.
    lvs_comm_values-adsmtp-ENCODE = '0'.
    call function 'CONVERT_COMM_TYPE_DATA'
    exporting
    pi_comm_type = lvs_comm_type
    pi_comm_values = lvs_comm_values
    pi_screen = ' '
    pi_newid = 'X'
    importing
    pe_itcpo = lvs_itcpo
    pe_device = lvf_device
    pe_mail_recipient = p_mail_recipient
    pe_mail_sender = p_mail_sender
    exceptions
    comm_type_not_supported = 1
    recipient_creation_failed = 2
    sender_creation_failed = 3
    others = 4.
    if sy-subrc ne 0.
    raise COMMUNICATION_ERROR.
    endif.
    control_parameters-device = 'MAIL'.
    output_options-TDIMMED = 'X'.
    output_options-TDDELETE = 'X'.
    CALL FUNCTION fm_name
    exporting
    CONTROL_PARAMETERS = control_parameters
    MAIL_RECIPIENT = mail_recipient
    MAIL_SENDER = mail_sender
    OUTPUT_OPTIONS = output_options
    USER_SETTINGS = space
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    Thank you

    Hi,
    For sending smartform output into mail you first have to generate spool request and convert it into PDF and then
    only it can be sended into mail, please find the sample code in the mail below:
    http://wiki.sdn.sap.com/wiki/display/sandbox/ConversionofSpoolRequestDataintoPDFandExcelFormatandSenditintoMail
    Mansi
    Edited by: Matt on Jan 29, 2010 8:25 AM - removed code, instead point to wiki that Mansi authored.

  • TS3276 I need to send a photo via email as an attachment and not it shown in the body of the email?

    I need to send a photo via email as an attachment and NOT have it shown in the body of the email?  Please help.

    To make attachments not appear in the body of the e-mail as a default, try using the Applications/Utilities/Terminal command below. I suggest copy and paste.
    defaults write com.apple.mail DisableInlineAttachmentViewing -bool YES

  • I recently updated the software on my ipad2 to 5.0.1 and when I send a message via "chat" it shows on all the iPhones associated with my account (my sisters, my husbands, etc) is there a way to stop that?

    I recently updated the software on my ipad2 to 5.0.1 and when I send a message via "chat" it shows on all the iPhones associated with my account (my sisters, my husbands, etc) is there a way to stop that?

    If you have been using your phone as recommended, you should have minimal data loss from the inability to restore from a backup.
    Contacts and calendars should be synched to a computer application like Outlook or Address Book (or a cloud service like Google Contacts or iCloud).  The update process does NOT affect these computer applications so your contacts and calendars should be safe and sound in the application ready for synching back to your phone.
    Same for photos.  It is recommended that photos be imported to your computer as soon as possible after taking them (just as you would import them from any other camera) for storage, archival and safekeeping.  Again, your photos should be safe and sound on your computer.
    If you've not been using your computer as recommended, you've learned a very hard lesson, I'm afraid.

  • TS2755 Can't send messages via iMessage from iPad after iOS6 update.  What steps can I take to begin sending messages again?

    Can't send messages via iMessage from iPad after iOS6 update.  What steps can I take to begin sending messages again?

    HI,
    So you have updated past this point ?
    http://support.apple.com/kb/TS5419
    There also seems to be no issues listed here.
    http://www.apple.com/support/systemstatus/
    8:44 pm      Friday; April 25, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • How to send a message to WD from a BPM?

    Hi All,
    I have a ccBPM in which I recieve a binary file .
    On receiving it I want :
    1)To send it to a folder in my pc.
    2)After sending file I need to send a message to WD giving path of file on my system so that it can be UPLOADED to the context.
    Please help !
    Points assured for helpful answers!
    Sumit

    HI,
    See the below links
    /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC  - File to Mail
    /people/michal.krawczyk2/blog/2005/08/22/xi-maintain-rfc-destinations-centrally - Maintain RFC destination centrally
    /people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
    Troubleshooting - RFC and SOAP scenarios-/people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009
    XI: RFC or ABAP Proxy ? ....ABAP Proxies with attachments --/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
    RFC -> XI -> WebService - A Complete Walkthrough (Part 2) -/people/shabarish.vijayakumar/blog/2006/03/28/rfc--xi--webservice--a-complete-walkthrough-part-2
    RFC to SOAP
    /people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walkthrough-part-1
    /people/piers.harding/blog/2004/07/18/you-dont-need-to-use-soap-to-keep-your-rpc-clean
    /people/david.halitsky/blog/2006/08/25/soa-vs-rfc-it-doesnt-have-to-be-charles-bronson-vs-henry-fonda
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=rfc%20to%20soap%20scenario&cat=sdn_weblog
    Regards
    Chilla
    <i>reward points if it is helpful..</i>

  • How to send a photo via bluetooth from iphone 5s to laptop

    how to send a photo via bluetooth from iphone 5s to laptop

    Connectivity between an iPhone and a computer via Bluetooth is extremely limited. It supports tethering (hotspot or internet sharing) if your cellular plan allows that but does not support transfer of photos. You can import photos from the Camera Roll to the computer via USB or via wifi as described in http://support.apple.com/kb/HT4083

  • How to send error message to forms from Database Trigger

    Hi, Please help me to send error message to forms from Database Trigger?
    RgDs,
    Madesh.R.M

    You are correct, the On-Error trigger is a Forms trigger. However, if your Form is going to display the error generated by the database stored procedure or trigger - you might not see the database error in your Form unless you check the DBMS_ERROR_CODE in the On-Error trigger and manually display the Error Code and associated Text. I've see this happen with a co-worker. The Form she was working on was based on a table with an Before-Insert trigger. Because she was not explicitely handling the error from the Before-Insert trigger in the Forms On-Error trigger, her Form appeared to halt for no reason at all. Once she added code to the On-Error trigger in the Form to handle the DBMS_ERROR_CODE, she discovered the trigger was producing an error and was able to show the error to the user in the On-Error trigger.
    I understand the desire to keep as much as possbile in the database, but with that comes some extra coding in your Forms to handle this. This extra coding could easily be placed in a Forms Library, attached to a Form and called in the On-Error trigger. Your code could look like this:
    DECLARE
       /*This example assumes you have an Alert defined
          in your Form called: 'ERROR' */  
       al_id    ALERT;
       al_text  VARCHAR2(200);  /* Max text of a Forms Alert message*/
       al_btn   NUMBER;
    BEGIN
    IF DBMS_ERROR_CODE != 0 THEN
       /* Error code is ORA-00000 Normal Successful completion
           So only handle non-zero errors  */
       al_text := DBMS_ERROR_CODE||':'||DBMS_ERROR_TEXT;
       al_id := Find_Alert('ERROR');
       set_alert_property(al_id, alert_message_text, al_text);
       al_btn := show_alert(al_id);
    END IF;
    END;Your original question was "How to send error message to forms from Database Trigger?" The answer is you don't because Forms already gets the database error code and database message through the Forms DBMS_ERROR_CODE and DBMS_ERROR_TEXT functions. Look these up in the Forms help and it should clear things up for you.
    Craig...
    Edited by: CraigB on Jun 14, 2010 4:49 PM
    Edited by: CraigB on Jun 14, 2010 4:49 PM
    Edited by: CraigB on Jun 14, 2010 4:50 PM
    Edited by: CraigB on Jun 14, 2010 4:51 PM
    Edited by: CraigB on Jun 14, 2010 4:51 PM

  • I need to print off messages to and from my cell

    i need to print off messages to and from my cell

    You report your problem as using Acrobat on a Mac. You've posted in the Reader forum for iOS.
    I've moved your question to the Creating, Editing and Exporting PDF forum which seems more appropriate.
    You'll need to provide more information for us to be able to help you.

  • Hi i need to send bug to fix it  from /opt/SUNWexplo/bin/explorer

    Hi i need to send bug to fix it from /opt/SUNWexplo/bin/explorer ...simply executing the command will generate any files anywhere in the server..or it will give the output in the screen only ..i need to send the output of the command ..help me plz

    Public InfoDoc 203335 is the README for Sun's Explorer.
    [http://sunsolve.sun.com/search/document.do?assetkey=1-9-82329-1|http://sunsolve.sun.com/search/document.do?assetkey=1-9-82329-1]
    That document clearly states that any communication about that software tool needs to go to the email alias that is provided in that InfoDoc.
    All other communications to anywhere else (such as to this forum) will be ignored.
    Though if you had read the Explorer FAQ or its User Guide, you would have your answer as to where the output files might be. The FAQ and the U.G. are also linked in the README InfoDoc.

  • Send XML Message via HTTP and Receive Response

    Hello,
    We have a scenario where we need to update Currency Exchange Rates in R/3 via a 3rd party called Oanda.  I'd like to use XI for this Interface, if possible. 
    Basically, we need to send XML over HTTP.  Here's the URL and the XML we need to use for our POST (I'll need to perform the look-up for about 15 currency codes - I plan on using a BPM process to loop through each currency code specified in a flat file):
    http://www.oanda.com/cgi-bin/fxml/fxml?fxmlrequest=<CONVERT><CLIENT_ID>TestAccount1</CLIENT_ID><EXCH>USD</EXCH><EXPR>CAD</EXPR><DATE>03/25/2008</DATE></CONVERT>
    And the reponse looks like this:
    <RESPONSE>
      <EXPR>CAD</EXPR>
      <EXCH>USD</EXCH>
      <AMOUNT>1</AMOUNT>
      <NPRICES>1</NPRICES>
      <CONVERSION>
        <DATE>Mon, 24 Mar 2008 20:00:00 GMT</DATE>
        <ASK>1.0257</ASK>
        <BID>1.0251</BID>
      </CONVERSION>
    </RESPONSE>
    I plan on mapping each reponse to BAPI_EXCHRATE_CREATEMULTIPLE, using BPM.
    So my question is this:  Should I use the HTTP adapter for the out going POST to Oanda?  If so, would the HTTP adapter be consider the sender or the receiver?  Also, how would the XML message be automatically appended to the end of the URL (i.e., after the fxmlrequest parameter)?  I guess I'm a little confused on how to use the HTTP adapter...  Are there any blogs that discuss this type of scenario?
    Thanks,
    Matt

    Hi guys,
    I have few concerns for setting up this scenario.
    1). I have created a data type for request mapping, and teste the mapping.
    The output looks like below:
      <?xml version="1.0" encoding="UTF-8" ?>
      <ns1:MT_CONVERT xmlns:ns1="http://test.com/ExchngRate">
       <CONVERT>
         <CLIENT_ID>test</CLIENT_ID>
         <EXPR>CAD</EXPR>
         <EXCH>USD</EXCH>
         <DATE>10/21/2009</DATE>
         <AMOUNT>1</AMOUNT>
       </CONVERT>
      </ns1:MT_CONVERT>
    How to pass only
      <CONVERT>
         <CLIENT_ID>test</CLIENT_ID>
         <EXPR>CAD</EXPR>
         <EXCH>USD</EXCH>
         <DATE>10/21/2009</DATE>
         <AMOUNT>1</AMOUNT>
       </CONVERT>
    to the receiver HTTP adapter.
    2) I am using URL address in the receiver HTTP adapter.
    Target Host: www.oanda.com
    Path Prefix: cgi-bin/fxml/fxml?fxmlrequest=
    What is will be Service Number?
    Looking forward for you help. Your help is greatly appreciated.
    Thanks,
    Namadev
    Edited by: Namadev Chillal on Oct 21, 2009 5:35 PM

  • Sending multicast messages via only one NIC

    I have 5 different NICs on my computer. I want to send a message to some other computers that are connected to me via a specific NIC.
    How can I make sure that this message will only be sent via this NIC?
    Thanks in advance!

    Bind the multicast socket to that NIC.

  • How to send error message via a mail to the customers email id

    HI experts ,
    i have a requirement,In idoc where i have to send the error message via email to a perticular emailid?
    please help me n tell also which fm is used for that?
    Thanks
    RAhul Sisodia

    Hi ,
    Check this Link..
    [sending an email with multiple attachments;
    Regards,
    Sachin M M

  • Sending large messages via ABAP client proxy

    Dear All,
    my scenario is the following. I have an ABAP report which creates files. These files are currently moved by an FTP auto job, to a target folder and are finally imported into an 3rd party programm.
    The CSV-files created consist of approx. 3000 records, each with a length of 1000. So the total size is about 3 MB. The files are send at night, once a day.
    We want to distribute these files via SAP PI. My question is the following:
    Is a client proxy able to send the whole (3MB) message to PI (which will just write the message to the target FTP destination) or do I have to send each record with the client proxy to PI (and append the record to the file).
    If both solutions are feasible,what would be preferable? The solution of sending single records to PI, would be more generic in my opinion, because I could define a message type for the records in PI. So in future i could add also some mapping stuff. If I would want to send the whole file content with one client proxy call, i would basically have one big string.
    How do both options compare in regard to performance? Sending 3000 small messages oder one big message?
    What about the file adapter? Is it an option to append 3000 records to a file?
    Does anyone have another solution for that scenario?
    Best regards and thank you for your help!
    Florian

    Hi,
    Is a client proxy able to send the whole (3MB) message to PI
    yes it is capable.
    If both solutions are feasible,what would be preferable?
    yes both solutions are feasible ,but preferable is to send the whole message rather than one by one.
    How do both options compare in regard to performance?
    sending whole message is far more better than sending record by record.
    regards,
    pradeep A.

Maybe you are looking for

  • Passing a value from Report A to B when B is in a different Subject Area

    I had posted a question previously on how to pass the Dept # from Report A to B when B i in a different Subject Area. The question was: Report A is a table on the Dashboard that shows Actual vs Budget results by Department. I want the user to click o

  • Re: EJB Control not working with methods that contain arguments

    John, I'm not qualified to answer your EJB control question, but before you become too disillusioned with page flows I'd like to mention that the request scoped data form and and the return-to="page" issues you mentioned have been addressed for the n

  • I have a problem resetting my itunes account password

    I have a problem resetting my itunes account password have loas the aswer to my secret password and my password to my email account, what to do? contact me at [email protected]

  • List Box Values Order

    Hi, I have Developed List Box for Period. And in the Selection Screen it is showing the values 01/2007 02/2007 03/2007 04/2007 05/2007 06/2007 07/2007 08/2007 09/2007 01/2008 02/2008 03/2008 04/2008 05/2008 06/2008 07/2008 08/2008 09/2008 In the sele

  • Greyscale images

    I am trying to create medical wall posters. I have converted the X-ray images to Greyscale using Photoshop, then inserted them into my Indesign poster. After exporting to pdf then printing, the images are no longer greyscale but are coming out in var