Right way to communicate with a socket server (TCP/IP)

Hi,
I used to write data from my J2ME socket client to a J2EE socket server with writeUTF(). In this way I can send (and receive) directly Strings.
When I need an XML file I ask the server with something like os.writeUTF(GIVE_ME_XML_FILE) and I use an XML parser with this socket InputStream.
I was wondering if it's the right way to proceed ....?
How do you guys communicate with a server when you need "to talk" a lot ? Do you use only HTTP requests or (if you are allowed to) do you use Socket with writeUTF ?
Just to know if I'm completely wrong....and if I gonna have unsolicited issues ...
Thanks..

AdrienD wrote:
When I need an XML file I ask the server with something like os.writeUTF(GIVE_ME_XML_FILE) and I use an XML parser with this socket InputStream.
I was wondering if it's the right way to proceed ....?No, it is not. Read the writeUTF api docs, and you'll know why!
How do you guys communicate with a server when you need "to talk" a lot ? Do you use only HTTP requests or (if you are allowed to) do you use Socket with writeUTF ?There is answer to this question. it al depends on what data gets send where, how often, and how large..

Similar Messages

  • Any way to communicate with Serial PORT using JavaScript

    is there any way to communicate with Serial PORT using JavaScript ??
    Dont tell me to do it in java because I need to this on client side not on server side.
    such as when client pressed the button, a javascript function will be called and in that function I need to communicate with the serial port of that client... That action will not go to server side.

    Is there any way to send a string of bytes to the serial port from the client side ?
    Just a button on the web page that sends out stuff to the comport.
    I was hoping to do this using java script also ..

  • How do I get a refund?  I have tried to use this converter to change a PDF to a word document or excel document three of four times and it always fails..  I want my money back but don't see any way to communicate with Adobe.

    How do I get a refund?  I have tried to use this converter to change a PDF to a word document or excel document three of four times and it always fails..  I want my money back but don't see any way to communicate with Adobe.  i really just want my money back.  Very disappointed.  Also disappointed that it is so hard to find a way to communicate with Adobe that I have to resort to asking this question in this forum. 

    You need to use the CHAT link in support to reach Adobe staff. Be sure you know the product name you are trying to cancel, Adobe have lots of products, several converters etc. I think it is ExportPDF you have, most likely.

  • DMZ Ports to Communicate with SCCM Primary Server

    Hello,
    I have searched and came to know that on firewall, following ports should be open for DMZ to communicate with SCCM primary server 
    HTTP 80 and 443
    8530
    TCP 10123
    TCP 135TCP 445
    We are planning to implement a software on DMZ server which should communicate with SCCM primary server.
    Do the above ports work for communication from DMZ to Primary or if there are more ports required for it?
    Is it possible to achieve this without the SCCM client installed on the DMZ server as i would like the software to communicate via its own methods but the required ports should be open.

    Could you please provide the WMI and SQL ports which would be required.
    If we talk about generically, Are below ports enough for a DMZ server to communicate with the primary site server ?
    HTTP 80 and 443
    8530
    TCP 10123
    TCP 135TCP
    445

  • In the latest iOS updates, did Apple change the way Airplay communicate with other devices through Wifi?

    Short :
    In the latest iOS updates, did Apple change the way Airplay communicate with other devices through Wifi?
    Detailed:
    We had a glitch with our Apple TV 3A 3-4 weeks ago and had to factory reset it (we reconfigured it with the exact same configuration than before the crash), it's now running iOS 7.0.2, I can't saw which version it ran before the problem though.
    It's used in a business environment with 30+ iPads 2, half of them are updated to 8.1.1 and the other half to 8.1.2. We use the latest iTunes version.
    Before the glitch that required a reset, all the iPads were detecting and mirroring when needed to the Apple TV, but now the iPads don't see the Apple TV in their list of Airplay devices anymore (but they detect various other devices inside our network).
    I have to add that our Apple TV is able to navigate the movie store correctly, so I assume that it's not an internet restriction issue from our end (also, the APple TV do not see either any of the many iPads on its device-detection screen.
    We successfully connected an iPhone 5S and an iPhone 6 through P2P Airplay, so it's not the issue, but when we connected the iPhones to our Wifi network (Same as all the other devices are using) the Apple TV suddenly disappeared from the choices.
    Hence the reason why I inquire to the possibility that some changes were made in one of the latest iOS revisions, if so, we would require some details so we can adjust our Wifi configuration accordingly to allow the proper detection of devices.
    P.S. I tried the basic troubleshooting of Airplay problems with no avail. Airplay button is displaying on the control panel, Airplay do not show the Apple TV at all (so it's not either the trick to display the Mirroring button), we also already proceeded to the suggested devices reboots, so my issue is quite more complex I believe.
    Thanks in advance.

    PhotogYogi wrote:
    I Have the same issue on a brand new iPad mini 2. My battery is only lasting up to 5 hours. I went on chat with Apple last night and they said my battery is fine and its a Safari issue. I'm literally losing 1% every 3-4 minutes. I tried recalibrating my battery, signing out of iCloud, shutting off all locations, turning off background app refresh, restoring network settings, restoring all, and finally restoring from iTunes with no luck. This is just awful. I got this iPad so I could use it on my long flight for a trip I have coming up, and unfortunately, it's not going to last that long, plus I'm concerned about how many times i will be recharging my battery because of this since battery's do have a life cycle dependent on the number of charges. This is frustrating and needs to be fixed ASAP and addressed by Apple.
    By the way, Apple told me to bring my device to the Apple Store because it's still under warranty. That's great and all, but I'm going to waste my time if there is no fix for this issue.
    Ok so you want Apple to address the problem, but yet you don't want to take it to them just in case they can't fix it? What if they can fix it? Complaining here certainly won't fix it.

  • Error: Unable to communicate with the Reports Server

    The configuration I am working with is:
    * Oracle 8.1.6 DB on a Unix machine
    * Oracle Reports 6i on an NT machine
    * Microsoft IIS web server
    I have successfully tested my reports during the development phase of my project. Unfortunately, now that it is considered production and is available to upwards of 30 people, I am getting the following error message after verifying the server is up and after a numerous reports have been served:
    Error: The requested URL was not found, or cannot be served at this time.
    Oracle Reports Server CGI - Unable to communicate with the Reports Server.
    After receiving this message I noticed that the Report Server service is down and the log only indicates that it "shut down immediately". (no ORA messages) I tried restarting the service, but after serving one report, it would shut down again with the same message.
    I am wondering if it is a problem related to the cache. I used the default of 50M in the config file, but when the cache directory reaches 50M, the problem seems to appear. I then deleted approx. 30M of files from the cache directory and the Report Server service appeared stable. I changed the cache limit to 1M to see if there was a problem with the cache being so big. All appeared well for the first few hours of operation but then the Report Server service shut down again and upon restart crashed within a minute or two (usually as someone tests a report, it crashes again).
    Do I have a configuration problem? Has anyone seen this problem? Thanks in advance.

    Hi,
    I just found out that if i give
    http://localhost/cgi-bin/rwcgi60.exe?key1
    where key1 is a key mapping file that contains the report name,username and pwd for the database and desformat...etc..
    the report pulls out fine with the correct data..
    i am stunned...
    while none of the other commands like
    http://.../rwcgi60.exe
    or
    http://..../showenv?server=repserver
    or any other usual command doesnt work...
    anybody faced this before??
    Thanks.

  • Oracle reports 6i error unable to communicate with the reports server

    Hi,
    I have followed the steps for running oracle reports server 6i..i am using win2k3 and IIS6.0
    i have checked tnsnames.ora and sqlnet.ora and everything looks good..
    when i try
    http://localhost/cgi-bin/rwcgi60.exe
    i get a page called User Database Authentication and asks for username,password and database..instead of the help page that should be displayed..
    when i enter those values nothing happens for the first time and the same page is displayed again..when i enter it again i am getting this error
    url requested not found or cannot be served at this time
    oracle reports cgi: unable to communicate with the reports server
    any help would be grateful..
    Thanks.

    Hi,
    I just found out that if i give
    http://localhost/cgi-bin/rwcgi60.exe?key1
    where key1 is a key mapping file that contains the report name,username and pwd for the database and desformat...etc..
    the report pulls out fine with the correct data..
    i am stunned...
    while none of the other commands like
    http://.../rwcgi60.exe
    or
    http://..../showenv?server=repserver
    or any other usual command doesnt work...
    anybody faced this before??
    Thanks.

  • I want to Block iphone because he stole from me, what is the way to communicate with you, I have serial No.

    I want to Block my iphone because he stole from me, what is the way to communicate with you, I have serial No.

    Apple does not block phones. Call the police and your carrier. Change all your passwords. If you had find my iPhone enabled before the phone waa stolen, you may be able to track it, and erase the phone.

  • Is there a way to communicate with Game Centre friends?

    I was looking through the game centre, and I didn't find any way to communicate with my Game Centre friends, so there's no way?

    http://support.apple.com/kb/ht4314

  • Sir, the subject is, I do not know the original owner Will helped me know that the owner or on the way to end this problem, or any way to communicate with the person in question

    Sir, the subject is, I do not know the original owner Will helped me know that the owner or on the way to end this problem, or any way to communicate with the person in question

    This is a user to user forum.  You are not addressing Apple.  It appears that you may be having issues related to Activation lock: ( http://support.apple.com/kb/PH13695).  If you cannot contact the original owner to have them remove activation lock, you should return the device for a refund.
    HTH

  • The updater has been unable to communicate with the update server for at least 1h.

    Hi All,
    there is a warning message on one of my IronPort C300V
    Version: 8.0.1-023
    The error message is mention below
    "The updater has been unable to communicate with the update server for at least 1h."
    please suggest the issue and steps to resolve the problem or suggest that it is very critical so can i open the cisco tac call.
    Thanks ,
    Madhuraj

    If you continue to receive this error please check that the virtual appliance is configured to use the dynamichost for updating:
    myesa_2.local> updateconfig
    Service (images): Update URL:
    <ommitted for brevity>
    []> dynamichost
    Enter new manifest hostname : port
    [update-manifests.sco.cisco.com:443]>
    Once 'dynamichost' is entered, the current dynamic host in use will be displayed in the prompt [ ]>, as seen above. 
    You will need to verify that the appliance - escpecially if a virtual (VESA) - is using the correct host.
    Steve
    Cisco Content Security - Email Security

  • CLI104 Unable to communicate with the administration server:

    i am doing a glass fish clustering with load balancer plugins using SJWS7.0 as the loadbalancer.
    i installed glassfish v2.1 and set up a cluster with a single node and single instance
    and i did all the steps as per this document
    https://glassfish.dev.java.net/javaee5/build/GlassFish_LB_Cluster.html
    i did all the steps with out any errors.
    but when i am trying to run the commad <websrvr_install_dir>/bin/wadm deploy-config --user=<websrvr_admin_user> <websrvr_instance_config>
    i am getting following errors
    CLI104 Unable to communicate with the administration server: Unable to connect t
    o admin-server. Please check if the server is up and running and that the host
    and port provided are correct.
    i don't how to fix this error , i search a whole day for fixing this errors.now i am waiting for help .please help me to fix this one
    Thanks and Regards

    The glassfish document that you mentioned does not provide any instructions to start the web server's administration server.
    Could you verify that the web server's administration server is indeed running? Do the following to start web server's administration server:
    $ <websrvr_instance_dir>/admin-server/bin/startservAfter that step try out the deploy-config command as described in the document.
    HTH.

  • CBS failed to communicate with some other server.

    Dear All,
    We are facing this error when we are trying to activate a request in
    NWDS & trying to check in.
    Error:Activation failed: CBS Server Error: CBS failed to communicate
    with some other server.( internal code: COMMUNICATION_ERROR)
    Just for your information, we had changed the password for nwdi_cmsadm
    few days back and then followed a note896427 and then had fixed the
    error.
    The NWDI_CMSADM password problem was solved and the transports were
    working very fine till today. But today afternoon when the developer
    tried to activate the request in NWDS, he got this error. Can you
    please let me know the problem.
    We are stuck and not able to go ahead.
    Thanks in advance.
    Warm Regards,
    Rajeet

    Hello,
    I am getting this error :
    CBS Server Error: CBS failed to communicate with some other server( internal code: COMMUNICATION_ERROR)
    while importing ESS into Dev. I have a user created called cmsadmin and has all the permissions/roles assigned. other files are already imported (epbuildt, pcuigp,epbuildt,sap-jtechs, sap-jee). Only this file is failing.
    I have seen the Notes about user/password upgrade. But we are on 04s sp14. and i have this user cmsadmin .
    Please advise.
    Thanks,
    Anil.

  • Spooler.exe tries to communicate with shared printer on TCP:47546 port

    Hi,
    We have:
    1. AD
    2. Win7 Pro Workstations
    3. Symantec Endpoint Protection - allowed only SMB ports (135,137,138,139,445), denied all other communications incl broadcast.
    4. WS2 - computer with shared printer
    Issue: As I can see in WS1 SEP Logs spooler.exe tries to communicate with WS2 on the TCP:47546 port. SEP blocks those communications and shared printer stays "grayed". The solution I found is to restart spooler. Sometimes it helps
    Why does it happen? What should I do to force spooler to comunicate on standard SMB ports?
    UPD: Printer shared and as \\WS2\Printer and as \\IP\printer - in both cases the issue persists

    Hi,
    I am Chetan Savade from Symantec Technical Support Team.
    You can either add printer to excluded host.
    To add the printer to "Excluded Hosts":
    1.  Open your Intrusion Prevention Policy.
    2.  Choose to Settings on the left. 
    3.  Check the box for Enable excluded hosts and then click the
    Excluded Hosts... button.  
    4.  Add the IP address of your printer and choose Okay.
    Can refer the following article to create remote port exception.
    Permitting clients to browse for files and printers in the network
    http://www.symantec.com/docs/HOWTO55030
    Best Regards,
    Chetan

  • Best way to communicate with a database

    I'm starting on a client/server implementation. The client will be the entire GUI for the database. How would I communicate over sockets with this? Would string commands to stdIn do? What's the most flexible implementation?

    I think sockets is a very low level to communicate with the server.
    I'm working with JDBC on MySQL and there's a method:
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost/myDatabase", "me", "my_password");
    where you could connect with the database called "myDatabase" located in localhost with login = "me" and password = "my_password".
    I think you could connect with a server located on machine named "myDomain.com" like this:
    Connection con = DriverManager.getConnection("jdbc:mysql://myDomain.com/myDatabase", "me", "my_password");
    Check the JDBC documentation to be sure.
    Hope that helps.
    Regards.

Maybe you are looking for