Communication between client and server

I am using sockets for communication between the client and the server. is there any other way that i can use for communication between the client and server???

Plenty of ways: JMS, SOAP, RMI, a RESTful API, writing-files-to-a-shared-directory-on-the-disk, Sneakernet, ...
Some of them use sockets (or better TCP/IP) as the underlying protocol.
But to give you a good answer, you would have to tell us why you want a different way. I hope you're not searching for a different way just for the sake of being different.

Similar Messages

  • Socket communication between client and server

    Hi all,
    I am doing an assignment for communication between java client and java server using sockets. This communication is in the form of XML documents. I am facing a problem in this communication.
    Actually at Server side I'm creating an XML document(Document type object) using DocumentBuilderFactory in javax.xml.parsers package and transforming this Document into a stream using StreamResult.
    My code is :
    Transformer xmlTransformer = TransformerFactory.newInstance().newTransformer();
    StreamResult xmlString = new StreamResult(currentClientHandler.getSocketOutputStream());
    DOMSource xmlDocSource = new DOMSource(xmlDocument); // xmlDocument is Document type reference
    xmlTransformer.transform(xmlDocSource, xmlString);
    so, this xmlString(i.e. StreamResult) is passed directly into the output stream. Here I need to close() output stream after transform() call to help SAX parser to know about end of stream.
    Now at Client side, I am parsing this stream using SAX parser. It parses this correctly. But when sending some another data back to Server when client opens output stream, it given Socket closed exception. I know that closing input or output stream closes socket. But in my problem, I have to send data in streams and not by using files or byte[] etc.
    So what is nearest solution to problem ??
    Plz help me. Any kind of help will be greatly appreciated.

    hi
    thanks for ur reply.
    I didnt get any error msg while getting the back the datas.
    Actually i divided my application into two parts.
    My application will act as both server and client.
    server ll get the browser request and send to the client and the client will send that data to the c++ server.
    Im able to do that.and unable to get the data from server.
    Didnt get any error.
    can u tell me how to make an application to act as both client and server.
    I think im wrong in that part.
    thanks a lot

  • XML over HTTP between client and server

    We are trying to pass XML between a client and servlet over HTTP.
              We used the code from the StockClient/StockServlet examples as a
              starting point but cannot get it to work. Basically we
              have a simple command line java client that is trying to access
              a VERY simple servlet. When the client tries to write data into
              the output stream associated with the connection I get:
              "Connection rejected: 'Login timed out after: '15000' ms....."
              I have read several postings that instruct me to raise the
              timeout limit, but as you can see, I surely don't need 15 seconds
              to write this data out! Is there something special I need to do?
              Does this have anything to do with known issue #10065
              (http://www.weblogic.com/docs51/release_notes/rn_knownprob51.html)
              I have followed all of the instructions in the example code
              (http://www.weblogic.com/docs51/classdocs/xml.html)...
              Any assistance is appreciated...
              here is the client code:
              import java.io.*;
              import java.net.*;
              public class TestClient
              public static void main(String aa[])
              URL url = null;
              HttpURLConnection urlc = null;
              PrintWriter pw = null;
              file://Commented lines indicate other things I have tried
              try
              url = new URL("http://localhost:7001/ParserServlet");
              file://urlc = url.openConnection();
              urlc = (HttpURLConnection)url.openConnection();
              file://urlc.setRequestProperty("Content-Type", "text/xml");
              urlc.setDoOutput(true);
              urlc.setDoInput(true);
              file://urlc.connect();
              pw = new PrintWriter(new OutputStreamWriter
              (urlc.getOutputStream()), true);
              pw.println("<?xml version='1.0'?><test>testing123</test>");
              pw.flush();
              file://urlc.disconnect();
              } catch(IOException ex) {
              System.out.println(ex.getMessage());
              Here is the servlet code:
              import javax.servlet.*;
              import javax.servlet.http.*;
              import java.io.*;
              import java.net.*;
              public class TestServlet extends HttpServlet
              public synchronized void init(ServletConfig config) throws
              ServletException
              super.init(config);
              System.out.println("Inside init()");
              public final void doPost(HttpServletRequest request, HttpServletResponse
              response)
              throws ServletException, IOException
              System.out.println("Inside doPost()");
              protected void doGet(HttpServletRequest req,
              HttpServletResponse resp)
              throws ServletException,
              java.io.IOException
              System.out.println("Inside doGet()");
              

              Jon,
              One thing is missed in your client code. When you use HTTP POST to send request,
              you have two ways to tell the Web server when to stop reading from your input and
              to start process your input: the first one is using "Content-Lenght" header property
              to specify how many bytes you want to send to your servlet, the seocnd is use "Transfer-Code:
              Chunked" and is much more complicated. I didn't see you pass "Content-Length" in
              your client code, in which case, the Web server (Weblogic) cannot know the end of
              your request data and could keep waiting for last byte to come out or waiting for
              the socket time out (that is what you get).
              Since you use servlet, not JSP, I would recommend to code in this way (it works fine
              for me, no guranttee for your situation):
              Client code: Use a big temprary string, or StringBuffer, or StringWriter to store
              all the request data (your xml file content) before you send out the request. After
              you finish to form your XML string, calculate the number of bytes (should equal to
              the length of the string) and add the request header as
              urlc.setRequestProperty("Content-Length", bytes_length);
              I will not suggest you using PrintWriter. Think use BufferedOutputStream constructed
              from URLConnection and write the bytes (use String.getBytes()) to the servlet and
              then flush.
              Servlet code: in the doPost() of your servlet, try to find the request data length
              by calling request.getContentLength(), then open the InputStream (think to use BufferedInputStream
              for performance). Read the contents from the InputStream byte by byte and counter
              the number of bytes. Once you get the number of bytes as specified via request Content-Length,
              break your reading loop and start whatever you want.
              Hope it helps.
              "Jon Clark" <[email protected]> wrote:
              >We are trying to pass XML between a client and servlet over HTTP.
              >We used the code from the StockClient/StockServlet examples as a
              >starting point but cannot get it to work. Basically we
              >have a simple command line java client that is trying to access
              >a VERY simple servlet. When the client tries to write data into
              >the output stream associated with the connection I get:
              >"Connection rejected: 'Login timed out after: '15000' ms....."
              >I have read several postings that instruct me to raise the
              >timeout limit, but as you can see, I surely don't need 15 seconds
              >to write this data out! Is there something special I need to do?
              >Does this have anything to do with known issue #10065
              >(http://www.weblogic.com/docs51/release_notes/rn_knownprob51.html)
              >I have followed all of the instructions in the example code
              >(http://www.weblogic.com/docs51/classdocs/xml.html)...
              >
              >Any assistance is appreciated...
              >
              >here is the client code:
              >import java.io.*;
              >import java.net.*;
              >
              >public class TestClient
              >{
              > public static void main(String aa[])
              > {
              > URL url = null;
              > HttpURLConnection urlc = null;
              > PrintWriter pw = null;
              >
              > file://Commented lines indicate other things I have tried
              > try
              > {
              > url = new URL("http://localhost:7001/ParserServlet");
              > file://urlc = url.openConnection();
              > urlc = (HttpURLConnection)url.openConnection();
              > file://urlc.setRequestProperty("Content-Type", "text/xml");
              > urlc.setDoOutput(true);
              > urlc.setDoInput(true);
              > file://urlc.connect();
              > pw = new PrintWriter(new OutputStreamWriter
              > (urlc.getOutputStream()), true);
              > pw.println("<?xml version='1.0'?><test>testing123</test>");
              > pw.flush();
              > file://urlc.disconnect();
              > } catch(IOException ex) {
              > System.out.println(ex.getMessage());
              > }
              > }
              >}
              >
              >
              >
              >Here is the servlet code:
              >
              >import javax.servlet.*;
              >import javax.servlet.http.*;
              >import java.io.*;
              >import java.net.*;
              >
              >public class TestServlet extends HttpServlet
              >{
              > public synchronized void init(ServletConfig config) throws
              >ServletException
              >
              >
              > super.init(config);
              > System.out.println("Inside init()");
              > }
              >
              > public final void doPost(HttpServletRequest request, HttpServletResponse
              >response)
              > throws ServletException, IOException
              > {
              > System.out.println("Inside doPost()");
              > }
              >
              > protected void doGet(HttpServletRequest req,
              > HttpServletResponse resp)
              > throws ServletException,
              > java.io.IOException
              > {
              > System.out.println("Inside doGet()");
              > }
              >}
              >
              >
              >
              >
              

  • Oracle returns redicrect when there is NAT between client and server

    I have Oracle 8i on Linux sitting behind a firewall/NAT. I have two Apache webservers that run both Tomcat and WebLogic webapps, also behind the NAT. One of them is on the same machine as the Oracle server. Those all connect just fine. I recently had to load a JBoss/Tomcat webapp (no Apache) outside the NAT which needs to talk to the Oracle server. It's using a JDBC driver, I believe calling on this class: oracle.jdbc.driver.OracleDriver. The configured URL is "jdbc:oracle:thin:@localhost:1521:qlink". Using ethereal (A GUI frontend to the packet sniffer tcpdump, which understands the TNS protocol) showed me that this is the connection request being made: "(DESCRIPTION=(CONNECT_DATA=(SID=qlink)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=oracle)))
    (ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))))". I notice it uses SID, where it seems everything else I've analyzed with Ethereal is using SERVICE_NAME. I was first trying to pipe the data through an SSH tunnel. This technique works with all of Oracle's tools that I have tried it with, and with TOAD. I can connect to this Oracle server with the DBA Studio and sqlplus, over an ssh tunnel. But as soon as this JBoss/Tomcat webapp tries, Oracle returns a REDIRECT message. There are two things that strike me as odd: The REDIRECT message returns the hostname of the Oracle server and a nonstandard port; and the JBoss/Tomcat webapp doesn't seem to do anything about it. I has assumed the TNSLSNR forwarded data between 1521 and the appropirate port for requested databse. The port is the same every time, so I made sure that the hostname/port returned was reachable from the client side. But like I said, the client seemed to just ignore it and hang. Getting desparate, I then tried to open up the Oracle ports on the NAT, and use ipchains to restrict what IPs could connect to it, that yielded the same results. I've seen this webapp work with Oracle running on the same machine, both configured identically. (Running Oracle behind the NAT and using SSH tunnels gives the same configuration for JBoss/Tomcat as if I was running Oracle on the same machine)

    I'm pretty uninitiated with Oracle. I don't know how to verify/disprove your guess about the shared server dispatcher, or even what it means. Should I try to pursue the observation that the JDBC client specifies a SID to connect to and everything else specifies a SERVICE_NAME, or is that of little consequence? I'm not sure how to interpret the output from 'lsnrctl serv'. Here's the chunk pertaining to the database in question:
    qlink has 3 service handler(s)
    DISPATCHER established:120 refused:0 current:120 max:254 state:ready
    D000 <machine: sark.unboundtech.com, pid: 15801>
    (ADDRESS=(PROTOCOL=tcp)(HOST=sark.unboundtech.com)(PORT=41714))
    qlink has 3 service handler(s)
    DEDICATED SERVER established:46 refused:0
    LOCAL SERVER
    DISPATCHER established:0 refused:0 current:0 max:254 state:ready
    D001 <machine: sark.unboundtech.com, pid: 15803>
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sark.unboundtech.com)(PORT=41716))(PRESENTATION=oracle.aurora.server.SGiopServer)(SESSION=RAW))
    Presentation: oracle.aurora.server.SGiopServer
    The (ADDRESS=...) is what is returned in the redirect. I created the database with dbassist using the default setup type. I'll have a look at listener.log (the name/location of a log file is actually a question I had but forgot to ask, so thanks), I don't know how to check trace output. The webserver is able to resolve the hostname being returned, and knows how to route to it.
    Localhost is the correct entry. If you've never used SSH tunnels here's a quick rundown. You can tell most SSH clients to listen on an arbitraty port on your machine, and forward data to a remote IP/port from the other side. So from the webserver, I would say to forward localhost:1521 to localhost:1521 on the oracle server. So for sqlplus, for example, I setup tnsnames.ora to route connections to a particular SERVICE_NAME to localhost:1521, which is forwarded through my SSH connection, to localhost:1521 on the Oracle server. This lets gains me two things, all connections look like localhost, making my firewall rules simpler, and I get encryption through SSH (I know Oracle can do encrypted connections, but some clients might not support it, and I don't know how to set it up yet.) I am able to connect to the database over an SSH tunnel using sqlplus, from the webserver (since I ended up installing Oracle on it), so I know the connection is possible.
    After reading that, you might wonder if the hostname:port returned in the redirect were accessible from the web server. They weren't at first, but opening port 1521 and 41714 for sark.unboundtech.com at the NAT, and firewalling requests from IPs other than the webserver, then giving the JDBC config sark.unboundtech.com instead of localhost with an SSH tunnell yielded identical behavior. After recieving the REDIRECT, the JDBC code doesn't seem to do anything except hang, nothing is sent to the location given in the REDIRECT response.

  • Signal tranmission between client and server through tcp/ip

    Hi everyone,I want to transmit analog signal from server to the client,I enclosed one file which is used to transfer an array of string,how can I modify the enclosed example for analog signal tranmission(numeric) and save the signal into a file "load to an ASCII file"".kindly help me to modify this code.
    Thanks
    regards,
    Khan_khan
    Attachments:
    ConcatenatedStringToArray.vi ‏11 KB
    Simple Data Client.vi ‏20 KB
    Simple Data Server.vi ‏19 KB

    Dear thanks for your reply and suggestion.I solve somehow the problem as enclosed in the zip file but now there is one problem that i am not getting with. When I run the project, the first array with the name of "array" gives the wrong result in some position.First all slots of array are filled with the right data but then the first index and few other index gives the wrong result.Kindly correct my error.
    The second problem is ,when i increase the frequency of the signal considering also the sampling rate, it gives me unexpected data at multiple locations.Kindly correct my design so that it should work perfectly.I shall be very thankful.
    Attachments:
    ConcatenatedStringToArray.vi ‏13 KB
    Simple Data Client.vi ‏23 KB
    Simple Data Server.vi ‏27 KB

  • Communication between java and c++, help!

    i am c++ programmer and newly to java.
    now i am developping a client/server app. i use java transfers data (socket) between client and server, and use c++ to create user interfaces because c++ is easier for interfaces.
    my question is:
    in a single PC, java needs to tell c++ what info was read from socket and c++ needs to tell java what info will be written to socket.
    i want to use 2 files (read and write) as media between java and c++. that is: java writes data to a file and c++ reads from the file, and vice versa.
    i know it's not efficient. could you tell me better way to do?
    thanks in advance.

    thanks for reply.
    my problem is: socket is fare in java, not fare in c++
    (win/nt). could u use server in a non nt-server
    machine with c++?I'm not sure what you mean "fair". NT-Server is just a version of NT that Microsoft adds their server products to. Most of which you don't want to use because they are a security nightmare. I think what your asking is can you do the equivalent of Java's ServerSocket in C++. Sure, the socket libraries in Windows (at least last time I checked) were based off the BSD socket libraries. So you would basically do something like:
    // Open socket
    ss=socket(AF_INET, SOCK_STREAM, 0);
    if(ss==-1)
      cerr<<"Error opening socket."<<endl;
      return 0;
    // Fill in address
    struct sockaddr_in server;
    server.sin_family=AF_INET;
    server.sin_port=htons((unsigned short)port);
    server.sin_addr.s_addr=INADDR_ANY;
    // Bind to port
    if(bind(ss, (struct sockaddr *)&server, sizeof(server))==-1)
      cerr<<"Could not bind to port "<<port<<"."<<endl;
      return 0;
    // Ready to accept connections
    if(listen(ss, 5)==-1)
      cerr<<"Could not listen."<<endl;
      return 0;
    // Loop to accept connections
    while(/* some condition */)
      // Accept a connection
      int s=accept(ss, 0, 0);
    }This should work on any version of windows as long as you have winsock. The example code might need to be changed a little though since I copied it from a Linux program I had.

  • How to handle when Client and server write to the socket at the same time

    Hi all,
    I'm writing a socket communication when client and server may write information the the socket at the same time. I look every where but the samples from the internet only shows example of server replies to client after receiving requests from clients.
    Let's say that:
    Client 1 ->Socket 1 -> Server 1
    Now if there are two threads in the server, one blocked waiting for the input from client on socket 1, the second one write something on the socket to client 1, is it possible?
    And if it's possible, if at the time Server 1 writes information to Client 1, Client 1 writes some information to Server 1 too, will there be any conflict problem or the socket could handle that two ways communication simultaneously?
    It's critical questions for me. Thanks for your help.

    I really use Server Client paradigm. However, beside the request, response mechanism, there is also an additional mechanism called update which server periodically send information update to client without the need for a request from client.
    So you suggest client should initiate 2 sockets, one for request and response, one for receiving update from the server? Will this work?

  • Communication between two jvm (client and server)

    Hi ,
       I want to access the UME service of the SAP J2EE Container using a stanalone client application.
    So the client would be running on remote JVM.
    Here we use the JNDI service to communicate between the client and server.
    p.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");
                        p.put(Context.PROVIDER_URL, providerURL.trim());
                        p.put(Context.SECURITY_PRINCIPAL, securityPrinciple.trim());
                        p.put(Context.SECURITY_CREDENTIALS, securityCredentials.trim());
                        Context ctx = (Context) new InitialContext(p);
                        Object objRef = ctx.lookup(ejbName.trim());
    I want to know that is the communication between the client and server secured in this scenario
    Best Regards
    Manoj

    Okay, the client and server VMs are different implementations of the Hotspot engine. Hotspot basically takes the Java bytecode from your .class files and turns it into native machine instructions at runtime. (The optimizations are actually much more complex than that, but that's the basic concept.)
    The client VM is so named because it's designed to be used for GUI-type applications interacting with the user. It is designed to have a quicker startup and smaller memory footprint.
    The server VM uses more memory and is typically slower at starting up than the client VM, but can often perform ridiculously fast. This of course depends completely on the particular code being run, and you should probably profile and see which VM works better for your application.
    Some interesting optimizations are performed by the 1.4.1 server VM, such as: removal of array-bounds checks (when it determines that the index can't become out of bounds), inlining of methods, and more.
    Here is a link to more info if you're interested:
    http://java.sun.com/products/hotspot/docs/whitepaper/Java_HotSpot_WP_Final_4_30_01.html

  • Connection between SDM client and server is broken

    Dear All,
    First of all this is what I have
    -NW04 SPS 17
    -NWDS Version: 7.0.09 Build id: 200608262203
    -using VPN connection
    -telnet on port 57018 is succesfull
    I can login to SDM server (from NWDS and from SDM GUI) I can see the state of SDM(green light), restart it, can navigate through tabs in GUI, but every time I am trying to deploy an ear i have this error:
    Deployment exception : Filetransfer failed: Error received from server: Connection between SDM client and server is broken
    Inner exception was :
    Filetransfer failed: Error received from server: Connection between SDM client and server is broken
    I have already read a lot of topics,blogs,notes but didn't find the solution.
    Can anybody help me?
    Best Regards

    Having same issue. Nothing helped so far... Using NWDS 7.0 SP18.
    I have turned SDM tracing on and this is what I see on client side after sending first data package:
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: debug "20120224140253 0280/17 Client: finished sending string part"
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: debug "20120224140253 0280/0 Client: receive String part from Server"
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl.receiveFromServer(NetComm ..): Entering method
    com.sap.bc.cts.tp.net.NetComm.receive(): Entering method
    com.sap.bc.cts.tp.net.NetComm: debug "Method "receive(char[])" could not read all requested bytes. There are still 12 bytes to read"
    com.sap.bc.cts.tp.net.NetComm: debug "Caught IOException during read of header bytes (-1,          43):Connection reset"
    com.sap.bc.cts.tp.net.NetComm: debug "  throwing IOException(net.id_000001)"
    com.sap.bc.cts.tp.net.NetComm.receive(): Exiting method
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: Exiting method
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: debug "20120224140253 0281/1 Client: connection was broken"
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: Exiting method
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: debug "20120224140253 0281/0 Client: finshed sendAndReceive"
    com.sap.sdm.is.cs.cmd.client.impl.CmdClientImpl: Exiting method
    My connection on server is still active so I have to restart SDM server to reset and try it again.
    Anyone have idea whats happening?
    Edited by: skyrma on Feb 24, 2012 2:46 PM
    Edited by: skyrma on Feb 24, 2012 2:47 PM
    Edited by: skyrma on Feb 24, 2012 2:47 PM

  • JSSE  Client and server communication problem .err:untrusted server cert

    Hai all,
    I am trying to communicate JSSE client and server.
    I have created root.cert(CA),root.key,server.cert,server.key , client.cert and client.key. All these certificates are created using openssl.
    I have placed root.cert in default keystore cacerts.
    I have created a keystores(server & client) name mykeystore.
    I have placed root.cert and client.cert in the client keystore.
    I have placed root.cert and server.cert in the server keystore.
    But during the run time i am getting javax.net.ssl.SSLException: untrusted server cert chain.
    please suggest the modifications needs to be done to fix the error.
    please tell me In the client keystore and in the server keystore....what certificates we need to put?
    whether my approach as said above is correct or not?
    In java code how to specify this particular certificate we are referring?
    I have coded in this way ....
    SSLContext ctx;
    KeyManagerFactory kmf;
    KeyStore ks;
    char[] prasad = "prasad".toCharArray();
    ctx = SSLContext.getInstance("SSLv3");
    kmf = KeyManagerFactory.getInstance("SunX509");
    ks = KeyStore.getInstance("jks");
    ks.load(new FileInputStream("mykeystore"), prasad);
    kmf.init(ks, prasad);
    ctx.init(kmf.getKeyManagers(), null, null);
    factory = ctx.getSocketFactory();
    But my doubt is we are specifying only keystore name with that how it will check root.cert(ca) and client.cert and server.cert?
    Is there any modifications need in my code?
    Please tell me some way ...
    Thanks ,
    Prasad.

    Hi prasad,
    There will be a problem with the certificates being received from thr remote server or client. Check that your trust store contains the certificate of the remote machine or the CA that signed it and that the certificate has not expired.
    Also be sure that both machines are using the latest version of the JSSE.
    Hope this will help you.
    Regards,
    Anil.
    Technical Support Engineer.

  • Is in PI7.1 possible asynchronous communication between SOAP and ABAPProxy?

    Hi,
    when method execute_asynchronous has disapeared since XI/PI 7.1, is
    there still way how to use ABAP proxy in asynchronous way?
    We need to build asynchronous connection SOAP->PI->ABAP_Proxy.
    In PI, both interfaces are defined as asynchronous (outbound for SOAP and
    inbound for ABAP Proxy).
    Despite of this fact, when message is sent, it is processed
    synchronous way.
    I have set breakpoint in my implementation of method for ABAP Proxy
    message processing. When message is sent and breakpoint is reached,
    whole connection stays open (between SOAP and PI and between PI and
    ABAP Proxy) and waits for processing method (the breakpointed one) to
    return. Only when processing method returns, is connection finelly
    closed.
    If i understand it correctly, this is synchronous behavior. In
    asynchronous behavior, as i understand it, should be connection
    between PI and ABAP Proxy of application server closed immediately
    after message has been delivered. This mean before my processing
    method is even called.
    The same could be said about SOAP and PI communication. Connection
    should be closed immediately after PI has received message. From
    definition of asynchronous communication of PI is obvious, that PI
    should receive message correctly and close connection to sender system
    even when receiver is unreachable. It should deliver message later
    when, receiver system is back on line. So why it keeps connection to
    sender system open while it waits for receiver?
    Why is this happening, when both interfaces are defined as
    asynchronous? Could be the reason for this, if APPLICATION
    ACKNOWLEDGEMENT is set on by default? If so, how can i change it
    to SYSTEM ACKNOWLEDGEMENT, or disable it at all?
    Or is this kind of asynchronous communication even possible since
    XI/PI 7.1 ?
    Processing of message we are sending can take some time, so we dont
    want connection pending open while waiting for finish of
    processing. Thats the reason why we have chose asynchronous model to
    use.

    Quote from How to Use the J2EE SOAP Adapter:
    "If you select Best Effort, the Web service client will receive a response
    message in the SOAP body. Otherwise, the Web service client will not receive a
    response message if no error occurs."
    "if no error occurs" - that is the problem. In either case he still
    waits if some error occure or not. I dont want it. Once PI has
    received message, I want the connection with sender to be closed. If
    there will be error in communication between PI and reciever, I want
    to see it only in PI log. That mean no notification to sender to be
    send about that error.
    Is that possible?

  • Error during VM container communication between ABAP and JAVA

    Hello,
    While creation of SC, I am getting error "Error during VM container communication between ABAP and JAVA"
    Based on earlier responses in this forum, I checked following activity.
    1. T Code - BBP_CND_CHECK_CUST
    Result - IPC Pricing is Active and IPC is now running in VMC
    2. Run Report - RSVMCRT_HEALTH_CHECK
    Result - The Java component is deactivated
    3. As per OSS note 854170, Profile parameters were existed as below
    a) vmcj/enable - on
    b) vmcj/option/maxJavaHeap = 200M
    So, How to get Java component activated?
    Thanks,
    Rahul Mandale

    Thanks Markus,
    For SM53, I am getting resulets as " Java is not active on this application server - Message no. SVMCRT011"
    Can you suggest, what I need to do for it? I can't use SRM Shopping cart because of it. thanks in advance, Rahul
    and dev_w0 trace ....
    trc file: "dev_w0", trc level: 1, release: "700"
    ACTIVE TRACE LEVEL           1
    ACTIVE TRACE COMPONENTS      all, MJ

    B Wed Aug 31 15:45:40 2011
    B  create_con (con_name=R/3)
    B  Loading DB library 'D:\usr\sap\CUS\DVEBMGS04\exe\dboraslib.dll' ...
    B  Library 'D:\usr\sap\CUS\DVEBMGS04\exe\dboraslib.dll' loaded
    B  Version of 'D:\usr\sap\CUS\DVEBMGS04\exe\dboraslib.dll' is "700.08", patchlevel (0.46)
    B  New connection 0 created
    M sysno      04
    M sid        CUS
    M systemid   560 (PC with Windows NT)
    M relno      7000
    M patchlevel 0
    M patchno    52
    M intno      20050900
    M make:      multithreaded, Unicode, optimized
    M pid        456
    M
    M  kernel runs with dp version 210000(ext=109000) (@(#) DPLIB-INT-VERSION-210000-UC)
    M  length of sys_adm_ext is 572 bytes
    M  ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 456) [dpxxdisp.c   1293]
    I  MtxInit: 30000 0 0
    M  DpSysAdmExtCreate: ABAP is active
    M  DpSysAdmExtCreate: VMC (JAVA VM in WP) is not active
    M  DpShMCreate: sizeof(wp_adm)          18304     (1408)
    M  DpShMCreate: sizeof(tm_adm)          3954072     (19672)
    M  DpShMCreate: sizeof(wp_ca_adm)          24000     (80)
    M  DpShMCreate: sizeof(appc_ca_adm)     8000     (80)
    M  DpCommTableSize: max/headSize/ftSize/tableSize=500/8/528056/528064
    M  DpShMCreate: sizeof(comm_adm)          528064     (1048)
    M  DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
    M  DpShMCreate: sizeof(file_adm)          0     (72)
    M  DpShMCreate: sizeof(vmc_adm)          0     (1452)
    M  DpShMCreate: sizeof(wall_adm)          (38456/34360/64/184)
    M  DpShMCreate: sizeof(gw_adm)     48
    M  DpShMCreate: SHM_DP_ADM_KEY          (addr: 05C00040, size: 4613144)
    M  DpShMCreate: allocated sys_adm at 05C00040
    M  DpShMCreate: allocated wp_adm at 05C01E28
    M  DpShMCreate: allocated tm_adm_list at 05C065A8
    M  DpShMCreate: allocated tm_adm at 05C065D8
    M  DpShMCreate: allocated wp_ca_adm at 05FCBB70
    M  DpShMCreate: allocated appc_ca_adm at 05FD1930
    M  DpShMCreate: allocated comm_adm at 05FD3870
    M  DpShMCreate: system runs without file table
    M  DpShMCreate: allocated vmc_adm_list at 06054730
    M  DpShMCreate: allocated gw_adm at 06054770
    M  DpShMCreate: system runs without vmc_adm
    M  DpShMCreate: allocated ca_info at 060547A0
    M  DpShMCreate: allocated wall_adm at 060547A8
    X  EmInit: MmSetImplementation( 2 ).
    X  MM diagnostic options set: 0
    X  <ES> client 0 initializing ....
    X  Using implementation flat
    M  <EsNT> Memory Reset disabled as NT default
    X  ES initialized.

    M Wed Aug 31 15:45:41 2011
    M  ThInit: running on host crmsys

    M Wed Aug 31 15:45:42 2011
    M  calling db_connect ...
    C  Prepending D:\usr\sap\CUS\DVEBMGS04\exe to Path.

    C Wed Aug 31 15:45:47 2011
    C  Client NLS settings: AMERICAN_AMERICA.UTF8
    C  Logon as OPS$-user to get SAPSR3's password
    C  Connecting as /@CRM on connection 0 (nls_hdl 0) ... (dbsl 700 240106)
    C  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    C    0 UTF8                                                      1   0619F158   061A46F4   061A3F7C
    C  Attaching to DB Server CRM (con_hdl=0,svchp=061A3EC8,svrhp=061B5794)
    C  Starting user session (con_hdl=0,svchp=061A3EC8,srvhp=061B5794,usrhp=061CA558)

    C Wed Aug 31 15:45:48 2011
    C  Now '/@CRM' is connected (con_hdl 0, nls_hdl 0).
    C  Got SAPSR3's password from OPS$-user
    C  Disconnecting from connection 0 ...
    C  Closing user session (con_hdl=0,svchp=061A3EC8,usrhp=061CA558)
    C  Now I'm disconnected from ORACLE
    C  Connecting as SAPSR3/<pwd>@CRM on connection 0 (nls_hdl 0) ... (dbsl 700 240106)
    C  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    C    0 UTF8                                                      1   0619F158   061A46F4   061A3F7C
    C  Starting user session (con_hdl=0,svchp=061A3EC8,srvhp=061B5794,usrhp=061CA558)
    C  Now 'SAPSR3/<pwd>@CRM' is connected (con_hdl 0, nls_hdl 0).
    C  Database NLS settings: AMERICAN_AMERICA.UTF8
    C  Database instance CRM is running on CRMSYS with ORACLE version 10.2.0.1.0 since 20110831

    B Wed Aug 31 15:45:49 2011
    B  Connection 0 opened (DBSL handle 0)
    B  Wp  Hdl ConName          ConId     ConState     TX  PRM RCT TIM MAX OPT Date     Time   DBHost         
    B  000 000 R/3              000000000 ACTIVE       NO  YES NO  000 255 255 20110831 154542 CRMSYS         
    M  db_connect o.k.
    M  ICT: exclude compression: .zip,.cs,.rar,.arj,.z,.gz,.tar,.lzh,.cab,.hqx,.ace,.jar,.ear,.war,.css,.pdf,.js,.gzip,.uue,.bz2,.iso,.sda,.sar,.gif

    I Wed Aug 31 15:46:12 2011
    I  MtxInit: 0 0 0
    M  SHM_PRES_BUF               (addr: 0A7C0040, size: 4400000)
    M  SHM_ROLL_AREA          (addr: 788A0040, size: 61440000)
    M  SHM_PAGING_AREA          (addr: 0AC00040, size: 32768000)
    M  SHM_ROLL_ADM               (addr: 0CB50040, size: 615040)
    M  SHM_PAGING_ADM          (addr: 0CBF0040, size: 525344)
    M  ThCreateNoBuffer          allocated 544152 bytes for 1000 entries at 0CC80040
    M  ThCreateNoBuffer          index size: 3000 elems
    M  ThCreateVBAdm          allocated 12160 bytes (50 server) at 0CD10040
    X  EmInit: MmSetImplementation( 2 ).
    X  MM diagnostic options set: 0
    X  <ES> client 0 initializing ....
    X  Using implementation flat
    X  ES initialized.
    B  db_con_shm_ini:  WP_ID = 0, WP_CNT = 13, CON_ID = -1
    B  dbtbxbuf: Buffer TABL  (addr: 10E700C8, size: 30000000, end: 12B0C448)
    B  dbtbxbuf: Buffer TABLP (addr: 12B100C8, size: 10240000, end: 134D40C8)
    B  dbexpbuf: Buffer EIBUF (addr: 0FBA00D0, size: 4194304, end: 0FFA00D0)
    B  dbexpbuf: Buffer ESM   (addr: 134E00D0, size: 4194304, end: 138E00D0)
    B  dbexpbuf: Buffer CUA   (addr: 138F00D0, size: 3072000, end: 13BDE0D0)
    B  dbexpbuf: Buffer OTR   (addr: 13BE00D0, size: 4194304, end: 13FE00D0)
    M  rdisp/reinitialize_code_page -> 0
    M  icm/accept_remote_trace_level -> 0
    M  rdisp/no_hooks_for_sqlbreak -> 0
    M  CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.

    S Wed Aug 31 15:46:15 2011
    S  *** init spool environment
    S  initialize debug system
    T  Stack direction is downwards.
    T  debug control: prepare exclude for printer trace
    T  new memory block 1946AA80

    S Wed Aug 31 15:46:16 2011
    S  spool kernel/ddic check: Ok
    S  using table TSP02FX for frontend printing
    S  1 spool work process(es) found
    S  frontend print via spool service enabled
    S  printer list size is 150
    S  printer type list size is 50
    S  queue size (profile)   = 300
    S  hostspool list size = 3000
    S  option list size is 30
    S      found processing queue enabled
    S  found spool memory service RSPO-RCLOCKS at 1D6D00A8
    S  doing lock recovery
    S  setting server cache root
    S  found spool memory service RSPO-SERVERCACHE at 1D6D0430
    S    using messages for server info
    S  size of spec char cache entry: 297028 bytes (timeout 100 sec)
    S  size of open spool request entry: 2132 bytes
    S  immediate print option for implicitely closed spool requests is disabled

    A Wed Aug 31 15:46:18 2011

    A  -PXA--
    A  PXA INITIALIZATION
    A  PXA: Fragment Size too small: 73 MB, reducing # of fragments
    A  System page size: 4kb, total admin_size: 5132kb, dir_size: 5076kb.
    A  Attached to PXA (address 688A0040, size 150000K)
    A  abap/pxa = shared protect gen_remote
    A  PXA INITIALIZATION FINISHED
    A  -PXA--


    A Wed Aug 31 15:46:20 2011
    A  ABAP ShmAdm attached (addr=57A40000 leng=20955136 end=58E3C000)
    A  >> Shm MMADM area (addr=57EB5E58 leng=126176 end=57ED4B38)
    A  >> Shm MMDAT area (addr=57ED5000 leng=16150528 end=58E3C000)
    A  RFC Destination> destination crmsys_CUS_04 host crmsys system CUS systnr 4 (crmsys_CUS_04)

    A Wed Aug 31 15:46:21 2011
    A  RFC Options> H=crmsys,S=04,d=2,
    A  RFC FRFC> fallback activ but this is not a central instance.
    A   
    A  RFC rfc/signon_error_log = -1
    A  RFC rfc/dump_connection_info = 0
    A  RFC rfc/dump_client_info = 0
    A  RFC rfc/cp_convert/ignore_error = 1
    A  RFC rfc/cp_convert/conversion_char = 23
    A  RFC rfc/wan_compress/threshold = 251
    A  RFC rfc/recorder_pcs not set, use defaule value: 2
    A  RFC rfc/delta_trc_level not set, use default value: 0
    A  RFC rfc/no_uuid_check not set, use default value: 0
    A  RFC rfc/bc_ignore_thcmaccp_retcode not set, use default value: 0
    A  RFC Method> initialize RemObjDriver for ABAP Objects
    M  ThrCreateShObjects          allocated 13730 bytes at 0FFB0040

    N Wed Aug 31 15:46:22 2011
    N  SsfSapSecin: putenv(SECUDIR=D:\usr\sap\CUS\DVEBMGS04\sec): ok

    N  =================================================
    N  === SSF INITIALIZATION:
    N  ===...SSF Security Toolkit name SAPSECULIB .
    N  ===...SSF trace level is 0 .
    N  ===...SSF library is D:\usr\sap\CUS\DVEBMGS04\exe\sapsecu.dll .
    N  ===...SSF hash algorithm is SHA1 .
    N  ===...SSF symmetric encryption algorithm is DES-CBC .
    N  ===...sucessfully completed.
    N  =================================================

    N Wed Aug 31 15:46:23 2011
    N  MskiInitLogonTicketCacheHandle: Logon Ticket cache pointer retrieved from shared memory.
    N  MskiInitLogonTicketCacheHandle: Workprocess runs with Logon Ticket cache.
    M  JrfcVmcRegisterNativesDriver o.k.
    W  =================================================
    W  === ipl_Init() called
    B    dbtran INFO (init_connection '<DEFAULT>' [ORACLE:700.08]):
    B     max_blocking_factor =  15,  max_in_blocking_factor      =   5,
    B     min_blocking_factor =  10,  min_in_blocking_factor      =   5,
    B     prefer_union_all    =   0,  prefer_join                 =   0,
    B     prefer_fix_blocking =   0,  prefer_in_itab_opt          =   1,
    B     convert AVG         =   0,  alias table FUPD            =   0,
    B     escape_as_literal   =   1,  opt GE LE to BETWEEN        =   0,
    B     select *            =0x0f,  character encoding          = STD / <none>:-,
    B     use_hints           = abap->1, dbif->0x1, upto->2147483647, rule_in->0,
    B                           rule_fae->0, concat_fae->0, concat_fae_or->0

    W Wed Aug 31 15:46:24 2011
    W    ITS Plugin: Path dw_gui
    W    ITS Plugin: Description ITS Plugin - ITS rendering DLL
    W    ITS Plugin: sizeof(SAP_UC) 2
    W    ITS Plugin: Release: 700, [7000.0.52.20050900]
    W    ITS Plugin: Int.version, [32]
    W    ITS Plugin: Feature set: [10]
    W    ===... Calling itsp_Init in external dll ===>
    W  === ipl_Init() returns 0, ITSPE_OK: OK
    W  =================================================
    E  Enqueue Info: rdisp/wp_no_enq=1, rdisp/enqname=<empty>, assume crmsys_CUS_04
    E  Replication is disabled
    E  EnqCcInitialize: local lock table initialization o.k.
    E  EnqId_SuppressIpc: local EnqId initialization o.k.
    E  EnqCcInitialize: local enqueue client init o.k.

    B Wed Aug 31 15:46:48 2011
    B  table logging switched off for all clients

    M Wed Aug 31 15:47:55 2011
    M  SecAudit(RsauShmInit): WP attached to existing shared memory.
    M  SecAudit(RsauShmInit): addr of SCSA........... = 05BD0040
    M  SecAudit(RsauShmInit): addr of RSAUSHM........ = 05BD07A8
    M  SecAudit(RsauShmInit): addr of RSAUSLOTINFO... = 05BD07E0
    M  SecAudit(RsauShmInit): addr of RSAUSLOTS...... = 05BD07EC

    A Wed Aug 31 15:48:44 2011
    A  RFC FRFC> fallback on the central gateway crmsys sapgw04 activ

    B Wed Aug 31 15:49:47 2011
    B  dbmyclu : info : my major identification is 3232288873, minor one 4.
    B  dbmyclu : info : Time Reference is 1.12.2001 00:00:00h GMT.
    B  dbmyclu : info : my initial uuid is D98FA690E8AA314D9B69930868792664.
    B  dbmyclu : info : current optimistic cluster level: 0
    B  dbmyclu : info : pessimistic reads set to 2.

  • Async tcp client and server. How can I determine that the client or the server is no longer available?

    Hello. I would like to write async tcp client and server. I wrote this code but a have a problem, when I call the disconnect method on client or stop method on server. I can't identify that the client or the server is no longer connected.
    I thought I will get an exception if the client or the server is not available but this is not happening.
    private async void Process()
    try
    while (true)
    var data = await this.Receive();
    this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    How can I determine that the client or the server is no longer available?
    Server
    public class Server
    private readonly Dictionary<IPEndPoint, TcpClient> clients = new Dictionary<IPEndPoint, TcpClient>();
    private readonly List<CancellationTokenSource> cancellationTokens = new List<CancellationTokenSource>();
    private TcpListener tcpListener;
    private bool isStarted;
    public event Action<string> NewMessage;
    public async Task Start(int port)
    this.tcpListener = TcpListener.Create(port);
    this.tcpListener.Start();
    this.isStarted = true;
    while (this.isStarted)
    var tcpClient = await this.tcpListener.AcceptTcpClientAsync();
    var cts = new CancellationTokenSource();
    this.cancellationTokens.Add(cts);
    await Task.Factory.StartNew(() => this.Process(cts.Token, tcpClient), cts.Token, TaskCreationOptions.LongRunning, TaskScheduler.Default);
    public void Stop()
    this.isStarted = false;
    foreach (var cancellationTokenSource in this.cancellationTokens)
    cancellationTokenSource.Cancel();
    foreach (var tcpClient in this.clients.Values)
    tcpClient.GetStream().Close();
    tcpClient.Close();
    this.clients.Clear();
    public async Task SendMessage(string message, IPEndPoint endPoint)
    try
    var tcpClient = this.clients[endPoint];
    await this.Send(tcpClient.GetStream(), Encoding.ASCII.GetBytes(message));
    catch (Exception exception)
    private async Task Process(CancellationToken cancellationToken, TcpClient tcpClient)
    try
    var stream = tcpClient.GetStream();
    this.clients.Add((IPEndPoint)tcpClient.Client.RemoteEndPoint, tcpClient);
    while (!cancellationToken.IsCancellationRequested)
    var data = await this.Receive(stream);
    this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    private async Task Send(NetworkStream stream, byte[] buf)
    await stream.WriteAsync(BitConverter.GetBytes(buf.Length), 0, 4);
    await stream.WriteAsync(buf, 0, buf.Length);
    private async Task<byte[]> Receive(NetworkStream stream)
    var lengthBytes = new byte[4];
    await stream.ReadAsync(lengthBytes, 0, 4);
    var length = BitConverter.ToInt32(lengthBytes, 0);
    var buf = new byte[length];
    await stream.ReadAsync(buf, 0, buf.Length);
    return buf;
    Client
    public class Client
    private TcpClient tcpClient;
    private NetworkStream stream;
    public event Action<string> NewMessage;
    public async void Connect(string host, int port)
    try
    this.tcpClient = new TcpClient();
    await this.tcpClient.ConnectAsync(host, port);
    this.stream = this.tcpClient.GetStream();
    this.Process();
    catch (Exception exception)
    public void Disconnect()
    try
    this.stream.Close();
    this.tcpClient.Close();
    catch (Exception exception)
    public async void SendMessage(string message)
    try
    await this.Send(Encoding.ASCII.GetBytes(message));
    catch (Exception exception)
    private async void Process()
    try
    while (true)
    var data = await this.Receive();
    this.NewMessage.SafeInvoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    private async Task Send(byte[] buf)
    await this.stream.WriteAsync(BitConverter.GetBytes(buf.Length), 0, 4);
    await this.stream.WriteAsync(buf, 0, buf.Length);
    private async Task<byte[]> Receive()
    var lengthBytes = new byte[4];
    await this.stream.ReadAsync(lengthBytes, 0, 4);
    var length = BitConverter.ToInt32(lengthBytes, 0);
    var buf = new byte[length];
    await this.stream.ReadAsync(buf, 0, buf.Length);
    return buf;

    Hi,
    Have you debug these two applications? Does it go into the catch exception block when you close the client or the server?
    According to my test, it will throw an exception when the client or the server is closed, just log the exception message in the catch block and then you'll get it:
    private async void Process()
    try
    while (true)
    var data = await this.Receive();
    this.NewMessage.Invoke(Encoding.ASCII.GetString(data));
    catch (Exception exception)
    Console.WriteLine(exception.Message);
    Unable to read data from the transport connection: An existing   connection was forcibly closed by the remote host.
    By the way, I don't know what the SafeInvoke method is, it may be an extension method, right? I used Invoke instead to test it.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Communication between : AP and WLAN controller

    Hi,
    The communication between AP and WLAN Controller is ( Data and Control ) UDP.
    Source port 1024 and destination port 12222 and 12223. Actually which device listen to which port or both should listen as control and data can be generated from both the devices.
    How does the user ( wireless client) traffic is switched - if user traffic is a TCP traffic. It will be sent to WLANC and then WLANC forwards it to respective VLAN or default gateway ( depending upon the destination in the packet ).
    Please explain / share the experience.
    any link on cisco.com
    Thanka in advance
    Subodh

    "the LWAPP Control and Data messages are encapsulated in UDP packets that are carried over the IP network. The only requirement is established IP connectivity between the access points and the WLC. The LWAPP tunnel uses the access point's IP address and the WLC's AP Manager interface IP address as endpoints. The AP Manager interface is explained in further detail in the
    implementation section. On the access point side, both LWAPP Control and Data messages use an ephemeral port that is derived from a hash of the access point MAC address as the UDP port. On the WLC side, LWAPP Data messages always use UDP port 12222. On the WLC side, LWAPP Control messages always use UDP port 12223.
    The mechanics and sequencing of Layer 3 LWAPP are similar to Layer 2 LWAPP except that the packets are carried in UDP packets instead of being encapsulated in Ethernet frames."
    Taken from "Cisco 440X Series Wireless LAN Controllers Deployment Guide"

  • Communication between two Macs Server

    Communication between two Macs Server:
    Can they work together and communicate and interact normally in a PowerMac network, OS X 10.5.8 Server installed, and a MacPro computer that is running Server 4.0.3 on Yosemite? Had to do some additional implementation?
    Regards

    from the JavaDocs:
    http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContext.html
    getContext
    public ServletContext getContext(java.lang.String uripath)
    Returns a ServletContext object that corresponds to a specified URL on the server.
    This method allows servlets to gain access to the context for various parts of the server, and as needed obtain RequestDispatcher objects from the context. The given path must be begin with "/", is interpreted relative to the server's document root and is matched against the context roots of other web applications hosted on this container.
    In a security conscious environment, the servlet container may return null for a given URL.
    Parameters:
    uripath - a String specifying the context path of another web application in the container.
    Returns:
    the ServletContext object that corresponds to the named URL, or null if either none exists or the container wishes to restrict this access.
    See Also:
    RequestDispatcher

Maybe you are looking for