JBossWS SVN: r9278 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696: src/main/java/org/jboss/ws/core/jaxws/handler and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-02-10 12:18:22 -0500 (Tue, 10 Feb 2009)
New Revision: 9278
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSEntityResolver.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/tools/JavaToXSD.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/version.properties
Log:
[JBPAPP-1696] Each request results to an open file descriptor.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2009-02-10 17:07:03 UTC (rev 9277)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2009-02-10 17:18:22 UTC (rev 9278)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.core.jaxws.handler;
-// $Id: MessageContextImpl.java 275 2006-05-04 21:36:29Z jason.greene(a)jboss.com $
-
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.URL;
@@ -37,6 +37,7 @@
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
+import org.jboss.wsf.common.IOUtils;
import org.jboss.xb.binding.NamespaceRegistry;
import org.xml.sax.InputSource;
@@ -135,7 +136,9 @@
{
try
{
- InputSource inputSource = new InputSource(wsdlURL.openStream());
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IOUtils.copyStream(baos, wsdlURL.openStream()); // [JBWS-2325] ensure file descriptors are closed
+ InputSource inputSource = new InputSource(new ByteArrayInputStream(baos.toByteArray()));
put(MessageContext.WSDL_DESCRIPTION, inputSource);
}
catch (IOException ex)
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java 2009-02-10 17:07:03 UTC (rev 9277)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java 2009-02-10 17:18:22 UTC (rev 9278)
@@ -25,6 +25,7 @@
import java.io.BufferedReader;
import java.io.File;
+import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Constructor;
@@ -136,11 +137,12 @@
if (storeType == null)
storeType = "jks";
- KeyStore keyStore = null;
+ KeyStore keyStore = null;
+ InputStream stream = null;
try
{
log.debug("loadStore: " + storeURL);
- InputStream stream = storeURL.openStream();
+ stream = storeURL.openStream();
if (stream == null)
throw new WSSecurityException("Cannot load store from: " + storeURL);
@@ -166,6 +168,20 @@
{
throw new WSSecurityException("Problems loading " + type + ": " + ex.getMessage(), ex);
}
+ finally
+ {
+ if (stream != null)
+ {
+ try
+ {
+ stream.close();
+ }
+ catch (IOException ioe)
+ {
+ log.warn(ioe.getMessage(), ioe);
+ }
+ }
+ }
return keyStore;
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java 2009-02-10 17:07:03 UTC (rev 9277)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java 2009-02-10 17:18:22 UTC (rev 9278)
@@ -24,6 +24,7 @@
//$Id$
import java.io.IOException;
+import java.io.InputStream;
import java.net.URL;
import org.jboss.logging.Logger;
@@ -71,6 +72,7 @@
if(log.isDebugEnabled()) log.debug("parse: " + configURL);
Object wsConfig;
+ InputStream is = null;
try
{
Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
@@ -78,13 +80,14 @@
unmarshaller.setSchemaValidation(true);
String nsURI = getNamespaceURI(configURL);
+ is = configURL.openStream();
if (URN_JAXRPC_CONFIG.equals(nsURI))
{
- wsConfig = unmarshaller.unmarshal(configURL.openStream(), new OMFactoryJAXRPC(), null);
+ wsConfig = unmarshaller.unmarshal(is, new OMFactoryJAXRPC(), null);
}
else if (URN_JAXWS_CONFIG.equals(nsURI))
{
- wsConfig = unmarshaller.unmarshal(configURL.openStream(), new OMFactoryJAXWS(), null);
+ wsConfig = unmarshaller.unmarshal(is, new OMFactoryJAXWS(), null);
}
else
{
@@ -100,6 +103,20 @@
{
throw new WSException("Failed to read config file: " + configURL, e);
}
+ finally
+ {
+ if (is != null)
+ {
+ try
+ {
+ is.close();
+ }
+ catch (IOException ioe)
+ {
+ if(log.isDebugEnabled()) log.warn(ioe.getMessage(), ioe);
+ }
+ }
+ }
return wsConfig;
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSEntityResolver.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSEntityResolver.java 2009-02-10 17:07:03 UTC (rev 9277)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSEntityResolver.java 2009-02-10 17:18:22 UTC (rev 9278)
@@ -21,8 +21,9 @@
*/
package org.jboss.ws.metadata.wsdl.xmlschema;
-// $Id$
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@@ -36,6 +37,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.core.utils.ResourceURL;
+import org.jboss.wsf.common.IOUtils;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -157,15 +159,19 @@
private XMLInputSource getXMLInputSource(URL url, XMLResourceIdentifier resId) throws IOException
{
- InputStream inputStream = new ResourceURL(url).openStream();
- InputSource inputSource = new InputSource(inputStream);
+ InputStream urlStream = new ResourceURL(url).openStream();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IOUtils.copyStream(baos, urlStream); // [JBWS-2325]
+ InputSource inputSource = new InputSource(new ByteArrayInputStream(baos.toByteArray()));
return getXMLInputSource(inputSource, resId);
}
- private XMLInputSource getXMLInputSource(InputSource inputSource, XMLResourceIdentifier resId)
+ private XMLInputSource getXMLInputSource(InputSource inputSource, XMLResourceIdentifier resId) throws IOException
{
String encoding = inputSource.getEncoding();
- InputStream byteStream = inputSource.getByteStream();
- return new XMLInputSource(resId.getPublicId(), resId.getExpandedSystemId(), resId.getBaseSystemId(), byteStream, encoding);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IOUtils.copyStream(baos, inputSource.getByteStream()); // [JBWS-2325]
+ InputStream is = new ByteArrayInputStream(baos.toByteArray());
+ return new XMLInputSource(resId.getPublicId(), resId.getExpandedSystemId(), resId.getBaseSystemId(), is, encoding);
}
}
\ No newline at end of file
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/tools/JavaToXSD.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/tools/JavaToXSD.java 2009-02-10 17:07:03 UTC (rev 9277)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/tools/JavaToXSD.java 2009-02-10 17:18:22 UTC (rev 9278)
@@ -165,6 +165,7 @@
Iterator<String> it = locs.keySet().iterator();
while (it.hasNext())
{
+ InputStream in = null;
try
{
String nsURI = it.next();
@@ -176,7 +177,7 @@
XMLInputSource inputSource = new XMLInputSource(null, url.toExternalForm(), null);
InputSource tmpSrc = resolver.resolveEntity(null, url.toExternalForm());
- InputStream in = tmpSrc.getByteStream() != null ? tmpSrc.getByteStream() : new ResourceURL(url).openStream();
+ in = tmpSrc.getByteStream() != null ? tmpSrc.getByteStream() : new ResourceURL(url).openStream();
inputSource.setByteStream(in);
SchemaGrammar grammar = (SchemaGrammar)loader.loadGrammar(inputSource);
@@ -193,6 +194,20 @@
{
throw new IllegalStateException("Cannot parse schema", ex);
}
+ finally
+ {
+ if (in != null)
+ {
+ try
+ {
+ in.close();
+ }
+ catch (IOException ioe)
+ {
+ log.warn(ioe.getMessage(), ioe);
+ }
+ }
+ }
}
XSModel xsmodel = new XSModelImpl(gs);
@@ -242,46 +257,4 @@
helper.setWsdlStyle(style);
}
- //******************************************************************
- // PRIVATE METHODS
- //******************************************************************
-
- /**
- * FIXME: JBXB-33
- */
- private SchemaBindingResolver getSchemaBindingResolver(final Map<String, URL> map)
- {
- return new SchemaBindingResolver()
- {
- public String getBaseURI()
- {
- throw new UnsupportedOperationException("getBaseURI is not implemented.");
- }
-
- public void setBaseURI(String baseURI)
- {
- throw new UnsupportedOperationException("setBaseURI is not implemented.");
- }
-
- public SchemaBinding resolve(String nsUri, String baseURI, String schemaLocation)
- {
- throw new UnsupportedOperationException("resolve is not implemented.");
- }
-
- public LSInput resolveAsLSInput(String nsUri, String baseUri, String schemaLocation)
- {
- URL url = map.get(nsUri);
- if (url != null)
- try
- {
- return new LSInputAdaptor(url.openStream(), null);
- }
- catch (IOException e)
- {
- log.error("URL is bad for schema parsing");
- }
- return null;
- }
- };
- }
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2009-02-10 17:07:03 UTC (rev 9277)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2009-02-10 17:18:22 UTC (rev 9278)
@@ -137,8 +137,14 @@
appendDefinitions(builder, namespace);
appendBody(builder, namespace);
- writeBuilder(builder, resolved.writer, resolved.charset);
- resolved.writer.close();
+ try
+ {
+ writeBuilder(builder, resolved.writer, resolved.charset);
+ }
+ finally
+ {
+ resolved.writer.close();
+ }
}
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2009-02-10 17:07:03 UTC (rev 9277)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2009-02-10 17:18:22 UTC (rev 9278)
@@ -187,7 +187,7 @@
ClassLoader classLoader = endpoint.getService().getDeployment().getRuntimeClassLoader();
if (classLoader == null)
throw new IllegalStateException("Deployment has no classloader associated");
-
+
// Set the thread context class loader
ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(classLoader);
@@ -204,7 +204,7 @@
{
// Reset the thread context class loader
Thread.currentThread().setContextClassLoader(ctxClassLoader);
-
+
try
{
out.close();
@@ -232,7 +232,7 @@
throw new IllegalStateException("Cannot obtain endpoint meta data");
Type type = sepMetaData.getType();
-
+
// Build the message context
CommonMessageContext msgContext;
if (type == EndpointMetaData.Type.JAXRPC)
@@ -254,12 +254,12 @@
if (invContext instanceof ServletRequestContext)
{
ServletRequestContext reqContext = (ServletRequestContext)invContext;
-
+
ServletContext servletContext = reqContext.getServletContext();
HttpServletRequest httpRequest = reqContext.getHttpServletRequest();
httpResponse = reqContext.getHttpServletResponse();
headerSource = new ServletHeaderSource(httpRequest, httpResponse);
-
+
if (type == EndpointMetaData.Type.JAXRPC)
{
msgContext.put(MessageContextJAXRPC.SERVLET_CONTEXT, servletContext);
@@ -363,8 +363,7 @@
/**
* Handle a request to this web service endpoint
*/
- private MessageAbstraction processRequest(Endpoint ep, MimeHeaderSource headerSource, InvocationContext reqContext, InputStream inputStream)
- throws BindingException
+ private MessageAbstraction processRequest(Endpoint ep, MimeHeaderSource headerSource, InvocationContext reqContext, InputStream inputStream) throws BindingException
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
@@ -482,11 +481,11 @@
private long initRequestMetrics(Endpoint endpoint)
{
long beginTime = 0;
-
+
EndpointMetrics metrics = endpoint.getEndpointMetrics();
if (metrics != null)
beginTime = metrics.processRequestMessage();
-
+
return beginTime;
}
@@ -550,7 +549,7 @@
if (ServerConfig.UNDEFINED_HOSTNAME.equals(serverConfig.getWebServiceHost()) == false)
wsdlHost = serverConfig.getWebServiceHost();
-
+
log.debug("WSDL request, using host: " + wsdlHost);
WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(epMetaData);
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2009-02-10 17:07:03 UTC (rev 9277)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2009-02-10 17:18:22 UTC (rev 9278)
@@ -105,9 +105,10 @@
wsdlFile.getParentFile().mkdirs();
// Get the wsdl definition and write it to the wsdl publish location
+ Writer fWriter = null;
try
{
- Writer fWriter = IOUtils.getCharsetFileWriter(wsdlFile, Constants.DEFAULT_XML_CHARSET);
+ fWriter = IOUtils.getCharsetFileWriter(wsdlFile, Constants.DEFAULT_XML_CHARSET);
WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
new WSDLWriter(wsdlDefinitions).write(fWriter, Constants.DEFAULT_XML_CHARSET);
@@ -141,6 +142,13 @@
{
throw new WSException("Cannot publish wsdl to: " + wsdlFile, e);
}
+ finally
+ {
+ if (fWriter != null)
+ {
+ fWriter.close();
+ }
+ }
}
}
@@ -245,15 +253,21 @@
if (is == null)
throw new IllegalArgumentException("Cannot find schema import in deployment: " + resourcePath);
- FileOutputStream fos = new FileOutputStream(targetFile);
- IOUtils.copyStream(fos, is);
- fos.close();
- is.close();
+ FileOutputStream fos = null;
+ try
+ {
+ fos = new FileOutputStream(targetFile);
+ IOUtils.copyStream(fos, is);
+ }
+ finally
+ {
+ if (fos != null) fos.close();
+ }
if (log.isDebugEnabled())
log.debug("XMLSchema import published to: " + xsdURL);
- // recursivly publish imports
+ // recursively publish imports
Element subdoc = DOMUtils.parse(xsdURL.openStream());
publishSchemaImports(xsdURL, subdoc, published);
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/version.properties
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/version.properties 2009-02-10 17:07:03 UTC (rev 9277)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/version.properties 2009-02-10 17:18:22 UTC (rev 9278)
@@ -5,8 +5,8 @@
specification.vendor=JBoss (http://www.jboss.org)
specification.version=jbossws-2.0
-version.id=2.0.1.SP2_CP04
-repository.id=2.0.1.SP2_CP04
+version.id=2.0.1.SP2_CP04_JBPAPP-1696
+repository.id=2.0.1.SP2_CP04_JBPAPP-1696
implementation.title=JBoss Web Services - Native
implementation.url=http://www.jboss.org/products/jbossws
@@ -25,7 +25,7 @@
# Dependend integration projects
jbossws-spi=1.0.0.GA_CP01-brew
-jbossws-common=1.0.0.GA_CP02-brew
+jbossws-common=1.0.0.GA_CP02_JBPAPP-1696
jbossws-framework=2.0.1.GA_CP02-brew
jbossws-jboss40=2.0.1.GA
jbossws-jboss42=2.0.1.GA_CP01
15 years, 11 months
JBossWS SVN: r9277 - in common/branches/jbossws-common-1.0.0.GA_CP02_JBPAPP-1696: src/main/java/org/jboss/wsf/common and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-02-10 12:07:03 -0500 (Tue, 10 Feb 2009)
New Revision: 9277
Modified:
common/branches/jbossws-common-1.0.0.GA_CP02_JBPAPP-1696/src/main/java/org/jboss/wsf/common/DOMUtils.java
common/branches/jbossws-common-1.0.0.GA_CP02_JBPAPP-1696/version.properties
Log:
[JBPAPP-1696] Each request results to an open file descriptor.
Modified: common/branches/jbossws-common-1.0.0.GA_CP02_JBPAPP-1696/src/main/java/org/jboss/wsf/common/DOMUtils.java
===================================================================
--- common/branches/jbossws-common-1.0.0.GA_CP02_JBPAPP-1696/src/main/java/org/jboss/wsf/common/DOMUtils.java 2009-02-10 16:55:27 UTC (rev 9276)
+++ common/branches/jbossws-common-1.0.0.GA_CP02_JBPAPP-1696/src/main/java/org/jboss/wsf/common/DOMUtils.java 2009-02-10 17:07:03 UTC (rev 9277)
@@ -161,6 +161,10 @@
{
throw new IOException(e.toString());
}
+ finally
+ {
+ xmlStream.close();
+ }
}
/** Parse the given input source and return the root Element
@@ -177,6 +181,19 @@
{
throw new IOException(e.toString());
}
+ finally
+ {
+ InputStream is = source.getByteStream();
+ if (is != null)
+ {
+ is.close();
+ }
+ Reader r = source.getCharacterStream();
+ if (r != null)
+ {
+ r.close();
+ }
+ }
}
/** Create an Element for a given name
Modified: common/branches/jbossws-common-1.0.0.GA_CP02_JBPAPP-1696/version.properties
===================================================================
--- common/branches/jbossws-common-1.0.0.GA_CP02_JBPAPP-1696/version.properties 2009-02-10 16:55:27 UTC (rev 9276)
+++ common/branches/jbossws-common-1.0.0.GA_CP02_JBPAPP-1696/version.properties 2009-02-10 17:07:03 UTC (rev 9277)
@@ -5,8 +5,8 @@
specification.vendor=JBoss (http://www.jboss.org)
specification.version=jbossws-2.0
-version.id=1.0.0.GA_CP02
-repository.id=1.0.0.GA_CP02
+version.id=1.0.0.GA_CP02_JBPAPP-1696
+repository.id=1.0.0.GA_CP02_JBPAPP-1696
implementation.title=JBoss Web Services - Common
implementation.url=http://www.jboss.org/products/jbossws
15 years, 11 months
JBossWS SVN: r9276 - common/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-02-10 11:55:27 -0500 (Tue, 10 Feb 2009)
New Revision: 9276
Added:
common/branches/jbossws-common-1.0.0.GA_CP02_JBPAPP-1696/
Log:
[JBPAPP-1696] Branch for patch.
Copied: common/branches/jbossws-common-1.0.0.GA_CP02_JBPAPP-1696 (from rev 9275, common/tags/jbossws-common-1.0.0.GA_CP02)
15 years, 11 months
JBossWS SVN: r9275 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-02-10 11:54:23 -0500 (Tue, 10 Feb 2009)
New Revision: 9275
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/
Log:
[JBPAPP-1696] Branch for patch.
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696 (from rev 9274, stack/native/tags/jbossws-native-2.0.1.SP2_CP04)
15 years, 11 months
JBossWS SVN: r9274 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-02-10 11:52:26 -0500 (Tue, 10 Feb 2009)
New Revision: 9274
Removed:
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/
Log:
Delete to re-create
15 years, 11 months
JBossWS SVN: r9273 - stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-02-10 11:33:51 -0500 (Tue, 10 Feb 2009)
New Revision: 9273
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/jbossws-common-1.0.0.GA_CP02/
Log:
[JBPAPP-1696] Branch for patch.
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/jbossws-common-1.0.0.GA_CP02 (from rev 9272, common/tags/jbossws-common-1.0.0.GA_CP02)
15 years, 11 months
JBossWS SVN: r9272 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-02-10 11:27:12 -0500 (Tue, 10 Feb 2009)
New Revision: 9272
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696/
Log:
[JBPAPP-1696] Branch for patch.
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP04_JBPAPP-1696 (from rev 9271, stack/native/tags/jbossws-native-2.0.1.SP2_CP04)
15 years, 11 months
JBossWS SVN: r9271 - stack/native/branches/dlofthouse.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-02-09 09:01:22 -0500 (Mon, 09 Feb 2009)
New Revision: 9271
Removed:
stack/native/branches/dlofthouse/JBPAPP-1687/
Log:
Working area no longer required.
15 years, 11 months
JBossWS SVN: r9270 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP: src/main/java/org/jboss/ws/core/jaxws/handler and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-02-09 09:00:57 -0500 (Mon, 09 Feb 2009)
New Revision: 9270
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSEntityResolver.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/JavaToXSD.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties
Log:
[JBPAPP-1687] Each request results to an open file descriptor.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2009-02-09 12:47:28 UTC (rev 9269)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2009-02-09 14:00:57 UTC (rev 9270)
@@ -21,8 +21,8 @@
*/
package org.jboss.ws.core.jaxws.handler;
-// $Id: MessageContextImpl.java 275 2006-05-04 21:36:29Z jason.greene(a)jboss.com $
-
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.URL;
@@ -37,6 +37,7 @@
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
+import org.jboss.wsf.common.IOUtils;
import org.jboss.xb.binding.NamespaceRegistry;
import org.xml.sax.InputSource;
@@ -135,7 +136,9 @@
{
try
{
- InputSource inputSource = new InputSource(wsdlURL.openStream());
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IOUtils.copyStream(baos, wsdlURL.openStream()); // [JBWS-2325] ensure file descriptors are closed
+ InputSource inputSource = new InputSource(new ByteArrayInputStream(baos.toByteArray()));
put(MessageContext.WSDL_DESCRIPTION, inputSource);
}
catch (IOException ex)
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java 2009-02-09 12:47:28 UTC (rev 9269)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java 2009-02-09 14:00:57 UTC (rev 9270)
@@ -25,6 +25,7 @@
import java.io.BufferedReader;
import java.io.File;
+import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Constructor;
@@ -136,11 +137,12 @@
if (storeType == null)
storeType = "jks";
- KeyStore keyStore = null;
+ KeyStore keyStore = null;
+ InputStream stream = null;
try
{
log.debug("loadStore: " + storeURL);
- InputStream stream = storeURL.openStream();
+ stream = storeURL.openStream();
if (stream == null)
throw new WSSecurityException("Cannot load store from: " + storeURL);
@@ -166,6 +168,20 @@
{
throw new WSSecurityException("Problems loading " + type + ": " + ex.getMessage(), ex);
}
+ finally
+ {
+ if (stream != null)
+ {
+ try
+ {
+ stream.close();
+ }
+ catch (IOException ioe)
+ {
+ log.warn(ioe.getMessage(), ioe);
+ }
+ }
+ }
return keyStore;
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java 2009-02-09 12:47:28 UTC (rev 9269)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java 2009-02-09 14:00:57 UTC (rev 9270)
@@ -24,6 +24,7 @@
//$Id$
import java.io.IOException;
+import java.io.InputStream;
import java.net.URL;
import org.jboss.logging.Logger;
@@ -71,6 +72,7 @@
if(log.isDebugEnabled()) log.debug("parse: " + configURL);
Object wsConfig;
+ InputStream is = null;
try
{
Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
@@ -78,13 +80,14 @@
unmarshaller.setSchemaValidation(true);
String nsURI = getNamespaceURI(configURL);
+ is = configURL.openStream();
if (URN_JAXRPC_CONFIG.equals(nsURI))
{
- wsConfig = unmarshaller.unmarshal(configURL.openStream(), new OMFactoryJAXRPC(), null);
+ wsConfig = unmarshaller.unmarshal(is, new OMFactoryJAXRPC(), null);
}
else if (URN_JAXWS_CONFIG.equals(nsURI))
{
- wsConfig = unmarshaller.unmarshal(configURL.openStream(), new OMFactoryJAXWS(), null);
+ wsConfig = unmarshaller.unmarshal(is, new OMFactoryJAXWS(), null);
}
else
{
@@ -100,6 +103,20 @@
{
throw new WSException("Failed to read config file: " + configURL, e);
}
+ finally
+ {
+ if (is != null)
+ {
+ try
+ {
+ is.close();
+ }
+ catch (IOException ioe)
+ {
+ if(log.isDebugEnabled()) log.warn(ioe.getMessage(), ioe);
+ }
+ }
+ }
return wsConfig;
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSEntityResolver.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSEntityResolver.java 2009-02-09 12:47:28 UTC (rev 9269)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSEntityResolver.java 2009-02-09 14:00:57 UTC (rev 9270)
@@ -21,8 +21,9 @@
*/
package org.jboss.ws.metadata.wsdl.xmlschema;
-// $Id$
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@@ -36,6 +37,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.core.utils.ResourceURL;
+import org.jboss.wsf.common.IOUtils;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -157,15 +159,19 @@
private XMLInputSource getXMLInputSource(URL url, XMLResourceIdentifier resId) throws IOException
{
- InputStream inputStream = new ResourceURL(url).openStream();
- InputSource inputSource = new InputSource(inputStream);
+ InputStream urlStream = new ResourceURL(url).openStream();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IOUtils.copyStream(baos, urlStream); // [JBWS-2325]
+ InputSource inputSource = new InputSource(new ByteArrayInputStream(baos.toByteArray()));
return getXMLInputSource(inputSource, resId);
}
- private XMLInputSource getXMLInputSource(InputSource inputSource, XMLResourceIdentifier resId)
+ private XMLInputSource getXMLInputSource(InputSource inputSource, XMLResourceIdentifier resId) throws IOException
{
String encoding = inputSource.getEncoding();
- InputStream byteStream = inputSource.getByteStream();
- return new XMLInputSource(resId.getPublicId(), resId.getExpandedSystemId(), resId.getBaseSystemId(), byteStream, encoding);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IOUtils.copyStream(baos, inputSource.getByteStream()); // [JBWS-2325]
+ InputStream is = new ByteArrayInputStream(baos.toByteArray());
+ return new XMLInputSource(resId.getPublicId(), resId.getExpandedSystemId(), resId.getBaseSystemId(), is, encoding);
}
}
\ No newline at end of file
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/JavaToXSD.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/JavaToXSD.java 2009-02-09 12:47:28 UTC (rev 9269)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/JavaToXSD.java 2009-02-09 14:00:57 UTC (rev 9270)
@@ -165,6 +165,7 @@
Iterator<String> it = locs.keySet().iterator();
while (it.hasNext())
{
+ InputStream in = null;
try
{
String nsURI = it.next();
@@ -176,7 +177,7 @@
XMLInputSource inputSource = new XMLInputSource(null, url.toExternalForm(), null);
InputSource tmpSrc = resolver.resolveEntity(null, url.toExternalForm());
- InputStream in = tmpSrc.getByteStream() != null ? tmpSrc.getByteStream() : new ResourceURL(url).openStream();
+ in = tmpSrc.getByteStream() != null ? tmpSrc.getByteStream() : new ResourceURL(url).openStream();
inputSource.setByteStream(in);
SchemaGrammar grammar = (SchemaGrammar)loader.loadGrammar(inputSource);
@@ -193,6 +194,20 @@
{
throw new IllegalStateException("Cannot parse schema", ex);
}
+ finally
+ {
+ if (in != null)
+ {
+ try
+ {
+ in.close();
+ }
+ catch (IOException ioe)
+ {
+ log.warn(ioe.getMessage(), ioe);
+ }
+ }
+ }
}
XSModel xsmodel = new XSModelImpl(gs);
@@ -242,46 +257,4 @@
helper.setWsdlStyle(style);
}
- //******************************************************************
- // PRIVATE METHODS
- //******************************************************************
-
- /**
- * FIXME: JBXB-33
- */
- private SchemaBindingResolver getSchemaBindingResolver(final Map<String, URL> map)
- {
- return new SchemaBindingResolver()
- {
- public String getBaseURI()
- {
- throw new UnsupportedOperationException("getBaseURI is not implemented.");
- }
-
- public void setBaseURI(String baseURI)
- {
- throw new UnsupportedOperationException("setBaseURI is not implemented.");
- }
-
- public SchemaBinding resolve(String nsUri, String baseURI, String schemaLocation)
- {
- throw new UnsupportedOperationException("resolve is not implemented.");
- }
-
- public LSInput resolveAsLSInput(String nsUri, String baseUri, String schemaLocation)
- {
- URL url = map.get(nsUri);
- if (url != null)
- try
- {
- return new LSInputAdaptor(url.openStream(), null);
- }
- catch (IOException e)
- {
- log.error("URL is bad for schema parsing");
- }
- return null;
- }
- };
- }
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2009-02-09 12:47:28 UTC (rev 9269)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2009-02-09 14:00:57 UTC (rev 9270)
@@ -137,8 +137,14 @@
appendDefinitions(builder, namespace);
appendBody(builder, namespace);
- writeBuilder(builder, resolved.writer, resolved.charset);
- resolved.writer.close();
+ try
+ {
+ writeBuilder(builder, resolved.writer, resolved.charset);
+ }
+ finally
+ {
+ resolved.writer.close();
+ }
}
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2009-02-09 12:47:28 UTC (rev 9269)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2009-02-09 14:00:57 UTC (rev 9270)
@@ -186,7 +186,7 @@
ClassLoader classLoader = endpoint.getService().getDeployment().getRuntimeClassLoader();
if (classLoader == null)
throw new IllegalStateException("Deployment has no classloader associated");
-
+
// Set the thread context class loader
ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(classLoader);
@@ -203,7 +203,7 @@
{
// Reset the thread context class loader
Thread.currentThread().setContextClassLoader(ctxClassLoader);
-
+
try
{
out.close();
@@ -231,7 +231,7 @@
throw new IllegalStateException("Cannot obtain endpoint meta data");
Type type = sepMetaData.getType();
-
+
// Build the message context
CommonMessageContext msgContext;
if (type == EndpointMetaData.Type.JAXRPC)
@@ -253,12 +253,12 @@
if (invContext instanceof ServletRequestContext)
{
ServletRequestContext reqContext = (ServletRequestContext)invContext;
-
+
ServletContext servletContext = reqContext.getServletContext();
HttpServletRequest httpRequest = reqContext.getHttpServletRequest();
httpResponse = reqContext.getHttpServletResponse();
headerSource = new ServletHeaderSource(httpRequest, httpResponse);
-
+
if (type == EndpointMetaData.Type.JAXRPC)
{
msgContext.put(MessageContextJAXRPC.SERVLET_CONTEXT, servletContext);
@@ -361,8 +361,7 @@
/**
* Handle a request to this web service endpoint
*/
- private MessageAbstraction processRequest(Endpoint ep, MimeHeaderSource headerSource, InvocationContext reqContext, InputStream inputStream)
- throws BindingException
+ private MessageAbstraction processRequest(Endpoint ep, MimeHeaderSource headerSource, InvocationContext reqContext, InputStream inputStream) throws BindingException
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
@@ -480,11 +479,11 @@
private long initRequestMetrics(Endpoint endpoint)
{
long beginTime = 0;
-
+
EndpointMetrics metrics = endpoint.getEndpointMetrics();
if (metrics != null)
beginTime = metrics.processRequestMessage();
-
+
return beginTime;
}
@@ -548,7 +547,7 @@
if (ServerConfig.UNDEFINED_HOSTNAME.equals(serverConfig.getWebServiceHost()) == false)
wsdlHost = serverConfig.getWebServiceHost();
-
+
log.debug("WSDL request, using host: " + wsdlHost);
WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(epMetaData);
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2009-02-09 12:47:28 UTC (rev 9269)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/wsf/stack/jbws/WSDLFilePublisher.java 2009-02-09 14:00:57 UTC (rev 9270)
@@ -105,9 +105,10 @@
wsdlFile.getParentFile().mkdirs();
// Get the wsdl definition and write it to the wsdl publish location
+ Writer fWriter = null;
try
{
- Writer fWriter = IOUtils.getCharsetFileWriter(wsdlFile, Constants.DEFAULT_XML_CHARSET);
+ fWriter = IOUtils.getCharsetFileWriter(wsdlFile, Constants.DEFAULT_XML_CHARSET);
WSDLDefinitions wsdlDefinitions = serviceMetaData.getWsdlDefinitions();
new WSDLWriter(wsdlDefinitions).write(fWriter, Constants.DEFAULT_XML_CHARSET);
@@ -141,6 +142,13 @@
{
throw new WSException("Cannot publish wsdl to: " + wsdlFile, e);
}
+ finally
+ {
+ if (fWriter != null)
+ {
+ fWriter.close();
+ }
+ }
}
}
@@ -245,15 +253,21 @@
if (is == null)
throw new IllegalArgumentException("Cannot find schema import in deployment: " + resourcePath);
- FileOutputStream fos = new FileOutputStream(targetFile);
- IOUtils.copyStream(fos, is);
- fos.close();
- is.close();
+ FileOutputStream fos = null;
+ try
+ {
+ fos = new FileOutputStream(targetFile);
+ IOUtils.copyStream(fos, is);
+ }
+ finally
+ {
+ if (fos != null) fos.close();
+ }
if (log.isDebugEnabled())
log.debug("XMLSchema import published to: " + xsdURL);
- // recursivly publish imports
+ // recursively publish imports
Element subdoc = DOMUtils.parse(xsdURL.openStream());
publishSchemaImports(xsdURL, subdoc, published);
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties 2009-02-09 12:47:28 UTC (rev 9269)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties 2009-02-09 14:00:57 UTC (rev 9270)
@@ -25,7 +25,7 @@
# Dependend integration projects
jbossws-spi=1.0.0.GA_CP01-brew
-jbossws-common=1.0.0.GA_CP03-brew
+jbossws-common=1.0.0.GA_CP-SNAPSHOT
jbossws-framework=2.0.1.GA_CP03-brew
jbossws-jboss40=2.0.1.GA
jbossws-jboss42=2.0.1.GA_CP01
15 years, 11 months
JBossWS SVN: r9269 - stack/native/branches/dlofthouse/JBPAPP-1687/src/main/java/org/jboss/wsf/stack/jbws.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2009-02-09 07:47:28 -0500 (Mon, 09 Feb 2009)
New Revision: 9269
Modified:
stack/native/branches/dlofthouse/JBPAPP-1687/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
Log:
Merge revision 8845
Modified: stack/native/branches/dlofthouse/JBPAPP-1687/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
--- stack/native/branches/dlofthouse/JBPAPP-1687/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2009-02-09 12:40:50 UTC (rev 9268)
+++ stack/native/branches/dlofthouse/JBPAPP-1687/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2009-02-09 12:47:28 UTC (rev 9269)
@@ -330,17 +330,6 @@
// clear thread local storage
ThreadLocalAssociation.clear();
- try
- {
- if (outStream != null)
- {
- outStream.close();
- }
- }
- catch (IOException ex)
- {
- WSException.rethrow(ex);
- }
}
}
@@ -365,14 +354,7 @@
}
else
{
- try
- {
- resMessage.writeTo(outputStream);
- }
- finally
- {
- outputStream.close();
- }
+ resMessage.writeTo(outputStream);
}
}
@@ -582,17 +564,6 @@
{
throw new WSException(ex);
}
- finally
- {
- try
- {
- outputStream.close();
- }
- catch (IOException ioe)
- {
- throw new WSException(ioe);
- }
- }
}
private void handleException(Exception ex) throws ServletException
15 years, 11 months