Author: jason.greene(a)jboss.com
Date: 2007-03-08 11:07:14 -0500 (Thu, 08 Mar 2007)
New Revision: 2552
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java
Log:
Reject unknown protocols
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java 2007-03-08
15:59:39 UTC (rev 2551)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPFactoryImpl.java 2007-03-08
16:07:14 UTC (rev 2552)
@@ -56,12 +56,14 @@
envNamespace = SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE;
}
- public SOAPFactoryImpl(String protocol)
+ public SOAPFactoryImpl(String protocol) throws SOAPException
{
if (SOAPConstants.SOAP_1_2_PROTOCOL.equals(protocol))
envNamespace = SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE;
+ else if (SOAPConstants.SOAP_1_1_PROTOCOL.equals(protocol) ||
SOAPConstants.DYNAMIC_SOAP_PROTOCOL.equals(protocol))
+ envNamespace = SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE;
else
- envNamespace = SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE;
+ throw new SOAPException("Unsupported protocol: " + protocol);
}
@Override
Show replies by date