Author: thomas.diesler(a)jboss.com
Date: 2007-03-21 18:06:51 -0400 (Wed, 21 Mar 2007)
New Revision: 2657
Modified:
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/Constants.java
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
Log:
Fix missing soap-env:encodingStyle
Modified: branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/Constants.java
===================================================================
--- branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/Constants.java 2007-03-21
20:50:59 UTC (rev 2656)
+++ branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/Constants.java 2007-03-21
22:06:51 UTC (rev 2657)
@@ -54,6 +54,8 @@
static final String NS_SCHEMA_XSD = "http://www.w3.org/2001/XMLSchema";
/** XMLSchema instance namespace
http://www.w3.org/2001/XMLSchema-instance */
static final String NS_SCHEMA_XSI =
"http://www.w3.org/2001/XMLSchema-instance";
+ /** SOAP encoding namespace
http://schemas.xmlsoap.org/soap/encoding/ */
+ static final String NS_SOAP_ENCODING =
"http://schemas.xmlsoap.org/soap/encoding/";
/** SOAP-1.1 namespace
http://schemas.xmlsoap.org/wsdl/soap/ */
static final String NS_SOAP11 = "http://schemas.xmlsoap.org/wsdl/soap/";
/** SOAP-1.1 envelope namespace
http://schemas.xmlsoap.org/soap/envelope/ */
Modified:
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
---
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-03-21
20:50:59 UTC (rev 2656)
+++
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-03-21
22:06:51 UTC (rev 2657)
@@ -52,6 +52,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.jaxrpc.Use;
import org.jboss.ws.core.jaxrpc.binding.BindingException;
import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
@@ -168,8 +169,17 @@
if (log.isDebugEnabled())
log.debug("Create RPC body element: " + opName);
+
soapBodyElement = new SOAPBodyElementRpc(opName);
soapBodyElement =
(SOAPBodyElement)soapBody.addChildElement(soapBodyElement);
+
+ // Add soap encodingStyle
+ if (opMetaData.getUse() == Use.ENCODED)
+ {
+ String envURI = soapEnvelope.getNamespaceURI();
+ String envPrefix = soapEnvelope.getPrefix();
+ soapBodyElement.setAttributeNS(envURI, envPrefix +
":encodingStyle", Constants.NS_SOAP_ENCODING);
+ }
}
for (ParameterMetaData paramMetaData : opMetaData.getInputParameters())
@@ -380,7 +390,16 @@
Name opName = new NameImpl(namespaceRegistry.registerQName(opQName));
soapBodyElement = new SOAPBodyElementRpc(opName);
soapBodyElement =
(SOAPBodyElement)soapBody.addChildElement(soapBodyElement);
+
+ // Add soap encodingStyle
+ if (opMetaData.getUse() == Use.ENCODED)
+ {
+ String envURI = soapEnvelope.getNamespaceURI();
+ String envPrefix = soapEnvelope.getPrefix();
+ soapBodyElement.setAttributeNS(envURI, envPrefix +
":encodingStyle", Constants.NS_SOAP_ENCODING);
+ }
}
+
// Add the return to the message
ParameterMetaData retMetaData = opMetaData.getReturnParameter();
if (retMetaData != null)