You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2002/03/25 15:14:55 UTC

cvs commit: xml-axis/java/src/org/apache/axis/message SOAPEnvelope.java

gdaniels    02/03/25 06:14:55

  Modified:    java/src/org/apache/axis/message SOAPEnvelope.java
  Log:
  Envelope constructor which parses data might throw a SAXException.
  Reflect this in the signature instead of throwing an uncaught
  RuntimeException.
  
  Revision  Changes    Path
  1.60      +8 -13     xml-axis/java/src/org/apache/axis/message/SOAPEnvelope.java
  
  Index: SOAPEnvelope.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/SOAPEnvelope.java,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- SOAPEnvelope.java	25 Mar 2002 04:44:02 -0000	1.59
  +++ SOAPEnvelope.java	25 Mar 2002 14:14:55 -0000	1.60
  @@ -71,6 +71,7 @@
   import org.apache.commons.logging.LogFactory;
   
   import org.xml.sax.InputSource;
  +import org.xml.sax.SAXException;
   import org.xml.sax.helpers.AttributesImpl;
   
   import javax.xml.rpc.namespace.QName;
  @@ -127,20 +128,14 @@
           setDirty(true);
       }
   
  -    public SOAPEnvelope(InputStream input) {
  -        try {
  -            InputSource is = new InputSource(input);
  -            DeserializationContext dser = null ;
  -            AxisClient     tmpEngine = new AxisClient(new NullProvider());
  -            MessageContext msgContext = new MessageContext(tmpEngine);
  -            dser = new DeserializationContextImpl(is, msgContext,
  +    public SOAPEnvelope(InputStream input) throws SAXException {
  +        InputSource is = new InputSource(input);
  +        DeserializationContext dser = null ;
  +        AxisClient     tmpEngine = new AxisClient(new NullProvider());
  +        MessageContext msgContext = new MessageContext(tmpEngine);
  +        dser = new DeserializationContextImpl(is, msgContext,
                                                 Message.REQUEST, this );
  -            dser.parse();
  -        }
  -        catch( Exception e ) {
  -            log.error(JavaUtils.getMessage("exception00"), e);
  -            throw new RuntimeException( e.toString() );
  -        }
  +        dser.parse();
       }
       
       public String getMessageType()