How catch messages from LDAP

Hi all,
i found this on the OID documentation (9.2 Oracle Identity Management Attribute Reference):
9.2.467 pwdExpireWarning
Description
The number of seconds before a password expires that a warning should be sent to the user. The user will see the warning when they attempt to log on during the warning period. If the user does not modify the password before it expires, the user is locked out until the password is changed by the administrator. The default value is 0, which means no warnings are sent.
For this feature to work, the client application must support it.
Last sentence (maked in bold by me) is clear but don't specified WHERE is possible to get information HOW client application to do it. I can't find anything.
Can anyone help me? Where i found the documentation to catch this type of LDAP event?
Thanks a lot.
Alessandro

Please, do you have any suggestions?
Do you know if "client application" means also for "web application"?
Alesssandro

Similar Messages

  • Catch message from submit abap report

    I would like to catch message from submit abap report.
    Example in abap program
    REPORT  zprog00.
    PARAMETERS p_test TYPE i DEFAULT 2.
    START-OF-SELECTION.
      IF p_test > 1.
        MESSAGE e000(38) WITH 'More than one'.
      ENDIF.
    and in Function module
      SUBMIT zprog00
              WITH p_test EQ '3'
              EXPORTING LIST TO MEMORY
              AND RETURN.
    <--- In this step I would like to catch error message from Program zprog00*
    Thank

    Hi,
    try this:
      DATA LIST_OBJ TYPE TABLE OF ABAPLIST.
      DATA LIST_ASC TYPE TABLE OF CHAR255.
      SUBMIT ZTEST EXPORTING LIST TO MEMORY AND RETURN.
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          LISTOBJECT = LIST_OBJ
        EXCEPTIONS
          NOT_FOUND  = 1
          OTHERS     = 2.
      CALL FUNCTION 'LIST_TO_ASCI'
        TABLES
          LISTASCI           = LIST_ASC
          LISTOBJECT         = LIST_OBJ
        EXCEPTIONS
          EMPTY_LIST         = 1
          LIST_INDEX_INVALID = 2
          OTHERS             = 3.
    and have a look into list_asc.
    Regards, Dieter

  • How toremove messages from JMS Queue?how to configure queue in spring?

    Hi
    I have Confiured a JMS configaration in spring applicationConfiguaration.xml file
    <bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory">
              <property name="brokerURL" value="tcp://localhost:61616"/>
              <property name="useAsyncSend" value="true"/>
         </bean>
         <bean id="queue" class="org.apache.activemq.command.ActiveMQQueue">
         <constructor-arg value="foo"/>
    </bean>
         <bean id="broker" class="org.apache.activemq.xbean.BrokerFactoryBean">
              <property name="config" value="classpath:activemq.xml" />
              <property name="start" value="true" />
         <!--          <property name="messageListener" ref="auditInterface"/> -->
         </bean>
         <bean id="auditInterface"
              class="org.springframework.jms.remoting.JmsInvokerProxyFactoryBean">
    <property name="serviceInterface" value="com.infiniti.gpn.auditing.AuditInterface"/>
    <property name="connectionFactory" ref="connectionFactory"/>
    <property name="queue" ref="queue"/>
    </bean>
         <bean id="listenerContainer" class="org.springframework.jms.listener.SimpleMessageListenerContainer">
    <property name="connectionFactory" ref="connectionFactory"/>
    <property name="destination" ref="queue"/>
    <property name="messageListener" ref="auditMessageListener"/>
         </bean>
    Sender is sedning messages continusly messages that messages r storing in queue , these r acupying more memory in RAM , due to that jboss is restarting for each request, is there any way to clean up messages in Queue ? if it is there then how will configure that queue in apllicationConfiguaration.xml file?
    Thanks in advance
    Nara

    I suggest posting your question on the [Spring Remoting and JMX forum|http://forum.springframework.org/forumdisplay.php?f=30].

  • I am trying to figure out how to message from my ipod to an iphone with the messages app?

    I really need help if anyone can help me asap thank you so much.!!  ^-^

    If both devices have iOS 5 or later use the Apple Messages app.
    iOS: About Messages
    Otherwise you need a thir-party texting app from the App store on the iPod

  • Send message from jtextpane

    how send message from jtextpane.
    iam using com.jscape.inet.smtp for send message through textarea. In text area i take string and assign to string using gettext().
    In case if textpane how to set body content to variable.

    Hi raja8nz,
    JTextPane extends JTextComponent, and JTextComponent provides the getText() method. So can't you just use getText()?
    -Yeath
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test extends JFrame implements ActionListener
       private JTextPane jtp;
       public Test()
          super( "My Test" );
          this.getContentPane().setLayout( new BorderLayout() );
          this.jtp = new JTextPane();
          JButton jb = new JButton( "Click" );
          jb.addActionListener( this );
          this.getContentPane().add( this.jtp, BorderLayout.CENTER );
          this.getContentPane().add( jb, BorderLayout.SOUTH );
       public void actionPerformed( ActionEvent e )
          System.out.println( this.jtp.getText() );
       public static void main( String[] args )
          Test test = new Test();
          test.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
          test.setSize( 400, 400 );
          test.setVisible( true );
    }

  • How to get the message from a Runnable class

    The Schedule class is actually a JFrame, what I want to do is to "get" the message from Scheduler Class and display it in a JTextField, to let user know what is doing.
    How can I approach this?
    public class Schedule {
        @SuppressWarnings("static-access")
        public static void main(String args[]) throws InterruptedException {
            final Scheduler s = new Scheduler();
            Thread t = new Thread(s);
            t.start();
    public class Scheduler implements Runnable{
    private static int actionType;
    private static String msg;
        public static void setMsg(String msg) {
            Scheduler.msg = msg;
        public static String getMsg() {
            return msg;
        public void run() {
            //System.out.println((int)(Math.random() * 1000));
            actionType = 1;
            while(true){
                try {
                    switch(actionType){
                        case 1:
                            setMsg("Process actionType: "+actionType);
                            break;
                            case 2:
                            Thread.sleep(2000L);
                            setMsg("Process actionType: "+actionType);
                            break;
                            case 3:
                            Thread.sleep(2000L);
                            setMsg("Process actionType: "+actionType);
                            break;
                            case 4:
                            Thread.sleep(2000L);
                            setMsg("Process actionType: "+actionType);
                            break;
                    actionType++;
                    if(actionType>4){
                        actionType = 1;
                } catch (InterruptedException ex) {
                    System.out.println("Scheduler.run:"+ex.toString());
    }

    Or with only one loop:
            int actionType = 0;
            while (true)
                actionType = (actionType % 4) + 1;
                msg = "Process actionType: " + actionType;
                try
                    Thread.sleep(2000L);
                catch (InterruptedException ex)
                    System.out.println("Scheduler.run:" + ex.toString());
            }

  • Would like to know how to read SOAP Messages from SOAP Client

    Hello,
    I am new to Webservices. Here is what I want to do.
    I need to develop a Web Service provider application.
    Here are the tools I am using to develop this application.
    a) WSAD 5.1.2
    b) Axis 1.0 built within WebSphere.
    I do have a WSDL file and I generated the code by using WSAD ==>WebService ==> Generate Java bean skeleton option. I want to know, how I can read the SOAP request message from the generated code and to add new SOAP header element.
    Any help you can provide would be greatly appreciated.

    Depending on the version of WebSphere you are using, there should be a menu option to create a dynamic web project. This will set up the basic structure of the application for you. Also, right-click on the newly created web application and there should be a context menu something like Web Services -> Deploy Web Service. This will do some more under-the-covers work for you.
    The webservices.xml deployment descriptor is only created when you generate your Java interfaces and helper classes. For example, if you are starting with a WSDL, you would right-click on the document, select Web Services -> Generate Java Bean Skeleton, and then follow the couple of dialog boxes afterwards. The webservices.xml document will then be created under the WEB-INF directory.
    I�d be wary of introducing any external web service software into a WebSphere environment. On my last project we ran into a few tricky SOAP API conflicts so we decided to stick with pure IBM implementations wherever possible. That said, this is some sample code that I've recycled from the Monson-Haefel book I've mentioned before:
    package sandbox;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.handler.MessageContext;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import javax.xml.soap.*;
    public class MessageHandlerID extends javax.xml.rpc.handler.GenericHandler{
      QName [] headerNames = null;
      public QName [] getHeaders(){
        if(headerNames == null){
          QName myHeader = new QName("http://speck.net.au/message-id", "message-id");
          headerNames = new QName[] { myHeader };
        return headerNames;
      public boolean handleRequest(MessageContext context){
        String messageID = new java.rmi.dgc.VMID().toString();
        try{
          SOAPMessageContext soapCntxt = (SOAPMessageContext)context;
          SOAPMessage message = soapCntxt.getMessage();
          SOAPHeader header = message.getSOAPPart().getEnvelope().getHeader();
          Name blockName = SOAPFactory.newInstance().createName("message-id","mi","http://speck.net.au/message-id");
          SOAPHeaderElement headerBlock = header.addHeaderElement(blockName);
          headerBlock.setActor("http://speck.net.au/message-id/logger");
          headerBlock.addTextNode( messageID );
          return true;
        } catch(javax.xml.soap.SOAPException se){
              throw new javax.xml.rpc.JAXRPCException(se);
    }It doesn't do much but might give you some ideas.
    You may have already come across this, but I found the following RedBook invaluable:
    Wahli, U., Garcia, G. O., Cocasse, S. and Muetschard, M. (2004). WebSphere Version 5.1 Application Developer 5.1.1 Web Services Handbook. IBM.

  • How can I prevent Messages from opening?

    Hello,
    I was a user of the Messages beta on Lion, and while it had its flaws, I was mostly happy with how it operated.  While it sometimes failed, it never bothered me unnecessarily.
    Since upgrading to Mountain Lion, though, I find that Messages will open every time I receive a new message from my wife.  I am not leaving the program open -- I quit after I send a message, and don't have an IM account set-up.  I only ever use it to send a message, then quit.
    This is annoying because Messages sometimes hangs when I open my laptop up, trying to catch-up and collect a conversation that occured on, say, my phone.
    I'd like to keep the app on my computer, but would like to keep it closed unless I prompt it to open.  I assumed there would be a preferences option for this, but if there is, I cannot find it.
    Any thoughts on what I can do to prevent this behavior in the future?
    Best,
    John

    Yes, I'm surprised too.  Makes me worry that this is either (a) really simple and we're overlooking it or (b) not yet possible to correct in new OS.
    Anyone out there want to put our minds at ease?

  • Java - Axis2: How to get an error code / error message from the Javascript via SOAP

    Hi
    In our Java applicsation we call a Javascript in a Indesign CS Server using the following code:
    --- SNIP BEGIN ---
    // calls the remote service on the indesign server
    try {
    // create service
    ServiceStub oIndsgnSrvStub = new
    ServiceStub(sIndesignServer);
    // create service parameter
    ServiceStub.RunScriptParameters
    oIndsgnSrvRSParams = new ServiceStub.RunScriptParameters();
    // create arguments with source- and target-file for parameter
    ServiceStub.IDSPScriptArg[] oIndsgnSrvSArgs = new ServiceStub.IDSPScriptArg[2];
    oIndsgnSrvSArgs[0] = new
    ServiceStub.IDSPScriptArg();
    oIndsgnSrvSArgs[0].setName("xml-input");
    oIndsgnSrvSArgs[0].setValue(sSourceFile);
    oIndsgnSrvSArgs[1] = new
    ServiceStub.IDSPScriptArg();
    oIndsgnSrvSArgs[1].setName("output-file");
    oIndsgnSrvSArgs[1].setValue(sTargetFile);
    // define service parameter
    oIndsgnSrvRSParams.setScriptArgs(oIndsgnSrvSArgs);
    oIndsgnSrvRSParams.setScriptFile(sScriptFile);
    oIndsgnSrvRSParams.setScriptLanguage("javascript");
    oIndsgnSrvRSParams.setScriptText("");
    // create runscript
    ServiceStub.RunScript oIndsgnSrvRS = new ServiceStub.RunScript();
    // set parameter
    oIndsgnSrvRS.setRunScriptParameters(oIndsgnSrvRSParams);
    //$$$ there should be an answer returned by the InddSrvr
    // execute SOAP call
    ServiceStub.RunScriptResult oIndsgnSrvRes = oIndsgnSrvStub.RunScript(oIndsgnSrvRS);
    if(oIndsgnSrvRes.getErrorNumber() == 0) {
    oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_SUCCESS);
    bOK = true;
    } else {
    oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_FAILURE);
    bOK = false;
    //$$$ should be set, if there is something returned by inddsrvr
    //oServerProdJob.setErrorMsg(sErrorMsg);
    } catch(Exception e) {
    sError += e.getMessage() + "\n";
    bOK = false;
    --- SNIP END -----
    The problem is that we don't get the error code and/or the error message from the Javascript in oIndsgnSrvRes. The error code is always 0 if I set an Integer value as return in the Javascript. If I set a String, there is an Exception in the Java application.
    Here is the Java script we use:
    --- SNIP BEGIN ---
    main();
    main()
    var sError = "";
    var sXMLInput = "";
    var sLayoutPath = "";
    // get the SDKCodeSnippetRunner object
    var cbpAdapter = app.cbpCbpadapterObject
    if (cbpAdapter) {
    sXMLInput=app.scriptArgs.get("xml-input");
    sLayoutOutputFile=app.scriptArgs.get("output-file");
    sError = cbpAdapter.doProcess(sXMLInput, sLayoutOutputFile);
    return sError; // This give an Exception; if I return an Integer the ScriptResult is always 0
    --- SNIP END -----
    If I try this with the test application from Adobe I get the error code correctly. But in the Java application, using SOAP, I can't get the error code.
    What could be wrong?
    Any ideas?
    Thanks a lot for the support.
    Kind regards
    Hans

    user11340104 wrote:
    Hello -
    i am calling sqlplus from a bash shell script. If the sql statement generates an error, how can I return that error code (unsuccessful) back to the bash shell?
    Well, let google be your friend,
    http://www.google.co.in/search?rlz=1C1GGLS_enIN327IN327&sourceid=chrome&ie=UTF-8&q=sqlplus+error+codes
    There are many threads I guess talking about the same issue.
    HTH
    Aman....

  • How to retreive all unconsumed messages from a topic with a MDB?

    Hello!
    I have a webapp that stores TextMessages in a Topic in WebLogic.
    I have an ejbapp (Message driven bean) that reads messages from the topic.
    If both are up and running the ejbapp reads all messages sent from the webapp to the topic.
    But if I stop the ejbapp for a while and sends a couple of messages to the topic and then deploy the ejbapp again, then the ejbapp does not read the unconsumed messages. If I send a new message to the topic the ejbapp reads that new messages but it does not get the previous messages that are on the topic.
    Is this the way it should work? Or could I get the message driven bean to consume all the messages that it has not consumed from the topic when it starts?
    My weblogic-ejb-jar.xml looks like:
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN' 'http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>OrderManagerMDB</ejb-name>
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>200</max-beans-in-free-pool>
    <initial-beans-in-free-pool>20</initial-beans-in-free-pool>
    </pool>
    <destination-jndi-name>jms/OrdersTopic</destination-jndi-name>
    <connection-factory-jndi-name>jms/OrdersConnectionFactory</connection-factory-jndi-name>
    </message-driven-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>And my ejb-jar.xml looks like:
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <message-driven>
    <ejb-name>OrderManagerMDB</ejb-name>
    <ejb-class>brownbagwarehouse.OrderManagerMDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
    <message-driven-destination>
    <destination-type>javax.jms.Topic</destination-type>
    </message-driven-destination>
    </message-driven>
    </enterprise-beans>
    </ejb-jar>My MDB onMessage looks like:
    public void onMessage(Message message)
    try
    TextMessage textMessage = (TextMessage)message;
    System.out.println(textMessage.getText());
    catch(Exception e)
    e.printStackTrace();
    }Best regards
    Fredrik

    I am not much familiar with Weblogic, but i would suggest, you do a search for how to setup "Durable Subscriptions" in Weblogic. This will ensure the the messages that were sent when the consumer was not available, will be delivered once the consumer is available

  • How to proxy messages from client?

    Hello, i have a problem on how am i gonna proxy the messages from a sender client, to be sent to it's requested client recipient...
    clientA(want talk to clientB) --> server(sent to clientB) --> clientB(receive)
    and of course vice versa.. what should i do...
    server..
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class Strider extends JFrame implements ActionListener {
      JButton sendbutton;
      JTextField txtfield;
      JTextArea txtarea;
      ObjectOutputStream output;
      ObjectInputStream input;
      private int counter = 1;
      ServerSocket server;
      Socket connection;
      ThreadHandler client;
      public Strider() {
        super("Server Strider Running: No# of Client Connected: ");
        Container c = getContentPane();
        c.setLayout(new FlowLayout());
        JButton sendbutton = new JButton("&SEND");
        JTextField txtfield = new JTextField(10);
        JTextArea txtarea = new JTextArea(10, 20);
        sendbutton.addActionListener(this);
        txtfield.addActionListener(this);
        txtfield.setEnabled(true);
        txtarea.setEnabled(false);
        c.add(sendbutton);
        c.add(txtfield);
        c.add(new JScrollPane(txtarea));
        setSize(230, 250);
        show();
      public void runStrider() {
        try {
         server = new ServerSocket(5000, 100);
        catch(IOException e) {
          e.printStackTrace();
          System.exit(1);
        try{
         do {
           ThreadHandler clientThread = new ThreadHandler(server.accept(), this);     
            //txtarea.append("Connection " + counter + "received from: " + clientThread.connection.getInetAddress().getHostName());
           //txtarea.append("\nGot I/O Stream!");
           clientThread.start();       
            ++counter;
         }while(true);
        catch(IOException e) {
         e.printStackTrace();
         System.exit(1);
      public void actionPerformed(ActionEvent e) {
       if (e.getSource() == sendbutton)
          sendData(txtfield.getText());
       else
          sendData(e.getActionCommand());
      public void sendData(String msg) {
       try {
         clientThread.output.writeObject("Strider>> " + msg);
         clientThread.output.flush();
         txtarea.append("\nStrider>> " + msg);
       catch(IOException io) {
         txtarea.append("\nError Writing Object");
      public void update(String message) {
           String msg = null;
           msg = message;
           //txtarea.setText(msg);
          //txtarea.setCaretPosition(txtarea.getText().length());
      public static void main(String[] args) {
        Strider app = new Strider();
        app.addWindowListener(
          new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
              System.exit(0);
        app.runStrider();
      class ThreadHandler extends Thread{
        private Socket connection;
        protected ObjectOutputStream output;
        protected ObjectInputStream input;
         Strider str;
        String message = " ";
        int count = 0;
        public ThreadHandler(Socket s, Strider x) {
         connection = s;
         str = x;
        public void run() {
         String msg = null;
         try {
          output = new ObjectOutputStream(connection.getOutputStream());
          output.flush();
          input = new ObjectInputStream(connection.getInputStream());
          //message  = "Connection received";
             //str.update(message); //+ connection.getInetAddress().getHostName());
          //message = "\nGot I/O Stream!";
          //str.update(message);
          //txtfield.setEnabled(false);
          message = "Strider>> Connection Succesful! \nWelcome to Cybersoft's Underground Community :)";
          output.writeObject(message);
          output.flush();
          //txtfield.setText(" ");
            do {
              msg += (String) input.readObject();
                ++count;
                if(count == counter)
                     output.writeObject(msg);
                //str.update(msg);
            }while(!message.equals("Client>>Terminate"));
          input.close();
           output.close();
          connection.close();
           ++counter;
         catch(IOException e) {
          e.printStackTrace();
          catch(ClassNotFoundException cnfx) {
           cnfx.printStackTrace();
    }client...
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class Hiryu extends JFrame implements ActionListener
      ObjectOutputStream output;
      ObjectInputStream input;
      String msg;
      JTextField txtfld1, txtfld2;
      JPanel txtpanel;
      JTextArea txtarea;
      public Hiryu()
         Container c = getContentPane();
         c.setLayout(new BorderLayout());
         txtfld1 = new JTextField(10);
         txtfld2 = new JTextField(10);
         txtarea = new JTextArea(10,20);
         txtpanel = new JPanel();
         txtpanel.setLayout(new GridLayout(2, 1));
         txtfld1.addActionListener(this);
         txtfld2.addActionListener(this);    
         txtpanel.add(txtfld1);
         txtpanel.add(txtfld2);
         c.add(txtpanel, BorderLayout.NORTH);
         c.add(new JScrollPane(txtarea), BorderLayout.CENTER);
         setSize(230,250);
         show();
      public void actionPerformed(ActionEvent e)
         if (e.getSource() == txtfld1)
           sendData(e.getActionCommand());
         //else
           //runClient();
      public void runClient()
         Socket client;
         String s = txtfld2.getText();
         try {
          txtarea.setText("Attempting Connection\n");
          client = new Socket(InetAddress.getByName("192.168.2.109"), 5000);
          txtarea.append("Connected to:" + client.getInetAddress().getHostName());
           output = new ObjectOutputStream(client.getOutputStream());
           output.flush();
           input = new ObjectInputStream(client.getInputStream());
           txtarea.append("\n Got I/O Streams \n");
           msg = "Client>> Connection Successful";
           output.writeObject(msg);
           output.flush();
           do{
            try{
              msg = (String) input.readObject();
              txtarea.append("\n" + msg);
              txtarea.setCaretPosition(txtarea.getText().length());
            catch(ClassNotFoundException cnfex){
             txtarea.append("\nUnknown Object type received");
           }while(!msg.equals("Server>> Terminate"));
           txtarea.append("\nUser Terminated connection");
           output.close();
           input.close();
           client.close();
           //++counter;
         catch(EOFException eof){
          System.out.println("Client terminated connection");
         catch(IOException io){
          io.printStackTrace();
      public void sendData(String s)
         try{
          output.writeObject("Client>>" + s);
          output.flush();
          txtarea.append("\nClient>>" + s);
         catch(IOException cnfex){
          txtarea.append("\nError writing Object");
      public static void main(String[] args)
         Hiryu app = new Hiryu();
         app.addWindowListener(
          new WindowAdapter()
             public void windowClosing(WindowEvent e)
                System.exit(0);
         app.runClient();
    }

    Though you can initiate the binary from your client side but for the file creation, there is no other way but to store it on the server side. So your best bet would be to get some space free on the server side of yours.
    Aman....

  • How to send a message from server to a particular client

    Hi all,
    I need to send a message from one host to another host which are connected in local domain. Now I'm able to send a message from client to server and vice versa but what I need is the server should route that message which I send through one client to another host(client) .
    How can I do that ?
    Please give me some ideas how to do that .
    Thanks in advance
    Edited by: m.parthiban on Mar 5, 2008 1:20 PM

    ejp, thanks for your reply . can you please explain me bit more by providing code snippet ?
    This is what I have done till now :
    MyServer:
    package connection;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.io.PrintWriter;
    import java.net.ServerSocket;
    import java.net.Socket;
    public class MyServer {
          * @param args
         public static void main(String[] args) {
              String ss ="",temp ="";
              Socket clientLink=null;
              try {
                        ServerSocket sockServer = new ServerSocket(6000);
                        while(true) {
                             clientLink = sockServer.accept();
                             System.out.println("Connection Established");
                             InputStreamReader isr = new InputStreamReader(clientLink.getInputStream());
                             BufferedReader bufReader = new BufferedReader(isr);
    //                         System.out.println("buf "+bufReader.readLine());
                             try {
                                  while ((temp=bufReader.readLine())!=null) {
                                       ss+=temp;
                                       System.out.println("ss   "+ss+"Temp "+temp );
                                  System.out.println("Client > "+ss);
                             } catch (IOException e) {
                                  System.out.println("while reading");
                                  e.printStackTrace();
                             OutputStreamWriter osw = new OutputStreamWriter(clientLink.getOutputStream());
                             PrintWriter pw = new PrintWriter(osw,true);
                             pw.write("Welcome -by Server !!!");
                             pw.flush();
                             clientLink.shutdownOutput();
                             clientLink.close();
              } catch (IOException e) {
                   System.out.println("Can't able to connect");
                   e.printStackTrace();
    }MyClient:
    package connection;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.io.PrintWriter;
    import java.net.Socket;
    import javax.swing.JOptionPane;
    public class MyClient {
          * @param args
         public static void main(String[] args) {
              try {
                   String serverMsg="",temp="";
                   Socket client = new Socket("127.0.0.1",6000);
                   PrintWriter pw = new PrintWriter(client.getOutputStream(),true);
                   pw.write("Hi ,Accecpt me");
                   pw.flush();
    //               pw.close();
                   client.shutdownOutput();
                   InputStreamReader isr  = new InputStreamReader(client.getInputStream());
                   BufferedReader bufRead = new BufferedReader(isr);
                   while ((temp=bufRead.readLine())!=null) {
                        serverMsg +=temp;
                   System.out.println("Server > "+serverMsg);
                   JOptionPane.showMessageDialog(null, serverMsg);
                   client.shutdownInput();
                   client.close();
              } catch (IOException e) {
                   System.out.println("Failed to connect");
                   e.printStackTrace();
    }Once again thanks for the time you spend to reply me.

  • How to take back up of messages from iphone

    Hello,
    I tried taking a back up from my iphone 3g to iphone 5s, but however on doing that only my contacts and my photographs got transferred but not my messages. Can anyone please let me know how I can take backup of my messages from my previous old iphone to my new iphone.
    Thanks

    hi 3360, i found the following example;
    for back up:
    rman target sys/*** nocatalog
    run {
    allocate channel t1 type disk;
    backup
    format '/app/oracle/backup/%d_t%t_s%s_p%p'
    (database);
    release channel t1;
    i couldn't undertsand this,actually i want the databse which has the
    username:scott
    password:jetora
    host string:jetora
    i want to take the database backup in c:/databasebackup.
    here databasebackup is one folder which is in c:(c directory)
    wil the above mentioned exapmle work? what are the things i have to modify in that examploe to accomplich my need.please help me and please modify that example and show me please

  • How i get user info from ldap using java after authenticating user with SSO

    Hi
    I have one jsp/bean application as a partner application with SSO.
    It works fine.
    Now i need to get other attributes of user from LDAP who has logged into the application through SSO.
    using SSO java APIs i only get username, userDN, subscriber info.
    To get user's other attribute i have to user LDAP APIs for that i have to create on Directory Context, for the same i need userpassword.
    so here i my question, how do i get user password after he has logged in thro SSO.
    regards..
    and thanking u in advance
    samir

    Valentina,
    there's no way to get the password value from the directory (it's one way). Of course you can get the hashed (MD4,MD5,SHA-1) base64 encoded value (i.e. the value you see in OiD) but not the 'password'.
    --Olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to get user information from ldap - bpm11g

    hi all,
    i need know how to do get information from ldap, but using adf bean for show user data in adf form.
    anyone knows about this ?
    tks.

    Neal wrote:
    >
    Hi,
    I am using WLS default authentication to protect my JSP pages. Can someone tell
    me if it is possible to add more fields to the default login box (in addition
    to login and password boxes, I want to ask user the department name). In additional,
    can WLS propogate this information (department name) along with other security
    credentails to other J2EE components such as EJBs? In my EJBs I want to be able
    to get the department name that user provided during login and then use that for
    conditional business logic.
    Any insights on this subject will be greatly appreciated.
    TIA,
    -NealYou can't do this with the default simple authentication. That can only handle a
    username / password combination.
    You should be able to do this with JAAS. You could write a LoginModule that
    populates the department as a Principal or public Credential on the Subject in
    addition to the normal authentication. You would have to do a callback handler
    that passed through the department info to it.
    This link has more on WLS's stab at JAAS:
    http://e-docs.bea.com/wls/docs61/security/prog.html#1039659
    Once you have associated the Subject with the access control context by invoking
    a doAs() you should be able to get it back at any point with
    Subject.getSubject(AccessController.getContext()) to get access to the
    department info.
    It will all be a bit of a chore, mind.

Maybe you are looking for