I've got a very simple test application that I'm using to learn how to do web service 
endpoints for EJBs in JBoss 4.0.  The method I'm calling throws an application defined 
exception (extends Exception) under certain circumstances.

For a client application, I used the Axis WSDL2Java tool to generate client stubs.  It 
does generate the exception class, and the method in the stub it generates does throw 
the exception.

Everything works great if no exception is thrown, but when the method does throw an 
exception, what the client code actually catches is not the defined application 
exception.  I'm trying to figure out what I'm doing wrong and how to make it so that I 
can get the application exceptions on the client side.  The stack trace from the 
client side is included below.  Where is the MBeanException coming from??

____________________________________________________________

AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
 faultSubcode: 
 faultString: MBeanException: null Cause: com.sipstorm.test.webservice.TestException: 
Divide by 0!
 faultActor: 
 faultNode: 
 faultDetail: 
        {http://xml.apache.org/axis/}stackTrace: AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
 faultSubcode: 
 faultString: MBeanException: null Cause: com.sipstorm.test.webservice.TestException: 
Divide by 0!
 faultActor: 
 faultNode: 
 faultDetail: 

MBeanException: null Cause: com.sipstorm.test.webservice.TestException: Divide by 0!
        at 
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
        at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
        at 
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1712)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at 
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:2248)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at 
com.sipstorm.test.webservice.TestEndpointBindingStub.divide(TestEndpointBindingStub.java:143)
        at com.sipstorm.test.client.Client.main(Client.java:28)


MBeanException: null Cause: com.sipstorm.test.webservice.TestException: Divide by 0!
        at 
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
        at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
        at 
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1015)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1712)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at 
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:2248)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at 
com.sipstorm.test.webservice.TestEndpointBindingStub.divide(TestEndpointBindingStub.java:143)
        at com.sipstorm.test.client.Client.main(Client.java:28)

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3852402#3852402

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3852402


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to