Results 1 to 3 of 3
  1. #1
    udpkillsme is offline Member
    Join Date
    Jun 2011
    Posts
    1
    Rep Power
    0

    Unhappy Send XML message over UDP?

    Hi, here is my question:
    How can I send an XML message(just any simple XML file) to a server or any ip using UDP packets?

    I've searched and searched and am unable to find any good information.
    Thanks for any help.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    Is there anything special about the data that you want to send to a server?
    What do you expect the server to do with the data it receives?
    Do you know how to use Datagrams to send data to a server? Have you tried that?
    Perhaps something like this could be used:
    Java Code:
            InetAddress localhost = InetAddress.getByName("11.222.33.44");
            DatagramSocket socket = new DatagramSocket(3243, localhost);  
            socket.send(new DatagramPacket(notifyRequestBytes,notifyRequestBytes.length,localhost, 1234));

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

Similar Threads

  1. Send AMF message from client
    By nguyenkimhuyit in forum Networking
    Replies: 0
    Last Post: 04-22-2011, 09:27 AM
  2. java swing program to send message to a mobile?
    By Manish87 in forum AWT / Swing
    Replies: 2
    Last Post: 12-05-2010, 08:09 AM
  3. how to send picture message sms using smpp in java
    By manishsuvasiya in forum Advanced Java
    Replies: 2
    Last Post: 11-22-2010, 05:34 AM
  4. how to send picture message using smpp in java
    By manishsuvasiya in forum New To Java
    Replies: 1
    Last Post: 11-16-2010, 05:25 AM
  5. Send error message from servlet to jsp
    By karq in forum Java Servlet
    Replies: 4
    Last Post: 07-02-2010, 10:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •