That would be a nice thing to have indeed!! When Axis2 WS client code decides to classify an error situation as an AxisFault, the client application seems to have no chance to find out what has happened behind the scenes. It's just like saying "failed." and nothing more. This can be very odd when the used Axis2 configuration is just "idiosyncratic" about what happens on the wire, and you simply do not know about that.
But it is possible to force the HTTP base implementation usually used by Axis2 (which is commons-httpclient) to log the HTTP traffic, regardless of using https on the actual connection: commons-httpclient internally uses commons-logging, and there you can enable the category / filter "org.apache.commons.httpclient.wire" to get the http traffic logged. Usually this helps a lot in dev/test environments, but is not accessible by the application for "self examination". Christian > -----Original Message----- > From: laredotornado [mailto:[email protected]] > Sent: Tuesday, October 13, 2009 4:04 PM > To: [email protected] > Subject: Possible to get more information from an AxisFault? > > > Hi, > > > We''ve written a web service and a client that connects to it, both in > Java > (client generated using the code below) ... > > <project xmlns:j="jelly:core" xmlns:ant="jelly:ant"> > <preGoal name="java:compile"> > <ant:property name="downloadedWSDL" > value="target/MatchingService.wsdl" > /> > <ant:get > src="http://localhost:8080//apps/dor/dmv/myapp/myfn//services/MatchingSe rv > ice?wsdl" > dest="${downloadedWSDL}" > username="username" > password="password" /> > <ant:mkdir dir="${maven.build.dir}/src" /> > <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true" > classpathref="maven.dependency.classpath"> > <arg line="-uri ${downloadedWSDL}" /> > <arg line="-or" /> > <arg line="-d adb" /> > <arg line="-o target/" /> > </java> > <ant:javac > debug="true" > debuglevel="vars,lines,source" > destdir="${maven.build.dest}" > excludes="**/package.html" > srcdir="${basedir}/target/src" > > <ant:classpath> > <ant:path refid="maven.dependency.classpath" /> > </ant:classpath> > </ant:javac> > </preGoal> > </project> > > > I wanted to know how to get axis faults to send back more information than > simply what we are seeing below. Regardless of the exception generated by > the web service, the exception thrown in the client is the same. Is there > a > way to add a message into the client so at least we know greater detail > about what caused the error? > > > org.apache.axis2.AxisFault: Exception occurred while trying to invoke > service method verifyAge > at > org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java :4 > 86) > at > org.apache.axis2.description.OutInAxisOperationClient.handleResponse(Out In > AxisOperation.java:343) > at > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper at > ion.java:389) > at > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA xi > sOperation.java:211) > at > org.apache.axis2.client.OperationClient.execute(OperationClient.java:163 ) > at > myco.dor.dmv.driver.matching.soap.MatchingServiceStub.verifyAge(Matching Se > rviceStub.java:522) > at > myco.dor.dmv.driver.matching.test.AgeVerifyTests.testVerifyAgeWithNullId en > tityParams(AgeVerifyTests.java:62) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a: > 39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Im > pl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at junit.framework.TestCase.runTest(TestCase.java:164) > at junit.framework.TestCase.runBare(TestCase.java:130) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:120) > at junit.framework.TestSuite.runTest(TestSuite.java:230) > at junit.framework.TestSuite.run(TestSuite.java:225) > at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTe st > Runner.java:297) > at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnit Ta > sk.java:1072) > at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask .j > ava:682) > at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JU ni > tTask.java:1434) > at > org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask .j > ava:632) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:195) > at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:250) > at > org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) > at > org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186) > > Thanks, - Dave > > -- > View this message in context: http://www.nabble.com/Possible-to-get-more- > information-from-an-AxisFault--tp25873509p25873509.html > Sent from the Axis - User mailing list archive at Nabble.com. > > > !DSPAM:4ad48905326661091618644! > >
