2 Replies Latest reply on Apr 18, 2005 8:14 AM by Georg Hallingstrom

    Server custom exception not comming through to client

    Georg Hallingstrom Newbie


      I am trying to understand why our custom exceptions are not propagated correctly to the client side. I have looked at the jboss testsuite and that looks real strait forward to me but when my implemenetation seams to do something more... The problem is that an SOAPFaultException is thrown on the client side instead of the service special exception.

      (Localhost JUnit client accessing webservice exposed EJB in JBoss 4.0.1)

       at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:478)
       at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:294)
       at com.bullen.fleet.api.webservices.exceptions.TacoBellService_Stub.orderBurrito(TacoBellService_Stub.java:71)
       at com.bullen.fleet.api.client.TestJFastFood.orderBurrito(TestJFastFood.java:60)

      The SOAP response comming to the client is:

      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      Why does the <com.bullen.fleet.....> get propageted to the client side at all? We dont know where the client code has been assembled...! We should not know that either. It would of course be good if it was like that but from what I have seen no other transported data regards the package names anyway, the used qname + classname should be sufficiant.

      I guess that I would get a ClassNotFoundException if the LoginException class could not be found?

      The client/server/exception classes are similar to the testsuit classes.

      One other strange thing is that the exception gets raised even on the server side but the message does tell me so much...

      14:20:12,633 ERROR [ServiceEndpointInterceptor] Error from service endpoint, processing fault handler chain
      com.bullen.fleet.api.webservices.exceptions.LoginException: hepp
       at com.bullen.fleet.api.webservices.ejb.TacoBellBean.orderBurrito(TacoBellBean.java:61)
       at com.bullen.fleet.api.webservices.ejb.TacoBellSession.orderBurrito(TacoBellSession.java:52)
       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)
       at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
       at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)

      I would appriciate all ideas of sources to this failure or explanations of the exception functionallity...

      Best regards,