cvs commit: jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/util WSDLHelper.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

cvs commit: jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/util WSDLHelper.java

sebb-3
sebb        2005/06/15 15:10:12

  Modified:    src/protocol/http/org/apache/jmeter/protocol/http/util
                        WSDLHelper.java
  Log:
  Check for more specific exceptions; ensure close is always called
 
  Revision  Changes    Path
  1.11      +13 -7     jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java
 
  Index: WSDLHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/util/WSDLHelper.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- WSDLHelper.java 1 Jun 2005 01:28:43 -0000 1.10
  +++ WSDLHelper.java 15 Jun 2005 22:10:12 -0000 1.11
  @@ -120,7 +120,7 @@
               for (int idx = 0; idx < ports.getLength(); idx++)
               {
                   Element pnode = (Element) ports.item(idx);
  -                String portname = pnode.getAttribute("name");
  +                String portname = pnode.getAttribute("name");//TODO - why not used?
                   // used to check binding, but now it doesn't. it was
                   // failing when wsdl did not using binding as expected
                   NodeList servlist =
  @@ -179,9 +179,9 @@
       {
           try
           {
  -            CONN.getInputStream().close();
  +            if (CONN != null) CONN.getInputStream().close();
           }
  -        catch (Exception exception)
  +        catch (IOException exception)
           {
               // do nothing
           }
  @@ -227,15 +227,21 @@
               this.connect();
               this.buildDocument();
               SOAPOPS = this.getOperations();
  -            this.close();
           }
           catch (IOException exception)
           {
               throw (new WSDLException(exception));
           }
  -        catch (Exception exception)
  +        catch (SAXException exception)
           {
               throw (new WSDLException(exception));
  +        }
  +        catch (ParserConfigurationException exception) {
  +            throw (new WSDLException(exception));
  +        }
  +        finally
  +        {
  +            this.close();            
           }
       }
   
 
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]