FileDocCategorySizeDatePackage
FeedFaultListener.javaAPI DocExample1081Tue Jan 15 11:31:46 GMT 2002javasoap.book.ch7

FeedFaultListener

public class FeedFaultListener extends Object implements SOAPFaultListener

Fields Summary
Constructors Summary
public FeedFaultListener()

   
Methods Summary
public voidfault(SOAPFaultEvent event)

   
      FeedException ex = (FeedException)event.getSOAPException();
      Vector v = new Vector();
      DocumentBuilder builder = 
               XMLParserUtils.getXMLDocBuilder();
      Document doc = builder.newDocument();
      Hashtable detail = ex.getDetail();
      Enumeration e = detail.keys();
      while (e.hasMoreElements()) {
         String name = (String)e.nextElement();
         String value = (String)detail.get(name);
         Element elem = doc.createElement(name);
         Text txt = doc.createTextNode("");
         txt.setData(value);
         elem.appendChild(txt);
         v.addElement(elem);
      }
      
      event.getFault().setDetailEntries(v);