Re: Accessing faultstring in Axis2 client

satyapriya sahoo <[email protected]>
Newsgroups gmane.text.xml.axis.user
Message-ID <CAEp0eHOSriOAA2FkdtNm+GRqMndYLV4h-gDPEMJV9rBO365Gqw@mail.gmail.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.