[jboss-svn-commits] JBL Code SVN: r29457 - labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Sep 24 12:51:26 EDT 2009


Author: dward
Date: 2009-09-24 12:51:26 -0400 (Thu, 24 Sep 2009)
New Revision: 29457

Modified:
   labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxy.java
Log:
Fix for https://jira.jboss.org/jira/browse/JBESB-2853


Modified: labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxy.java
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxy.java	2009-09-24 15:08:45 UTC (rev 29456)
+++ labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/proxy/SOAPProxy.java	2009-09-24 16:51:26 UTC (rev 29457)
@@ -87,9 +87,9 @@
  * <i>Example of a basic auth + ssl scenario:</i><br/>
  * <pre>
  * &lt;action name="proxy" class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy"&gt;
- * &nbsp;&nbsp;&nbsp;&nbsp;&lt;property name="wsdl" value="https://localhost:8443/Quickstart_webservice_proxy_security/HelloWorldWS?wsdl"/&gt;
- * &nbsp;&nbsp;&nbsp;&nbsp;&lt;property name="endpointUrl" value="https://localhost:8443/Quickstart_webservice_proxy_security/HelloWorldWS"/&gt;
- * &nbsp;&nbsp;&nbsp;&nbsp;&lt;property name="file" value="/META-INF/httpclient-jbossws-8443.properties"/&gt;
+ * &nbsp;&nbsp;&nbsp;&nbsp;&lt;property name="wsdl" value="https://localhost:8443/webservice_proxy_security/HelloWorldWS?wsdl"/&gt;
+ * &nbsp;&nbsp;&nbsp;&nbsp;&lt;property name="endpointUrl" value="https://localhost:8443/webservice_proxy_security/HelloWorldWS"/&gt;
+ * &nbsp;&nbsp;&nbsp;&nbsp;&lt;property name="file" value="/META-INF/httpclient-8443.properties"/&gt;
  * &nbsp;&nbsp;&nbsp;&nbsp;&lt;property name="clientCredentialsRequired" value="true"/&gt;
  * &lt;/action&gt;
  * </pre>
@@ -267,11 +267,21 @@
 		InputSource is = null;
 		if (payload instanceof byte[])
 		{
-			is = new InputSource( new ByteArrayInputStream((byte[])payload) );
+			byte[] byte_payload = (byte[])payload;
+			if (byte_payload.length == 0)
+			{
+				throw new ActionProcessingException("message contains zero-length byte[] payload");
+			}
+			is = new InputSource( new ByteArrayInputStream(byte_payload) );
 		}
 		else if (payload instanceof String)
 		{
-			is = new InputSource( new StringReader((String)payload) );
+			String string_payload = (String)payload;
+			if (string_payload.length() == 0)
+			{
+				throw new ActionProcessingException("message contains zero-length String payload");
+			}
+			is = new InputSource( new StringReader(string_payload) );
 		}
 		else
 		{



More information about the jboss-svn-commits mailing list