Author: jason.greene(a)jboss.com
Date: 2007-03-05 23:44:30 -0500 (Mon, 05 Mar 2007)
New Revision: 2531
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
Log:
Fix JBCTS-437
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2007-03-06
01:24:43 UTC (rev 2530)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2007-03-06
04:44:30 UTC (rev 2531)
@@ -64,18 +64,24 @@
private Mode serviceMode;
// The style used by this MessageFactory
private Style style;
+ // Used if the style is dynamic
+ private boolean dynamic;
public MessageFactoryImpl()
{
envNamespace = SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE;
}
- public MessageFactoryImpl(String protocol)
+ public MessageFactoryImpl(String protocol) throws SOAPException
{
- if (SOAPConstants.SOAP_1_2_PROTOCOL.equals(protocol))
+ if (SOAPConstants.SOAP_1_1_PROTOCOL.equals(protocol) ||
SOAPConstants.DEFAULT_SOAP_PROTOCOL.equals(protocol))
+ envNamespace = SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE;
+ else if (SOAPConstants.SOAP_1_2_PROTOCOL.equals(protocol))
envNamespace = SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE;
+ else if (SOAPConstants.DYNAMIC_SOAP_PROTOCOL.equals(protocol))
+ dynamic = true;
else
- envNamespace = SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE;
+ throw new SOAPException("Unknown protocol: " + protocol);
}
/**
@@ -144,6 +150,9 @@
*/
public SOAPMessage createMessage() throws SOAPException
{
+ if (dynamic)
+ throw new UnsupportedOperationException();
+
SOAPMessageImpl soapMessage = new SOAPMessageImpl();
SOAPPartImpl soapPart = (SOAPPartImpl)soapMessage.getSOAPPart();
new SOAPEnvelopeImpl(soapPart, envNamespace);
Show replies by date