Hi there,

my problem is, that if I am throwing an Exception inside a remote called
method, the stack trace is always printed on client side. That happens with
my own client files, but also with the ones generated by wsdl2java. After
the stack trace is printed my catch-blocks are performed as well.
Who initialzes this stack trace printing on the client side and how can I
prevent it from doing so?

On server side I tried to throw java.lang.Exception,
java.rmi.RemoteException and org.apache.axis.AxisFault. Its always the same.
on client side I got the following stack trace printed:
19.12.2002 13:46:36 org.apache.axis.client.Call invoke
INFO: Mapping Exception to AxisFault
AxisFault
 faultCode: {http://xml.apache.org/axis/}Server.generalException
 faultString: exception from remote-method...
 faultActor: null
 faultDetail: 
        stackTrace: AxisFault
 faultCode: {http://xml.apache.org/axis/}Server.generalException
 faultString: exception from remote-method...
 faultActor: null
 faultDetail: 

exception from remote-method...
        at <mypackage>.<myservice>.<mymethod>(myservice.java:67)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
.
.
.
After some stack trace there starts another one:
exception from remote-method...
        at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:13
5)
        at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.java:942)
        at
org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
        at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator
.java:1550)
        at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1204)
.
.
.

And after the end of the second one I see the result of my catch-block,
which, using the stub from wsdl2java, looks like:
                try
                {
                        <myservice>ServiceLocator loc = new
<myservice>ServiceLocator();
                        loc.setMaintainSession(true);
                        <myservice>Service service =
(<myservice>Service)loc;
                        URL endpoint = new URL("<pathToMyWebservice>");
                        <myservice> port = service.get<myservice>(endpoint);
                        System.out.println(port.<mymethod>());
                }
                catch(Exception e)
                {
                        System.out.println("catched inside the client");
                }

Inside my Tomcat window there is also printed the same stack trace, but the
result of the catch-block.

Am I doing something wrong? Is that behaviour maybe known and welcome? How
can prevent from doing this?
help is highly appreciated.
Greetings from Hamburg/Germany
Sepo

Reply via email to