When trying to deserialize a java.rmi.RemoteException on a client we have
run into a problem were we get this exception:
Nested exception is org.codehaus.xfire.fault.XFireFault: No write method for
property {http://rmi.java}cause in class java.rmi.RemoteException
[java] org.codehaus.xfire.XFireRuntimeException: Could not invoke service..
Nested exception is org.codehaus.xfire.fault.XFireFault: Could not receive
fault.. Nested exception is org.codehaus.xfire.fault.XFireFault: No write
method for property {http://rmi.java}cause in class java.rmi.RemoteException
[java] org.codehaus.xfire.fault.XFireFault: Could not receive fault.. Nested
exception is org.codehaus.xfire.fault.XFireFault: No write method for
property {http://rmi.java}cause in class java.rmi.RemoteException
[java] at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java
:89)
[java] at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
[java] at org.codehaus.xfire.client.Client.invoke(Client.java:335)
[java] at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java
:77)
[java] at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
When we inspect the actual message we get this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Failed to find
com.atlassian.crowd.integration.model.RemoteGroupDirectoryID: 32769 and
name: group1; nested exception is:
.com.atlassian.crowd.integration.exception.ObjectNotFoundException: Failed
to find com.atlassian.crowd.integration.model.RemoteGroupDirectoryID: 32769
and name: group1</faultstring>
<detail>
<RemoteException xmlns="urn:SecurityServer">
<cause xmlns="http://rmi.java" />
<message xmlns="http://rmi.java">Failed to find
com.atlassian.crowd.integration.model.RemoteGroupDirectoryID: 32769 and
name: group1; nested exception is:
.com.atlassian.crowd.integration.exception.ObjectNotFoundException: Failed
to find com.atlassian.crowd.integration.model.RemoteGroupDirectoryID: 32769
and name: group1
</message>
</RemoteException>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
The problem appears to be similar to this previous thread:
http://jira.codehaus.org/browse/XFIRE-509
The possible solution to the problem per the threads and JIRA issue is to
use JAXB 2.0, however this requires the 1.5 JDK and our code is bound to the
1.4 JDK.
Has anyone else ran into this problem and been able to flush out a
workaround without wrapping the RemoteException because this would require
changing our WSDL and any binding client code that depends on the defined
interfaces.
We have explored looking into creating a FaultHandler, but this option will
not work because the exception is deserialized before the FaultHandler is
called.
Cheers,
Justen
--
Justen Stepka
http://www.jstepka.name/blog/