Home » xml-commons-external-1.4.01-src » javax » xml » rpc » soap » [javadoc | source]

    1   /*
    2    * JBoss, Home of Professional Open Source.
    3    * Copyright 2006, Red Hat Middleware LLC, and individual contributors
    4    * as indicated by the @author tags. See the copyright.txt file in the
    5    * distribution for a full listing of individual contributors.
    6    *
    7    * This is free software; you can redistribute it and/or modify it
    8    * under the terms of the GNU Lesser General Public License as
    9    * published by the Free Software Foundation; either version 2.1 of
   10    * the License, or (at your option) any later version.
   11    *
   12    * This software is distributed in the hope that it will be useful,
   13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
   14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   15    * Lesser General Public License for more details.
   16    *
   17    * You should have received a copy of the GNU Lesser General Public
   18    * License along with this software; if not, write to the Free
   19    * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
   20    * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
   21    */
   22   package javax.xml.rpc.soap;
   23   
   24   import java.util.logging.Logger;
   25   
   26   import javax.xml.namespace.QName;
   27   import javax.xml.soap.Detail;
   28   import javax.xml.soap.Name;
   29   
   30   /** The SOAPFaultException exception represents a SOAP fault.
   31    * 
   32    * The message part in the SOAP fault maps to the contents of faultdetail
   33    * element accessible through the getDetail method on the SOAPFaultException.
   34    * The method createDetail on the javax.xml.soap.SOAPFactory creates an instance
   35    * of the javax.xml.soap.Detail.
   36    * 
   37    * The faultstring provides a human-readable description of the SOAP fault. The
   38    * faultcode element provides an algorithmic mapping of the SOAP fault.
   39    *  
   40    * Refer to SOAP 1.1 and WSDL 1.1 specifications for more details of the SOAP
   41    * faults. 
   42    * 
   43    * @author Scott.Stark@jboss.org
   44    * @author Thomas.Diesler@jboss.org
   45    * @author Rahul Sharma (javadoc)
   46    */
   47   public class SOAPFaultException extends RuntimeException
   48   {
   49      private static final long serialVersionUID = -7224636940495025621L;
   50   
   51      // provide logging
   52      private static Logger log = Logger.getLogger(SOAPFaultException.class.getName());
   53   
   54      private QName faultCode;
   55      private String faultString;
   56      private String faultActor;
   57      private Detail faultDetail;
   58   
   59      public SOAPFaultException(QName faultCode, String faultString, String faultActor, Detail faultDetail)
   60      {
   61         super(faultString);
   62   
   63         Name detailName = faultDetail != null ? faultDetail.getElementName() : null;
   64         log.fine("new SOAPFaultException [code=" + faultCode + ",string=" + faultString + ",actor=" + faultActor + ",detail=" + detailName + "]");
   65   
   66         this.faultCode = faultCode;
   67         this.faultString = faultString;
   68         this.faultActor = faultActor;
   69         this.faultDetail = faultDetail;
   70      }
   71   
   72      public QName getFaultCode()
   73      {
   74         return faultCode;
   75      }
   76   
   77      public String getFaultString()
   78      {
   79         return faultString;
   80      }
   81   
   82      public String getFaultActor()
   83      {
   84         return faultActor;
   85      }
   86   
   87      public Detail getDetail()
   88      {
   89         return faultDetail;
   90      }
   91   }

Home » xml-commons-external-1.4.01-src » javax » xml » rpc » soap » [javadoc | source]