Hi,
I have a java swing application as a client to talk to a server passing some
serializable objects
over the network.
Using the below code to create the client
HashMap props = new HashMap();
props.put(AegisBindingProvider.WRITE_XSI_TYPE_KEY, Boolean.TRUE);
ArrayList list = new ArrayList();
list.add(A.class.getName());
list.add(B.class.getName()); //class B extends A
props.put(AegisBindingProvider.OVERRIDE_TYPES_KEY, list);
//if(serviceCode == WEBSERVICE) {
Service serviceModel =
new ObjectServiceFactory().create(Service.class,props);
logger.info("got service model.");
// Create a proxy for the deployed service
XFire xfire = XFireFactory.newInstance().getXFire();
XFireProxyFactory factory = new XFireProxyFactory(xfire);
String serviceUrl = "http://localhost:8080/services/Service
logger.info("about to create client");
Service client1 = (Service) factory.create(serviceModel,
serviceUrl);
//serviceMethod() will have both B and A objects in the array..
A[] results = client1.serviceMethod();
The above code is working fine from a JUnit test case and also from
standalone java app, returning
either types of objects properly, but while trying the same from Netbeans
application developed using Netbeans 5.0 IDE the subclass object is always
getting converted to super class object and could not get the data specific
to subclass object.
Could someone let me know how to fix this problem.
Thanks in advance,
Srinivas.
--
View this message in context:
http://www.nabble.com/XFire-client-with-aegis-inheritance-not-working...-tp14293772p14293772.html
Sent from the XFire - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email