Solved

Problem in deserializing an Object over URLConnection , when Object is different on receiving side

Posted on 2003-11-25
6
273 Views
Last Modified: 2013-12-10
Hi,
        I have application W deployed on WebLogic. This app W has one Java object JO which is serializable. I have application A on ATG. app W and app A are same except java object JO is not serializable on ATG and is having less attributes than JO on Weblogic.
        I am sending JO from app W to app A by HttpURLConnection. But when I receive it in app A( from input stream of the Connection) and try to cast the object received to JO on ATG, it throws me error, which is normal, as the classes are not same.
        Is there any way by which I can send object to ATG without modifying the class on ATG. I can create new classes on WebLogic, but not on ATG.

Any suggestion is most Welcome.
Thanks in Advance
Animesh
0
Comment
Question by:animExp
  • 2
6 Comments
 
LVL 9

Expert Comment

by:vzilka
ID: 9823088
What if you try to create the same object in W (same attributes), but with the Serializable interface, and send it? Does it work?
0
 
LVL 4

Accepted Solution

by:
boxy73 earned 500 total points
ID: 9823120
Try creating a class as in Weblogic as it exists in ATG and then create a new one, serializable if you need it, that extends that first class, and send it using HttpURLConnection.

If the class in weblogic has less attributes than in TAG, create it with those att in W too, although you're not going to use them.

0
 
LVL 9

Expert Comment

by:vzilka
ID: 11074721
boxy73 answer is both complete and accurate.
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
tomcat deploy 3 138
Session migration 1 105
Clear browser cache on site login, is it possible? 3 27
Java Exception example issues 11 84
Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question