Customizing Forte object serialization

Forte supports serialization of arbitrary object graphs into streams.
However, there do not seem to be any well documented ways to customize
this serialization, e.g. by using a different encoding scheme. It would
seem there must be some support in there somewhere. I suppose at the
very least, one could parse a serialized object (once one decoded the
Forte encoding scheme) and do the conversion from that. That seems
suboptimal, though.
Has anyone done this? Any thoughts on how it might be done?
Regards,
Coty
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>

JavaFunda wrote:
Object serialization is the process of saving an object's state to a sequence of bytes. Does it saves only the instance variable or also the object methods(like getter and setter methods) ? Only the state--the instance variables. It doesn't save the class definition. That has to be available separately (via classloader) at deserilaization time. In other words, you cannot deserialize an instance of a class that is not on your classpath.
Once we we write the object to outputstream or some text file, how does it get transmitted over network?The same way any other bytes get transmitted. You have a Socket. You get its OutputStream. You wrap that in an ObjectOutputStream. When you write to the ObjectOutputStream, that writes through to the Socket's OutputStream, which is responsible for putting the bytes on the wire.
Does we write the java object to text file only duuring serialization?We write the objects to wherever the other end of the ObjectOutputStream is connected to. Just like any other I/O.

Similar Messages

  • Serialization custom Class Object

    Hi,
    I'm kind of stuck with a problem.
    I've been writing a servlet and applet that are communicating over
    internet using a socket connection and Object Serialization.
    The objects that are passed are custom:
    public class mcuComObj implements Serializable{
        static final long  serialVersionUID = 2222;
        private String name;
        private Vector attributes;
        ...There are some more functions but those are not of any interest.
    In the vector attributes, I've planted a jPanel (swing).
    The weird thing is that this morning, it worked a few times...after that
    I'm getting the:
    javax.swing.JComponent; local class incompatible: stream classdesc serialVersionUID = 6954663636822719621, local class serialVersionUID = 5896976265092562486 ERROR message.
    The send code:
    Vector v = new Vector();
    Object objButton = (Object) jButton1;
    v.add(objButton);
    obj.setAttributes(v);  //obj = mcuComObj
    con.sendObject(obj);   //con = socket connection threadThe receive code:
    Object input= (Object) objInpStr.readObject();When I serialize the mcuComObj class, does it also serialize the
    embedded objects (in this case that are in the Vector)?
    The main question is...how can I solve this? I can not guarantee that
    both Servlet and Applet have the same JDK running...!
    Have anyone of you got any ideas?
    Thanks in advance,
    Chris van Diemen

    If the "magic numbers" (sent at the beginning of any writeObject() call) on the sending and receiving JDK differ, the object will not de-serialize properly on the receiving end.
    The easist solution would be to use a common format to transmit the data. Say! That sounds like XML.
    - Saish
    "My karma ran over your dogma." - Anon

  • 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.

  • Customizing ActionScript - Java serialization?

    Hi,
    I wonder how to customize what ActionScript class is serialized to what Java object, overriding BlazeDS's defaults.
    I have a Java class where I would like an ActionScript ArrayCollection to serialize to a custom class.
    To illustrate, normally I might have a class on the server like this:
    public MyClass {
    public void updateRecords(java.util.List[Widget]) {...}
    When this is invoked from a remote Flex client, passing an ArrayCollection as the method parameter, BlazeDS serializes that ArrayCollection into a Java List, and everything works fine.
    Suppose, however, that I have the above method signature defined in the following way:
    public MyClass {
    public void updateRecords(MyCustomCollection[Widget]) {... }
    In that situation, I'd like to be able to specify a custom serializer that takes an ActionScript ArrayCollection and serializes it into MyCustomCollection. In fact, what I'd really like to do is to use this serializer every time a Java class' interface contains MyCustomCollection.
    I looked into flex.messaging.io.TypeMarshaller, but couldn't quite figure out how to use it for that purpose. 
    Thanks,
    -- Frank

    >
    How Java Serialization works internally which algorithm it uses to serialize/deserailaize the objects?
    >
    See the Java Object Serialization Specification
    http://docs.oracle.com/javase/6/docs/platform/serialization/spec/protocol.html
    And are you aware that you have never marked a single one of your 119 previous questions as answered?
    Total Questions: 119 (119 unresolved)
    Are all of those questions really unanswered? Or have you just forgotten to mark them ANSWERED.
    Please begin revisiting your large number of previous posts and marking them ANSWERED as appropriate. This is important for several reasons. First because forum volunteers need to focus on unanswered questions - it wastes their time to read thru threads and respond to posts that have actually already been answered since the original poster isn't even going to pay attention to any new replies. That time could have been better spent helping users that have REAL unanswered questions on the forum.
    Second, when someone like yourself has large numbers of unanswered questions it basically sends a signal to the volunteers that the person posting the question may not even be reading or responding to the replies the volunteers may make. This leads some volunteers to decide to not even bother responding - why should they spend their time trying to help someone who won't even acknowledge the help that they get?
    Third, other people that have the same problem you had find your posts but never see them answered. So they never know if the information provided by the volunteers solved your problem or not. When you mark your questions answered it helps others with the same problem.
    Thanks.

  • Internal Error in reading a Table of Oracle custom-defined objects.

    Hi,
    We are running into an Oracle internal error when trying to extract data from an OUT parameter of a stored procedure. The OUT parameter is of the type TABLE of Oracle custom-defined OBJECT.
    Any help on this issue will be greatly appreciated.
    Thanks, in advance,
    OraNew
    Program:
    package test;
    import java.sql.CallableStatement;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Types;
    import java.util.ArrayList;
    import java.util.List;
    import oracle.sql.ARRAY;
    import oracle.sql.STRUCT;
    import src.vo.ProfileBank;
    public class TestOracle {
    * @param args
    public static void main(String[] args) {
    try{
    Connection con = getConnection();
    ResultSet rsBalance = null;
    CallableStatement cs =
    con.prepareCall("{ CALL acr_profiles.get_profile_bank( ?, ?, ?)}");
    cs.setLong(1, new Long(133).longValue());
    cs.setLong(2, new Long(29032).longValue());
    cs.registerOutParameter(3,Types.ARRAY,"ACR_USER." + "ACR_PROF_BANK_TAB");
    cs.execute();
    ARRAY array = (oracle.sql.ARRAY) cs.getObject(3);
    System.out.println("length: "+ array.length());
    System.out.println("isConvertible: " + array.isConvertibleTo(Object.class));
    System.out.println("isInline: " + array.isInline());
    rsBalance = array.getResultSet();
    showResultSet(rsBalance);
    } catch (Exception sql){
    System.out.println("Exception "+ sql);
    public static void showResultSet (ResultSet rs) throws SQLException
    System.out.println("ResultSet = "+ rs.toString());
    List profileBanks = new ArrayList();
    while (rs != null && rs.next()) {
    STRUCT struct = (STRUCT)rs.getObject (2); //getting the Internal Error on this line.
    Object[] attribs = struct.getAttributes();
    System.out.println("Bank Alias Id"+ (java.math.BigDecimal) attribs[0]);
    System.out.println("Bank Name"+ (String)attribs[1]);
    System.out.println("Bank set flag "+ (String) attribs[2]);
    ProfileBank pBank = new ProfileBank();
    pBank.setBankAliasId(new Integer(((java.math.BigDecimal) attribs[0]).intValue()));
    pBank.setBankName((String) attribs[1]);
    pBank.setSelBankFlag((String) attribs[2]);
    profileBanks.add(pBank);
    public static Connection getConnection() throws ClassNotFoundException, SQLException {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    System.out.println("Driver loaded");
    // establish a connection
    Connection conn = DriverManager
    .getConnection(
    "jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=10.3.11.201)(Port=1521)) (CONNECT_DATA=(SERVICE_NAME= aada.a.al)))",
    "acr_user", "acr_user");
    System.out.println("Database connected");
    return conn;
    Console Output:
    Driver loaded
    Database connected
    length: 2
    isConvertible: false
    isInline: true
    ResultSet = oracle.jdbc.driver.ArrayDataResultSet@1f3aa07
    Exception java.sql.SQLException: Internal Error
    Partial Stacktrace obtained from the Eclipse Debug window:
    oracle.jdbc.driver.DatabaseError.throwSqlException(int) line: 292
    oracle.jdbc.oracore.OracleTypeCOLLECTION.initCollElemTypeName() line: 1192
    oracle.jdbc.oracore.OracleTypeCOLLECTION.getAttributeType(int) line: 1225
    oracle.jdbc.oracore.OracleTypeADT(oracle.jdbc.oracore.OracleNamedType).getFullName(boolean) line: 119
    oracle.jdbc.oracore.OracleTypeADT(oracle.jdbc.oracore.OracleNamedType).getFullName() line: 93
    oracle.sql.StructDescriptor(oracle.sql.TypeDescriptor).initSQLName() line: 497
    oracle.sql.StructDescriptor(oracle.sql.TypeDescriptor).getName() line: 392
    oracle.sql.StructDescriptor.getClass(java.util.Map) line: 2003
    oracle.sql.STRUCT.toJdbc(java.util.Map) line: 983
    oracle.jdbc.driver.ArrayDataResultSet.getObject(int, java.util.Map) line: 1379
    oracle.jdbc.driver.ArrayDataResultSet.getObject(int) line: 1198
    test.TestOracle.showResultSet(java.sql.ResultSet) line: 53
    test.TestOracle.main(java.lang.String[]) line: 38
    Environment:
    Database: Oracle 10g (10.2.0.3)
    JDBC Drivers: version 10.2.0.3 (ojdbc14, orai18n)
    Database Server: HP-UX
    Client machine: Windows XP
    <end of thread>

    hi Thom,
    most error relating to table DOKTL are caused by misconfigured network card.
    if this is a "home" system, install a loopback adapter from Microsoft and use IP address 127.0.0.1 and also check "hosts" file for inconsistency. do not use the IP adddress provided by your ISP as it may change.

  • Error while running Webi report that uses Custom Dimension object(SAP BW)

    Hi,
    I have a universe that is based on SAP BW.I have created a custom dimension object that displays the maximum date.
    The object syntax is
    <expression>Max(@Select(CPS Online\Calendar day))</expression>
    The object parses successfully.
    The object 'Calendar Day ' is a defaultobject created during universe creation from the BW query.It is defined as [0CALDAY].[LEVEL01]
    I tried  to create a Webi report using this object and a measure .On running the query it throws the following error:
    A database error occured. The database error text is: The MDX query WITH MEMBER [Measures].[EBC10672-C0DA-4998-93,80,D3,FF,C3,E8,A2,22] AS ' Max{[0CALDAY].[LEVEL01]} '  SELECT  { [Measures].[EBC10672-C0DA-4998-93,80,D3,FF,C3,E8,A2,22], [Measures].[4JCOSFOKKCUR3RMBPNROFKQQD] }  ON COLUMNS , NON EMPTY [0CALDAY].[LEVEL01].MEMBERS DIMENSION PROPERTIES [0CALDAY].[20CALDAY] ON ROWS FROM [ZCCPSONL/ZCPSONLINE]  failed to execute with the error Invalid MDX command with (. (WIS 10901)
    I have tried every possible syntax I could think of but I keep getting this error each time.I have set the object type to Number (even though it is actually a Date), I have tried writing the MDX inside the Max instead of the @select , but nothing seems to work.Could anyone please let me know why this error is occuring?Is there anything wrong with the syntax or is there any setting in Webi needed before a custom dimension object can be used on it.

    Can you see data for Custom object @ BEx level??
    YES, then just try to re-create the same variable and Save the BW query.
    Now do View - refresh Strusture @ Universe. And you can see Filter for the same, just Parse it, just whether it is OK or not.
    OK -- then Export the Universe and create WebI reports, this will come as Prompt.
    Hope it will helps you.
    Thank You!!
    Sent from iPhone

  • Calling Web Service Proxy with Custom java Object as parameter

    I created a web service proxy from WSDL URL using JDeveloper 11g(.5 version)
    I need to call a webservice method which takes custom Java Object( Ex: ABC.java) as Input parameter. It creates the XSD java (ABC.java) file for that.
    @XmlElementRef(name = "abc", namespace = "http://impl.service.ns.test", type = JAXBElement.class)
    protected JAXBElement<ABC> abc;
    ABC.java has a property of type java.util.Set of a custom Java Object (Set<XYZ.class>)
    It doesn't create xsd file for XYZ.java.
    @XmlElementRef(name = "XYZ", namespace = "http://model.ns.test/xsd", type = JAXBElement.class)
    protected JAXBElement<Set> xyz;
    Please help me.

    The passing of Java objects in and out of a web service is NOT supported. variables must be xml documents defined by a XML schema. In my opinion, missing Java object and WSDL is not a good idea. -Edwin

  • Creation of New Custom Development Object in Solar02

    Hi,
    We are trying to create an object type of Form for a new custom development object in solar02 under tab Development,and for this I get an error that the object doesn’t exist in development environment. 
    Based on my analysis, it looks like Solution Manager only allows to link pre-existing development objects but not creating new objects.  Is that right?  If  not please advice how can we add new custom objects through solution manager.
    Thanks & Regards,
    Sandeep Alapati

    hi,
    solar01/02 is the tools for documenation, it is not for creating objects. 
    basically it should allow you to enter any developement objects names, irerespective of whether they are created in the back end system or not.
    please provide the screenshots.
    Thanks
    Jansi

  • Creation of Custom Change Object

    Hi all,
    I tried to create a custom change object from tcode- SCDO,but its asking for name space,
    and even i dont know to create it like the tables it asking for.
    I have successfully triggered a WF using standard change Object,but am not able to create custom
    Change object.
    Any one of you if have answer please help me.

    Hi Nivedita Yadav,
                               go through this link.
    http://sample-code-abap.blogspot.com/2008/02/applying-change-document-technique-on.html
    Regards,
    Dheepak
    Edited by: dheepak on Jan 21, 2009 4:03 PM
    Edited by: dheepak on Jan 21, 2009 4:28 PM

  • How to add custom authorization object to a SAP standard transaction

    Hi All,
    I have a standard tcode IW22 (change PM Notification) and I would lock changing when some users modify the field Functional Location (field TPLNR).
    Since this field does not have an authorization object associated, I've tried to solve this problem with the following steps:
    - tcode SU20 - creation of new authorization field TPLNR with data element TPLNR
    - tcode SU21 - creation of  a new auth object in transaction SU21 with name ZPM and field (TPLNR, ACTVT and TCOD)
    - tcode SU24 - insert of new authorization field e check indicator (green)
    - tcode SU22 - check indicator - check (green)
    After this we have created a new role with PFCG and add transaction IW22; the new auth.ZPM was added manually.
    We have try to analyze log (ST01 trace) but it seems no check was made in the trace file.
    It seems new authorization object was not checked.
    My question is: "Is it possible to add a custom authorization object into standard transaction and implementing authorization check without writing abap code in exit or badi ?"
    Thanks
    Maurizio

    > My question is: "Is it possible to add a custom authorization object into standard transaction and implementing authorization check without writing abap code in exit or badi ?"
    >
    No .. not possible. The list of Auth. objects SAP proposed in SU24 for each Stnd. SAP TCodes are basically documentation of the Authority-Checks in the program for that TCode. The extra advantage of SU24 is to set the object status (means the proposal for availability in PFCG) among any of the four check indicators. So that we can provide our own value (customer specific values which are basically defined and separate from sap provided values) and reinforce the authorization concept of the organization.
    So you need to provide a Authority-Check for ZPM in the program of IW22 to make sure that the fields you want to be checked are really being checked during execution of the tcode.
    Regards,
    Dipanjan

  • Creating custom BOL object model for adding Search Parameter

    Hi friends
    Can any one guide me the steps through which i can add the new field in the search criteria by using the creation of custom BOL object model in Interaction Center Web Client.
    That will be a grate help for me.
    Regards
    Pulkit
    Message was edited by:
            Pulkit Agrawal

    Hi!
    For maintaining CRMC_OBJECTS table you should use view CRMV_OBJECTS. (in transaction SM30).
    Regards,
    Alejandro.

  • Can we push a Custom Type Object on Stack in BCEL?

    Hi All,
    I know how to push Primitive Types on Stack IN BCEL using
    InstructinoList.append(new PUSH(ConstantPoolGen,343));
    Now i want to push Custom Type Object(Obj of some user defined class i.e EngineClass obj) on Stack in BCEL.
    Let me explain some context of my problem What i want to do is i have a class
    class Automobile {
    public void getEngine(int carNo,EngineClass engineClassObj){
    System.out.println("EngineNo="+engineClassObj.sisNo);
    Now when i load "Automobile" class in memory.
    ilist = new InstructionList();
    ilist.append(InstructionConstants.ALOAD_0);
    ilist.append(new PUSH(pgen,345));
    ////Hear Now i have to also push the Object on Stack
    ilist.append(ifact.createInvoke(_invoking_ClassName,_invoking_MethodName, Type.INT,*
    new Type[] { Type.INT,Type.OBJECT }, Constants.INVOKEVIRTUAL));
    ilist.append(InstructionConstants.IRETURN);
    1-if i use createNew() method and generate new object then how i am going to
    fill its fields value?
    2-or if i firstly push all fields values of Engine type Obj on Stack using PUSH
    then i can some how construct object on memory & then push it on Stack.
    these are some solution i can think of.
    But i don't know the right solution
    So Still need help ...
    thanks

    Deleted your duplicate post. Please fix your wild formatting without all the boldface and italics, and please use {noformat}{noformat} tags around the code. At present this is just an unreadable mess.                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Dynamic Configuration of custom Context Objects: is it possible?

    Guys,
    is it possible to use Dynamic Configuration for custom Context Objects as we normally do to technical context objects?
    Also, is it possible to use a context object in receiver determination, even if it is not assigned to a message interface?
    My case: I need to use condition at receiver determination but I dont want to read a field from payload. Instead, I want to write that context object with dynamic configuration and use it at receiver determination runtime.
    I want to do this in order to avoid having to extend the payload's message type because of this extra field for condition (actually, its not that I dont want to, its that I cant. The message type is defined by 3rd party and cant be changed). If it is possible to keep that information at header instead of payload, it'd be great.
    Kind regards and thanks in advance,
    Henrique.

    Hi,
    >>>>>Just a last comment: do you need to deploy any code for the adapter on SDM or just the "fake adapter metadata file" is enough?
    no SDM
    just the metadata file as per my blog
    glad this is what you wanted
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Mass activity running only once for custom parallel object

    Hi
    I have created custom parallel object EXT_UI and created mass activity for this but the report in triggered only once and not going for second interval .
    Can any one help me out in this.
    Thanks in advance.
    Chetan
    Message was edited by: CHETAN N P
    Mass activity is running fine for standard object ANLAGE but not for custom one
    Please share me steps to be followed in creating custom parallel object.
    Regards,
    Chetan

    Hi Chetan,
    I think you need to make changes in the Events which gets triggered by the mass activity.
    Can you let me know the mass transaction code for which you have customised the activity,
    Thanks,
    Amlan

  • How to create custom BOL object for dynamic query in CRM 7.0

    Hi,
    Could anyone please explain me with steps that how to create the custom BOL object for dynamic query in CRM 7.0, I did it in previous version but its throwing exception when i try to create the object of my dynamic query class. I just defined the entry of my in crmv_obj_btil to create the dynamic query BOL object. do i need to do any other thing also to make it work?
    Regards,
    Kamesh Bathla
    Edited by: Kamesh Bathla on Jul 6, 2009 5:12 PM

    Hi Justin,
    First of thanks for your reply, and coming to my requirement, I need to report the list of items which are there in the dynamic select statement what am getting from the DB. The select statement number of columns may vary in my example for different countries the select item columns count is different. For US its '15', for UK it may be 10 ...like so, and some of the column value might be a combination or calculation part of other table columns (The select query contains more than one table in the from clause).
    In order to execute the dynamic select statement and return the result i choose to write a function which will parse the cursor for dynamic query and then iterate the values and construct a Type Object and append it to the pipe row.
    Am relatively very new for these sort of things, welcome in case of any suggestions to make it simple (Instead of the function what i thought to work with) also a sample narrating the new procedure will be appreciated.
    Thanks in Advance,
    mallikj2.

Maybe you are looking for

  • Generating Labels Report In BI Publisher

    Hi Experts, We have a requirement to create a Label report using BI Publisher. the lable has two static fields and three dynamic fields. The report needs to build in left to right fashion. As per my understanding the BI Publisher reports works in Top

  • Audio Editor does not open in Captivate 6

    Unfortunately when I try to open the Audio Editor nothing opens but I have to use the Esc key to move on (as if it's open but it's really not open).  I've tried opening from the Timeline (double clicking audio or right-click Edit...) and from the Adv

  • IPhone 5 / iOS 6.0.2 network issue

    I found the problem of my iPhone5+iOS6.0.2 It is all about network. By SpeedTest.Net app, combinatons of wifi, lte, celluar data options on and off, I could get each individual speed and server connected. (My wifi = 18M, LTE = 7M, 4G/3G = 1.5M) When

  • How do I get rid of the banding I see in Ai's gaussian blur?

    There's banding in the gaussian blur, in Ai. I'm new to Ai.  I created a logo in INKSCAPE, (an open-source free vector program), and the gaussian blur worked fine.  But the people that will carry the logo to the next step, use Ai.  When I send svg fi

  • My computer crashed, is there anyway to access library of previously purchased music

    Is there any way to get all my previously purchased items?  Computer crashed... have a new one.  I thought the itunes library would still be linked to my profile.  Please help!  THanks!!