On Wed, 3 Mar 2004, Alasdair Allan wrote:
> Okay, I'm a bit stumped.
>
> I'm currently using Peter's AppHttpSOAPServer class to underpin the
> SOAP'ifying of the various monoliths called by ORAC-DR.
>
> Now using SOAP::Lite under Perl its pretty trvial to general a proper SOAP
> Fault and return this in cases where you have an error, or an exception
> has been raised.
>
> But I'm stumped, how to on Earth do I get AXIS to return proper SOAP
> Faults to the client? I'd presumed that simply having an raising an
> uncaught exception would return a SOAP Fault. Instead I get an AxisFault
> on standard out at the server end and "null" at the client end.
>
> I've had a poke around and nobody seems to be generating proper SOAP
> faults on error inside StarJava yet, does anyone know how to do this?
> It's pretty much the only way raise and error with the pipeline thats
> going to be robust enough to be acceptable to the JAC...
Hi Al,
well I'm not an expert at this either (so they may be better ways), but
the following works for me. Make the methods that are being invoked throw
an explicit AxisException on error (from my _local_ SOG, these changes are
not committed yet):
/**
* Display the given DOM Element as an NDX.
*/
public static void showNDX( Element element )
throws AxisFault
{
try {
SOGRemoteControl.getInstance().showNDX( element );
}
catch (Exception e) {
throw new AxisFault( "Failed to display remote NDX", e );
}
}
From the client end I then see:
Exception in thread "main" AxisFault
faultCode: {http://xml.apache.org/axis/}Server.generalException
faultString: Failed to display remote NDX
faultActor: null
faultDetail:
(plus long stack trace).
Any help?
Peter.
|