Sending Custom objects over RMI

I am new to RMI and am having trouble sending customised objects over an RMI connection - I am trying to send an object of class DataFile which implements serializable, to a method on the server called loadPerformanceData(DataFile data). Here is the class DataFile:
package org.twomey.fyp.loader;
import java.io.*;
import java.util.*;
import java.text.*;
import org.twomey.fyp.mail.*;
* Class to accept a File Object to prepare a File for Data Loading.
* It reads a Data File line-by-line and provides the functionality
* to insert line records into the database.
* @version 0.1
* @author Sean Twomey
public class DataFile implements Serializable{
/** Data Loading Date */
private String date;
/** Log from Loading Process */
private StringBuffer log;
/** Array of lines from file */
private String file[];
* Constructs a Data File from a specified File Object.
* Accepts the File object and Data Loading Date
* @param inputFile Inputted File Object
* @param date Data Loading Date
public DataFile(File inputFile, Calendar date){
     // Formats the date into a form acceptable to Oracle DBMS
     SimpleDateFormat form = new SimpleDateFormat("dd-MMM-yy");
     this.date = form.format(date.getTime());
     String line;
     int count = 0;
     try{
          RandomAccessFile inFile = new RandomAccessFile(inputFile, "r");
          // Read until end-of-file counting lines
          while((line = inFile.readLine()) != null){
               count++;
          // Initialise array size to number of lines.
          file = new String[count];
          // Return to start-of-file
          inFile.seek(0);
          for(int i=0;i < file.length;i++){
               // Read line into array
               file[i] = inFile.readLine();
          inFile.close();
     catch(IOException ie){
          System.err.println("IO Exception: " + ie);
* Load the entire set of records into the Database.
* Data is loaded line-by-line. A Data Record object
* is initilised to perform record loading and the
* insertRecord method is called for each record.
* A log is compiled from the insertion process
* @return The Process Log
public StringBuffer loadData(){
     String record[];
     log = new StringBuffer("");
     System.out.println("HERE");
     System.out.println(file.length);
     // From the org.twomey.fyp.loader package
     DataRecord objRecord;
     objRecord = new DataRecord(date);
     // Line-by-Line
     for(int i = 0; i < file.length; i++){
          // Split the record into fields which have been tab-delimited
          record = file.split("\t");
          // Each record feed must be 12 fields for valid loading
          if(record.length != 12){
               System.err.println("Invalid Feed for line " + (i+1));
               log.append("Invalid Feed for Line " + (i+1) + "\n");
          else{
               log.append("Line "+(i+1) + " " objRecord.insertRecord(record) "\n");
     return log;
* Send an EMail upon Completion the Performance Data Loading Process.
* The mail sents the log compiled during Data Loading.
public void sendMailReport(){
     // Use the Mail class from the org.twomey.mail package
     Mail email;
     String from;
     String alias;
     String to[];
     String subject;
     email = new Mail("chara.ucc.ie");
     to = getAddresses();
     from = System.getProperty("user.name") + "@chara.ucc.ie";
     alias = "Sheet Generator System";
     subject = "Performance Data Loader Report";
     email.sendEMail(from,alias,to,null,null,subject,log.toString());
* Returns Email addresses from file.
* The <b>mail.config</b> file is read line-by-line.
* Each line entry should correspond to an email address.
* @return Email addresses in a <CODE>String</CODE> array
private String[] getAddresses(){
     RandomAccessFile inFile;
String strLine;
String addresses[] = null;
     int count = 0;
try{
     inFile = new RandomAccessFile(new File("mail.config"),"r");
          while((strLine = inFile.readLine())!= null){
               count++;
          addresses = new String[count];
     inFile.seek(0);
          for(int i = 0; i < addresses.length; i++){
     addresses[i] = inFile.readLine();
catch(IOException ie){
     System.err.println("IOException: " + ie.getMessage());
return addresses;
} // end getAddresses
} // end Class

You seem to be reading the file into a string array, then trying to pass the object that did the reading.
Two alternatives:
o Just pass the string array object.
o Create a data only object, passing the string array as an argument to the constructor

Similar Messages

  • Sending Connection Object over the Network using RMI

    Hi,
    How can a Connection object be sent over the network and run on another JVM. I need to hold connection object to execute processes one after other, that require Oracle connection without ever connecting again. I do not have J2EE container or webserver setup to hold connection/connectionpool,but need to run the process on command line. I am using RMI infrastructure to pass parameters/return values but connection object is not serializable and connot be marshalled and failing. Please explain, if there is another way using JDK 1.4
    Sudheer

    I think that what you want to do is connect to the database on the RMI server object, then use the server object from your remote clients to execute the processes you require to rrun.

  • Sending Connection object over the network

    Hi,
    How can a Connection object be sent over the network and run on another JVM. I need to hold connection object to execute processes one after other, that require Oracle connection without ever connecting again. I do not have J2EE container or webserver setup to hold connection/connectionpool,but need to run the process on command line. I am using RMI infrastructure to pass parameters/return values but connection object is not serializable and cannot be marshalled and failing. Please explain, if there is another way using JDK 1.4
    Sudheer

    I don't believe this is possible. A connection object has a number of associated structures on the operating system, which generally makes it impossible to move. From a fundamental networking level, you also cannot, in general, cause a connection to machine1 to start communicating with machine2-- that would introduce all manner of security problems.
    Why don't you want to just create another connection on the other machine?
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Objects passed over RMI?

    When passing a serializable object over RMI (such as an ArrayList) which contains other objects, do the objects contained within this object (e.g. within the ArrayList) need to be serializable also?

    RMI server is very easy, if you want to make clear
    about this problem .
    you must read two interface . RemoteCall , RemoteRef
    Socket clientSecket = new Socket(RemoteHost ,port);
    OutputStream outputStream = clientSecket
    .getoutputStream();
    ObjectOutputStream out = new
    ObjectOutputStream(outputStream)
    out.write(Object);//
    then send a Object to server. if the object not be
    implements java.io.Serialisize , Exception will
    throw.
    are you clear ????? Sha BI ! !!!!!!Are you clear? RMI servers are much simpler than this, and you certainly don't need to know anything about either the RemoteCall or the RemoteRef interface. All this is done behind the scenes for you in RMI, just do call and return. Everyything passed or returned must be serializable, otherwise you get a NotSerializableException.

  • Transferring object graph over RMI

    Hi all,
    I'm designing a client-server thingy, and am intending it to communicate over RMI. I'm currently designing a filter mechanism to let the client see a certain subset of the state (essentially an object graph), manipulate this, and transfer updates of it back to the server, which then are propagated to the other clients and so on.
    Any tips and tricks to take into account when transfering interconnected objects over RMI? (They don't need remove references, apart from the state transfer process, all local references are sufficient.) Also, I'd like to not transfer the entire "graph", only updates to it as they happen.
    I have a couple of ideas, I'd just like to hear your input before I dwelve more into the mechanics of them..
    Thanks!
    /C

    Go for it.
    Just think clearly about where the objects exist, and what get's transferred:
    o What objects are on the clients?.
    o What is a shared remote object?
    o What objects get passed from client to server? What objects are returned to clients?

  • Connection Aborted over RMI

    Hi All,
    I am sending some data over an RMI call to store it in to a File.
    i.e client sends an objcet over RMI and server saves this object in to a File.
    but some time the this call is terminated before it reaches the server and socket conncetion is closed.
    The stack Trace of this exception is :
    at $Proxy5.storeInitialCondition(Unknown Source)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                    at java.lang.reflect.Method.invoke(Unknown Source)
                    at com.pg.orion.basic.rmiservlet.DynamicProxy.invoke(DynamicProxy.java:346)
                    at $Proxy6.storeInitialCondition(Unknown Source)
                    at com.pg.orion.basic.simulation.adapter.SimulationAdapter.saveSnapshot(SimulationAdapter.java:1054)
                    at com.pg.orion.basic.simulation.adapter.SimulationAdapter.processSimulationEvent(SimulationAdapter.java:573)
                    at com.pg.orion.basic.simulation.adapter.SimulationAdapter.access$100(SimulationAdapter.java:44)
                    at com.pg.orion.basic.simulation.adapter.SimulationAdapter$1.run(SimulationAdapter.java:192)
                    at com.pg.orion.basic.threads.DefaultLoopThread.run(DefaultLoopThread.java:206)
                    at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.SocketException: Software caused connection abort: socket write error
                    at java.net.SocketOutputStream.socketWrite0(Native Method)
                    at java.net.SocketOutputStream.socketWrite(Unknown Source)
                    at java.net.SocketOutputStream.write(Unknown Source)
                    at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
                    at java.io.BufferedOutputStream.write(Unknown Source)
                    at java.io.ObjectOutputStream$BlockDataOutputStream.drain(Unknown Source)
                    at java.io.ObjectOutputStream$BlockDataOutputStream.writeByte(Unknown Source)
                    at java.io.ObjectOutputStream.writeFatalException(Unknown Source)
                    at java.io.ObjectOutputStream.writeObject(Unknown Source)
                    at sun.rmi.server.UnicastRef.marshalValue(Unknown Source)
                    ... 16 moreI thought that this is because of the size of the data,but in my testing some times i am able to store big size data.
    Is there any Threshold of RMI or socket to write data?
    If any of You have any idea pls Lat me know.
    Thanks

    It is likely that the other end has closed the connection for some reason.
    I would check if the server side has thrown an exception or closed the connection.
    The main limit for RMI is the max memory the server process. Anything you send needs to fit comfortably into memory. (from all the client requests combined)

  • Writing an array of custom objects to CSV

    I am brand new to PS. I have been reading many, many forums and am stuck on something I think you all will find very easy.
    Essentially all I want to do is use the test-path method to determine if a file and track yes or no. Repeat for several products. And finally export to a CSV.  So far I have cobbled together the If statement that will return a Yes Or No with the product name. 
    Able to put it into an array of custom objects so I can export-csv without just getting the just the name lengths.  The problem is that I only get the last value of the custom objects over and over again.  Here's my simple code:
    $hostname = hostname
    $Products = @()
    $myobj = "" | select COTS_Product, PassFail
    If(test-Path -Path C:\"Program Files"\Java\jre7\THIRDPARTYLICENSEREADME.txt)
    $myobj.COTS_Product = "JRE 7 on Host?"
    $myobj.PassFail = "YES"
    $Products += $myobj
    else
    $myobj.COTS_Product = "JRE 7 on Host?"
    $myobj.PassFail = "NO"
    $Products += $myobj
    ##Product 2
    If(test-Path -Path H:\Smileys\6.gif)
    $myobj.COTS_Product = "Smileys 6 on Host?"
    $myobj.PassFail = "YES"
    $Products += $myobj
    else
    $myobj.COTS_Product = "Smileys 6 on Host?"
    $myobj.PassFail = "NO"
    $Products += $myobj
    $Products | Export-Csv H:\$hostname.csv -NoTypeInformation
    Here's my output:
    COTS_Product
    PassFail
    Smileys 6 on Host?
    YES
    Smileys 6 on Host?
    YES
    SHould Be:
    COTS_Product
    PassFail
    JRE 7 on Host?
    YES
    Smileys 6 on Host?
    YES
    Please Help.

    You have been  reading a lot of very old and very faulty misleading forums.  Start by actually sitting downa nd trying to learnPowerSHell.  You cannot guess your way through any relatively sophisticated technology.
    Here is a little example of a way to do this in PowerShell.
    function Test-Product{
    Param(
    $product,
    $path
    New-Object PsObject -Property @{
    COTS_Product=$product
    PassFail=Test-Path $path
    $test_products=@{
    'JRE 7'='C:\Program Files\Java\jre7\THIRDPARTYLICENSEREADME.txt'
    'JSmileys 6'='h:\Smileys\6.gif'
    $products=foreach($key in $test_products.keys){
    Test-Product $key $test_products[$key]
    $Products | Export-Csv H:\$hostname.csv -NoTypeInformation
    This can be expanded in any way needed without issues.  It uses the design of PowerShell to set up the objects so they are manageable.  Until you learn about objects and formal programming logic and some elements of design you will have some difficulty
    in figuring out how to do these things.  Once you learn the basics they will seem very simple.  You cannot learn the basics from reading forum posts.
    ¯\_(ツ)_/¯

  • Sending 2 objects through sockets?

    Hi there,
    I have 2 questoins here...
    The first is....
    Ive made a simple game that moves a image around a screen using the arrow keys. When i start the server it listens for connections and then I run the client. I'm able to get 2 instances of the objects running in 2 different swing frames but at the moment when I move the image around the screen it only moves in one window and not in the other. I would like the coordinates of the image in one window to be the same as the other when I move it.
    this is my server class...
      public void run() {
               try {
                  oos.writeObject(pgf.getPacmanGamePanel().getPacmanGame());
                  oos.writeObject(pgf.getPacmanGamePanel().getGhost());i move the pacmanGame on my PacmanGamePanel(pgp) which is on a pacmanGameFrame(pgf)
    This is my Client class....
    public static void main(String argv[]) {
                PacmanGameFrame pgf = new PacmanGameFrame();
               ObjectOutputStream oos = null;
               ObjectInputStream ois = null;
               //ObjectInputStream ois2 = null;
               Socket socket = null;
               PacmanGame pacgame = null;
               Ghost ghost = null;
               int port = 4444;
               try {
                 // open a socket connection
                 socket = new Socket("localhost", port);
                 // open I/O streams for objects
                 oos = new ObjectOutputStream(socket.getOutputStream());
                 ois = new ObjectInputStream(socket.getInputStream());
                 //ois2 = new ObjectInputStream(socket.getInputStream());
                 while (true) {
                        // read an object from the server
                        pacgame = (PacmanGame) ois.readObject();
                        ghost = (Ghost) ois.readObject();
                        oos.reset();
                        I was hoping you could tell me why its not sending the object over from my client.
    The second thing is i've coded a Ghost class the exact same way as my PacmanGame class which contains how the image moves around the screen and its methods etc. For some reason its not displaying at all on either the client or the server when i try to send the object across.
    I am trying the same way as sending the pacmanGame() but it doesn't work....
    public void run() {
               try {
                  oos.writeObject(pgf.getPacmanGamePanel().getPacmanGame());
                  oos.writeObject(pgf.getPacmanGamePanel().getGhost());I have a panel class which prints out the coordinates of the ghost
    public void paint(Graphics g) {
            super.paint(g);
            if(ingame) {
                 Graphics2D g2d = (Graphics2D)g;
                g2d.drawImage(pacmanGame.getImage(), pacmanGame.getX(), pacmanGame.getY(), this);
            for (int i = 0; i < ghosts.size(); i++) {
                 Ghost ghost = (Ghost)ghosts.get(i);
                 if(ghost.isVisible())
                      g2d.drawImage(ghost.getImage(), ghost.getX(), ghost.getY(), this);
            g2d.setColor(Color.WHITE);
            else {
                 System.out.println("GAME OVER");
            Toolkit.getDefaultToolkit().sync();
            g.dispose();
        }Help on either question would be great.
    1. why wont the image move on both server and client sides.
    2. How can i get my ghost class to display?
    If you need more info/code let me know..
    Thanks alot.

    Ok i called flush() on the output and commented out reset() on the input but still the same problem.
    oos.writeObject(pgf.getPacmanGamePanel().getPacmanGame());
                  oos.writeObject(pgf.getPacmanGamePanel().getGhost());
                  oos.flush();
    pacgame = (PacmanGame) ois.readObject();
                        ghost = (Ghost) ois.readObject();I think i've figured it out now and its to do with my paint() within gamePanel..
    public class PacmanGamePanel extends JPanel implements ActionListener {
        private Timer timer;
        private PacmanGame pacmanGame;
        private Ghost ghost;
        private ArrayList ghosts;
        private boolean ingame;
        private int B_WIDTH;
        private int B_HEIGHT;
        private int[][] pos = {
                  {50, 50}
    public void paint(Graphics g) {
            super.paint(g);
            if(ingame) {
                 Graphics2D g2d = (Graphics2D)g;
                g2d.drawImage(pacmanGame.getImage(), pacmanGame.getX(), pacmanGame.getY(), this);
            for (int i = 0; i < ghosts.size(); i++) {
                 Ghost ghost = (Ghost)ghosts.get(i);
                 if(ghost.isVisible())
                      g2d.drawImage(ghost.getImage(), ghost.getX(), ghost.getY(), this);
            g2d.setColor(Color.WHITE);
            else {
                 System.out.println("GAME OVER");
            Toolkit.getDefaultToolkit().sync();
            g.dispose();
        }Can you help?

  • Sharing Custom Objects

    Hello Guys,
    I'm sending custom objects using the "value" property of the ShareProperty class. However when i try to get this object after it has being sent through the network, it seems it was converted in a Array(HashMap). So, how can i send and receive custom objects using the ShareProperty class?
    Thanks
    Eduardo Dias

    Hi,
    When you send a complex object, it is converted into a ByteArray and when you get it back, it is reconverted back. What is the complex object that you are sending ? If its a class , have you called MessageItem.registerBodyClass(ClassName); for the class?.
    If you are sending a complexObject, you need to register that Class and all the Classes contained inside that.  If you could let us know, what is the composition of your class you are sending and what are you registering , then we can help you.
    For reference, you are look at ComplexObjectTransfer example.
    SharedProperty just contains a collectionNode like any model and calling a .value API publishes that object. If its not a simple Object, you may need to do all these registering before you use SharedProperty to publish you object.
    Thanks
    Hironmay Basu

  • Sending Custom Java Objects over XML!!

    Hello all !
    Can anybody please tell me how can I send custom Java Objects through XML? For example we can set attributes for a node using the setAttribute method, it accepts only strings, also the setTextContent method requires text and sets the node's value.Can I some way set my own Java object as the value of a particular node or attach it to the node?
    Thanks in advance.

    Kami_Pakistan wrote:
    So I should rather go for Marshalling or Serialization or is there any other work-around possible?I don't know. You didn't say what you had against text formats. Since all Java objects are composed of primitives when you get right down to the bottom, everything in Java can be serialized as text versions of those primitives. So you're going to have to explain why you think a work-around is necessary at all.

  • How can i send a XML document object over the JMS wire

              HI,
              does anybody has anyidea about sending the XML Document over the JMS and receiving
              it n the other side..
              regards,
              Akhil
              

    Is this the full stack trace?
              Akhil Nagpal wrote:
              > HI ,
              > Sorry the excepiotn is of deserialization...this is the stack trace...mistake...
              >
              > weblogic.jms.common.JMSException: Error deserializing object
              > at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:140)
              > at com.sds.kb.cm.CMMDBReceiver.onMessage(CMMDBReceiver.java:143)
              > at weblogic.ejb20.internal.MDListener.execute(MDListener.java:356)
              > at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:290)
              > at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:271)
              > at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2303)
              > at weblogic.jms.client.JMSSession.execute(JMSSession.java:2226)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              > ----------- Linked Exception -----------
              > weblogic.jms.common.JMSException: Error deserializing object
              > at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:140)
              > at com.sds.kb.cm.CMMDBReceiver.onMessage(CMMDBReceiver.java:143)
              > at weblogic.ejb20.internal.MDListener.execute(MDListener.java:356)
              > at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:290)
              > at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:271)
              > at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2303)
              > at weblogic.jms.client.JMSSession.execute(JMSSession.java:2226)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              >
              >
              > Akhil
              >
              >
              > "Akhil Nagpal" <[email protected]> wrote:
              >
              >>HI,
              >> Actually i have created my own class which implements serializable.
              >>I set the
              >>object of this class in the ObjectMessage and send it across. Sometime
              >>i have
              >>to send some vector,sometimes string and sometime a XML document. So
              >>i can set
              >>these type of objects in my custom serializable object and send it. For
              >>sending
              >>XML , either i can send it as a string or as u said as Document object.
              >>But i
              >>want to do send it as a Document object. So i have created a an object
              >>of "org.jdom.Document"
              >>which implement serializable and setting this object into my custom object
              >>and
              >>sending this custom object in the objectmessage. But then weblogic throws
              >>some
              >>exceptions which has nothing to do with serialization.I am printing the
              >>exception
              >>below. (without the object of org.jdom.Document this custom object reaches
              >>safely
              >>and happily:))...this exception is something related to transactions.....can
              >>you
              >>or anybody tell me what could be the reason..
              >>I am not able to think why this kind of exception comes only when i try
              >>to send
              >>the jdom's Document object and never in other cases..
              >>
              >>java.sql.SQLException: XA error: XAER_RMERR : A resource manager error
              >>has occured
              >>in the transaction branch start() failed o
              >>n resource 'oraclePool': XAER_RMERR : A resource manager error has occured
              >>in
              >>the transaction branch
              >>oracle.jdbc.xa.OracleXAException
              >> at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:483)
              >> at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:190)
              >> at weblogic.jdbc.jta.VendorXAResource.start(VendorXAResource.java:41)
              >> at weblogic.jdbc.jta.DataSource.start(DataSource.java:569)
              >> at weblogic.transaction.internal.ServerResourceInfo.start(ServerResourceInfo.java:1165)
              >> at weblogic.transaction.internal.ServerResourceInfo.xaStart(ServerResourceInfo.java:1108)
              >> at weblogic.transaction.internal.ServerResourceInfo.enlist(ServerResourceInfo.java:287)
              >> at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:391)
              >> at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1146)
              >> at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1101)
              >> at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:145)
              >> at weblogic.jdbc.jta.Connection.createStatement(Connection.java:204)
              >> at weblogic.jdbc.rmi.internal.ConnectionImpl.createStatement(ConnectionImpl.java:130)
              >> at weblogic.jdbc.rmi.SerialConnection.createStatement(SerialConnection.java:71)
              >> at com.sds.kb.cm.CMMDBReceiver.onMessage(CMMDBReceiver.java:134)
              >> at weblogic.ejb20.internal.MDListener.execute(MDListener.java:356)
              >> at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:290)
              >> at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:271)
              >> at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2303)
              >> at weblogic.jms.client.JMSSession.execute(JMSSession.java:2226)
              >> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              >>
              >> at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1151)
              >>
              >>
              >>any help will be appriciated..
              >>Akhil
              >>
              >>
              >>
              >>Raj <[email protected]> wrote:
              >>
              >>>wrap it up as an object message(I think DocumentImpl is Serializable).
              >>>This way you
              >>>wont be vendor specific and can retrieve it at the other end.
              >>>
              >>>Akhil Nagpal wrote:
              >>>
              >>>
              >>>>HI Raj,
              >>>> thanks for the response..actually we dont want our application
              >>>
              >>to
              >>
              >>>be weblogic
              >>>
              >>>>specific...
              >>>> there should be some other way arround....
              >>>>
              >>>>REgards
              >>>>Akhil
              >>>>
              >>>>"Raj" <[email protected]> wrote:
              >>>>
              >>>>>There is a weblogic specific XMLMessage similar to ObjectMessage,
              >>>>
              >>>BytesMEssage
              >>>
              >>>>>etc.. Try using that to wrap ur XML document and send it across.
              >>>>>
              >>>>>-Raj
              >>>>>
              >>>>>"Akhil Nagpal" <[email protected]> wrote:
              >>>>>
              >>>>>>HI,
              >>>>>>does anybody has anyidea about sending the XML Document over the
              >>>>>
              >>>JMS
              >>>
              >>>>>>and receiving
              >>>>>>it n the other side..
              >>>>>>regards,
              >>>>>>Akhil
              >>>>>
              >
              

  • Sending EchoSign agreements from Custom Objects in Salesforce

    In this tutorial, l I’ll go through how to:
    set up a document template with text tags and add it to the SFDC library
    create an Agreement template
    add the EchoSign button to a Custom Object page layout
    create a merge mapping  to merge fields data from the Custom object into an EchoSign agreement
    create a data mapping to map field data from the EchoSign agreement back into the custom object in SFDC
    The tutorial is the attached PDF, the Word document is a sample template document used in this tutorial.

    Hi Kai,
    The custom object is referring to a custom object in Salesforce. You only need it if you decide you need a custom object to hold your data in SFDC. if you are using standard Salesforce object like Account and Opportunity you can just add an EchOsign button to these.
    In my example i called the custom object 'MyCustomobject'. in your Org you may have a custom object called 'Services'. In this case you'd add the following for the masterobject
    Services__c
    If you want to send from a standard object like Opportunity, then just add Opportunity as the master object on the EchOSign agreement template.
    See also the EchoSign for Salesforce customization guide on how to setup templates.
    Simon

  • Sending objects over sockets - issues i am having

    Hi, this is my first time posting on these forums and I have exhausted my mental capacity on this problem i have been having the past few days. Hopefully somone could help me out.
    I am doing a uni project, and the goal i am currently trying to achieve is to send an object (serialized) from a client to a server. I will atach the code i have written and i will explain more from there.
    This is the server (part of the class, which calls this method)
    Constructor:
      public Broker(String bID) throws Exception {
        brokerID = bID;
        bServer = new ServerSocket(Integer.parseInt(bID));
        System.out.println("Broker listening on port " + bID);
        this.start();
    Main method
      public static void main(String[] args) throws Exception {
        new Broker("8008");
    run method
      public void run() {
        while(true) {
          try {
            Socket bSocket = bServer.accept();
            System.out.println("Accepted a connection from: " + bSocket.getInetAddress());
            brokerServer(bSocket);
            bSocket.close();
            System.out.println("Connection closed");
          catch (Exception e) { e.printStackTrace(); }
    Broker Server
      public void brokerServer(Socket bSocket) {
        BufferedReader in = null;
        ObjectOutputStream oos = null;
        PrintWriter out = null;
        ObjectInputStream ois = null;
        try {
          while (true) {
            oos = new ObjectOutputStream(new DataOutputStream(bSocket.getOutputStream()));
            out = new PrintWriter(new OutputStreamWriter(bSocket.getOutputStream()));
            ois = new ObjectInputStream(bSocket.getInputStream());
            in = new BufferedReader(new InputStreamReader(bSocket.getInputStream()));
            out.println("Connection with Broker on port " + brokerID + " established");
            out.flush();
            //read in first line
            String str = in.readLine();
            //if lineis null, break while loop
            if (str == null)  break;
            else {
              //a request is recieved from user to get user certificate
              if (str.trim().equals("GETUSERCERT")) {
                //read in the userName, size of paywords and user publick key (used in certificate)
                String userName = in.readLine();
                String size = in.readLine();
                PublicKey userPk = (PublicKey) ois.readObject();
                //generate user certificate
                UserCertificate uc = generateUserCertificate(userName, userPk, Integer.parseInt(size, 10));
                //send text to user stating next message is user certififcate
                out.println("SENDUSERCERT");
                out.flush();
                //user Certificate
                oos.writeObject( (UserCertificate) uc);
                oos.flush();
                break;
              if (str.trim().equals("FINISH"))
                break;
            ois.close();
            oos.close();
            out.close();
            in.close();
        catch(Exception e) { e.printStackTrace(); }
    This is the client
      private void requestUserCertificate(int sizeOfPaywordChain, String BrokerID) {
        String host = "localhost";
        ObjectOutputStream oos = null;
        ObjectInputStream ois = null;
        PrintWriter out = null;
        BufferedReader in = null;
        Socket u2bSocket = null;
        try {
          u2bSocket = new Socket(host, Integer.parseInt(BrokerID));
          System.out.println("Connecting to Broker on port " + BrokerID);
          ois = new ObjectInputStream(new DataInputStream(u2bSocket.getInputStream()));
          oos = new ObjectOutputStream(u2bSocket.getOutputStream());
          out = new PrintWriter(new OutputStreamWriter(u2bSocket.getOutputStream()));
          in = new BufferedReader(new InputStreamReader(u2bSocket.getInputStream()));
          //Informs broker that a user certificate is being requested
          out.println("GETUSERCERT");
          //send to broker, username and size of payword chain
          out.println(userName);
          out.println(sizeOfPaywordChain);
          out.flush();
          //send user's public key accross
          oos.writeObject((PublicKey) userPublicKey);
          oos.flush();
          out.println("FINISH");
          out.flush();
          //wait for response
          while(true) {
            //read in line
            String str = in.readLine();
            //if line is null, break while loop
            if (str == null) break;
            //if line read is "SENDUSERCERT" then next line is userCertificate sent from Broker
            if (str.trim().equals("SENDUSERCERT")) {
              //read User Certificate
              userCert = (UserCertificate)ois.readObject();
              break;
            else System.out.println(str);
          //close connections and streams
          u2bSocket.close();
          ois.close();
          oos.close();
          out.close();
          in.close();
        catch (Exception e) { e.printStackTrace(); }
      }I will be regurarly checking this thread, so any other code which you think i should post i will, i can post is ASAP.
    The problem
    First time i run the programs, it works perfectly, however when i run the client program again, it shows this error
    java.io.EOFException
         at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2438)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1245)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
         at User.requestUserCertificate(User.java:75)
         at User.main(User.java:278)the broker server doesn't display anything.
    Would anyone have any idea whats going on??
    Sometimes when i run it, it might display the above error, or it might work. its about 50/50. I have read heaps of similar problems people have had and posted on this forum, but i still don't have any luck in solving this delema.
    Any kind of help will be greatly appreciated.
    Rish

    I see one problem with the code. You are opening both ObjectInputStream ois and a BufferedReader in on the same socket. This won't work as "in" will read ahead to fill up its buffer. This could cause "ois" to find the socket already at end of stream prematurely. I would only use the Object Streams and send the strings as objects.

  • I am a customer Verizon customer of over ten years...I am notgettingany assistance from the customer service department. Since September I am being charged for a Samsung phone that I returned based on the process that verizon has set.return the defective

    turn my phone to send Verizon wireless and those instead of the stuff found. I'm not in charge $600 for the for the phone. I'll talk to multiple customer service reps and nothing has really been done about anything other then we'll keep looking or so for stretching it out. since September I've been dealing with thison a month-to-month basis they cut my services they reinstate me and tell me that they're going to knock off the reconnection charge as I have four lines. Unfortunately my main reason for this phone is my work emails which I need to do because I do work and to contact my mother who is 85 years old and I'm the sole caregiver. I don't know what else to do. I have spoken to a supervisor  by the name of William or Will oats in that he said he was going to look into it and was going to help me out. Never heard from him again- just original email to quiet me down. I've been sending him emails just about every day trying to make sure that I get my message across. Seems like Verizon Wireless really doesn't care about the long-term customers. Looking forward to hearing from someone that can help me with my plight.process is faulty for returns. You don't accept them in the stores because as one customer service rep stated you can't get your own employees to send the devices back. Now the responsibilities is on the customer the paying customer the one that keeps you alive. And it's not fair that I there's no way I can prove that I put it in the mailbox. So what are my next stepswhat is it that I need to do to clear up this charge of $600. It's about economy as $600 to me at this very point it's a lot of money. I've been your customer for 10 years I've got four lines I've given will my mothers telephone number home number..number but now she's got to sit by the phone to make sure that she picks up all the calls. And nobody can hear what I have to sayand nobody has been able throughout all these months and check your notes check your notes to see how many times I've called how many time you cut my services how many times you reinstated me and how many times that I spent an hour and a half to two hours on the phone going through this process. I think the stress level is to know thqt I did exactly what you asked...I am now paying the price for your faulty process I'm all I'm asking is review my account tell me what I did wrong I follow your procedure so I don't understand....to top it off...my wife hasa per diem job...and she too is affected by loosing out on work leads...
    as you can see, the cel is no longer a commodity. It's a way of life.
    PLease se call me at -----just remembered....I don't have a service line.

    I have a similar problem with my fathers service, it wasns't $600 but what is rightfully your money, you deserve it back, I wrote this complaint on the Consumer Affairs website:
    In August 2014, my son went to Target to get a new cell phone and was told his Unlimited Data would still be on his plan (he shared a line on his grandfathers account). Well it turned out that Target messed it up and my son immediately called Verizon to get it taken care of but they were not able to do anything about the lost unlimited data but the customer service rep did try to find the best offer for him. In the mean time Verizon was suppose to send him a new cell phone, they never sent it and he was without a phone so he took his business to another cell provider. Verizon DID charge him for the new service that they had spoke about. So when the new bill (Sept) came, the service he never used was on the bill and when we called to inquire about it we spoke to a Judy and told us we would be receiving a credit of the amount that was paid. Well, we got the next months bill (Oct) and still no credit, so called them again and spoke to a Nadine ** . She looked into the account and saw the amount that was paid and said she would submit it again for a credit and she would get back to me in 2 days, no call back.
    The next bill (Nov) came and no credit again, call again but didn't get the girls name and she put me on hold to look over the previous conversations. She said she sees in the records about the credit and said it takes a while to get it thru the supervisor authorization and she would put it in as a "rush priority". On Dec. 5th my dad's cell was turned off, so I call yet again to Verizon, and explain the whole story to them again. This girl explained to me that the request was not put in correctly and that she would submit it right this time, they even turned the cell back on for him.
    So here we are today, Dec. 30, 2014, I get the bill...NO CREDIT, call up and get a gentleman in billing, explain this whole thing again and he transferred me over to customer service where I spoke to a Jordan and yet again told him the story. By this time I was fuming, 3 almost 4 months of calling for this credit and he looks into the account and tells me there is nothing that states there is a credit so all the other customer service reps see it but now it is gone. He said he can only issue me a $25 credit to the bill, not even close to what the bill was that I paid. At this point I wanted to speak to a Supervisor and even that was a problem.
    He did call me back after my phone died. He put me on hold again to speak to a supervisor himself and said that he can only offer me $100 credit for all my troubles for the past few months. I took the $100 credit because Jordan said if I spoke to the supervisor, the $100 credit might not be an offer anymore so it was either take it or leave it. Now where I stand, they get away with NOT giving the credit due to customers. I am done with Verizon.
    today being March 12, 2015, he FINALLY got the said $100 credit...but because of their delay, he service was shut off and I refuse to pay the reconnection fee due to their neglect of a customer of over ten years. My father's service will NO longer be with a place that has NO VALUE in customer service....Verizon robs their customers anyway they can.

  • How to send an object from one application to another?

    Hi all,
    I have two applications over the same server. The first application needs to send an object to the other application.
    I try to put the object as a session attribute, but in the moment that the second application tries to get the attribute, the attribute doesn't exist.
    Does anybody now how can pass an object from the one application to the other?

    You can also use JMS

Maybe you are looking for

  • Java Index Out Of Bounds Exception error

    In the Query Designer when I choose access type for Result value as Master data, and execute, I get the following java Index Out Of Bounds Exception error: com.sap.ip.bi.webapplications.runtime.controller.MessageException: Error while generating HTML

  • Open File with Application in Automator - Bug???

    I have created a simple workflow to open a text file with TextEdit. It seems to work once, then subsequent times the workflow goes to the point that TextEdit opens but the file doesn't open along with it. I have encountered the same type of problem w

  • Cannot format my iMac. Problem with partition's file

    I cannot format my iMac because Disk Utility sends an error: The partition map needs to be repaired because there's a problem with the EFI system partition's file system. Any suggestions?

  • Insert Form Wizard

    When I create a form using the Insert Record Transaction Wizard, It validates the data using javascript and php. But, if I create my own form and just use the insert record transaction server behavior it only validates the data using javascript. How

  • Get parent JFrame for displaying exception msg

    I have a problem. Lots of my application components are classes that extends JPanel In these classes lot's of different exception could be raised. Some of them I want[b] to show to user (invalid input, no DB connection error e.t.c.) I make may GUI wi