I think the bellow code will help you. try{ //Client code }catch(AxisFault af){ if(af!=null){ * RemoteException re = af;*
* Throwable th = re.detail;* * String faultMsg = th.toString();* System.out.println("FaultString :: "+faultMsg ); } } I know this is not easy, may bellow methods help to solve your problem af.getFaultAction() af.getFaultRole() af.getMessage() af.getReason() Thanks, Satya On Thu, Jun 5, 2014 at 7:13 PM, Jack Sprat <rexclaim...@yahoo.com.invalid> wrote: > There is a method in the Exception class named #getFaultMessage. This > returns blank, which is correct since there is no text in the exception. > It would be very easy if this was the answer. > > I need to get the faultstring. The faultstring is outside the exception. > See the XML snippet below. > > I'm working on a different way of sending the request and capturing the > response. There is a lot more coding involved but appears to be the only > way to get the faultstring element. > > Thanks, > J > > > > > On Thursday, June 5, 2014 2:37 AM, satyapriya sahoo < > sahoo.satyapr...@gmail.com> wrote: > > Jack, > > Hope bellow points will help you to solve your Problem. > > You can process in 3 ways. > > 1) IN your client code you need an catch block for AxisFault and U need to > retrieve the message from that exception > try{ > //Client code > }catch(AxisFault af){ > if(af!=null){ > String faultMsg = af.getMessage(); > System.out.println("FaultString :: "+faultMsg ); > } > } > > 2) If it is coming as a string, then you can do some String operation. > > 3) You can also take the help of dom parser or sax parse to retrieve the > specific value, because it is coming as a xml format. > > Thanks, > Satya > > >