|
|
|
We aren't going to get this in for M5. I'm not too sure of the usefulness either from an xml consumer standpoint.
The patch for this issue has been provided by Øyvind Matheson Wergeland on the xfire-user mailing list, on 5/4/2006.
I attach the patch file of Øyvind to this issue. Does the solution describe here also ensure that a call to SampleService.getA(name) may return a B? I.e. will the server also be aware that it may have to serialize all of B's properties, not just those defined by A?
Updated patch in order to work on last XFire revision (#1455)
How much of this patch works? anyone know what remains to be done?
It seems to work well on WSDL generation (if objects appears in the method signatures) and serialisation/deserialisation parts.
What is not handled :
{"call the right serializer/deserializer on message reading/writing (handle the xsi:type attribute)"}
Has anybody looked at this? My data model uses a good deal of polymorphism and I tend to have a lot of collections <Action xsi:type="GetInformationType" /> and the Server is having problems unmarshalling the message We've been working on this recently. Expect a commit in the next week or two with the necessary changes.
That patch is definitely not finished. We're still working on getting this into SVN, but expect it soon! We just need to get 1.1.1 out first.
Ok, thank you.
Here, a nice article about polymorphic input parameters : It will be interesting if XFire implements this kind of mapping FYI - this is all in SVN now and has been pretty well tested. For those who want to get dirty checking out code and building xfire, feel free to play!
Here is a snippet on how to use it:
ObjectServiceFactory osf = (ObjectServiceFactory) getServiceFactory(); HashMap props = new HashMap(); ArrayList l = new ArrayList(); endpoint = osf.create(InheritanceService.class, getServiceRegistry().register(endpoint); This also I can confirm is not entirely working for the case when Object is returned from an object contained in an exception. I was told:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
As a workaround you could provide your own wsdl with extended types.