Solved

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

Posted on 2003-11-25
6
271 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
This video discusses moving either the default database or any database to a new volume.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

706 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now