|
|
|
[
Permlink
| « Hide
]
Dan Diephouse - 15/May/06 04:45 PM
I have this now fixed. I will get a snapshot deployed as soon as the codehaus servers are back online. This may be as late as Wednesday.
This is still an issue in XFire 1.1.2
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not unmarshall type.
Process finished with exit code 0 For the record, there is a "workaround". Dan already pointed this out to me but I had forgotten about it.
The workaround is to manually specify all the packages that are generated from the WSDL in your client creation code: FooClient foo = new FooClient();
FooSoap fooSoap = foo.getFooSoap("http://123.123.123.123/services/FooService");
Client client = ((XFireProxy) Proxy.getInvocationHandler(fooSoap)).getClient();
List<String> pckgs = new ArrayList<String>();
pckgs.add("com.foo.bar");
pckgs.add("com.foo.smu");
pckgs.add("com.foo.baz");
pckgs.add("com.foo.fluffbunny");
pckgs.add("com.external.company");
client.setProperty(JaxbType.SEARCH_PACKAGES, pckgs);
This should prevent the client from trying to instantiate an abstract class for some reason. I still don't consider this issue resolved... I would like to know whether it's possible to put this logic somehow into the generated code to relieve the developer of having to synchronize this manually. This is a potential source of very vague bugs unless the process is somehow automated. I think this is definitely possible. We can query jaxb to see the packages created I believe (although that may be wrong).
So it turns out its not possible to figure out how the sub classes automagically, so I think we're stuck with the current solution. If anyone has any better ideas please let me know. In the mean time I've documented how this works here:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||