Author: scheu
Date: Fri Oct 8 16:43:01 2010
New Revision: 1005893
URL: http://svn.apache.org/viewvc?rev=1005893&view=rev
Log:
AXIS2-4823
Contributor: Doug Larson
Committer: Rich Scheuerle
Slight improvement to wrapper lookup code.
Modified:
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/Constants.java
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java
Modified:
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/Constants.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/Constants.java?rev=1005893&r1=1005892&r2=1005893&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/Constants.java
(original)
+++
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/Constants.java
Fri Oct 8 16:43:01 2010
@@ -174,7 +174,7 @@ public interface Constants {
* Default: null, which is interpreted as FALSE
*
* Description:
- * If the value is false, the jax-ws engine will detect and remove
+ * If the value is true, the jax-ws engine will detect and remove
* illegal characters (characters not supported in xml) when writing
* a JAXB data bean associated with a jaxws web method
* http://www.w3.org/TR/2008/REC-xml-20081126/#NT-Char
Modified:
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java?rev=1005893&r1=1005892&r2=1005893&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java
(original)
+++
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitWrappedMethodMarshaller.java
Fri Oct 8 16:43:01 2010
@@ -38,6 +38,7 @@ import org.apache.axis2.jaxws.runtime.de
import org.apache.axis2.jaxws.utility.ConvertUtils;
import org.apache.axis2.jaxws.wrapper.JAXBWrapperTool;
import org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperToolImpl;
+import org.apache.axis2.jaxws.core.MessageContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -92,7 +93,9 @@ public class DocLitWrappedMethodMarshall
// Remember this unmarshal information so that we can speed up
processing
// the next time.
- if (shouldRegiserUnmarshalInfo(operationDesc, marshalDesc,
endpointDesc)) {
+ MessageContext mc = message.getMessageContext();
+ if (MethodMarshallerUtils.getUnmarshalInfoParameter(mc) == null &&
+ shouldRegiserUnmarshalInfo(operationDesc, marshalDesc,
endpointDesc)) {
MethodMarshallerUtils.registerUnmarshalInfo(message.getMessageContext(),
packages,
packagesKey);
Modified:
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java?rev=1005893&r1=1005892&r2=1005893&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java
(original)
+++
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/marshaller/impl/alt/MethodMarshallerUtils.java
Fri Oct 8 16:43:01 2010
@@ -1411,6 +1411,30 @@ public class MethodMarshallerUtils {
* @param packages
* @param packagesKey
*/
+ static Parameter getUnmarshalInfoParameter(MessageContext mc) throws
AxisFault {
+
+ // The information is registered on the AxisOperation.
+ if (mc == null ||
+ mc.getAxisMessageContext() == null ||
+ mc.getAxisMessageContext().getAxisService() == null ||
+ mc.getAxisMessageContext().getAxisOperation() == null) {
+ return null;
+ }
+
+ // This needs to be stored on the AxisOperation as unmarshalling
+ // info will be specific to a method and its parameters
+ AxisOperation axisOp = mc.getAxisMessageContext().getAxisOperation();
+
+ Parameter param = axisOp.getParameter(UnmarshalInfo.KEY);
+ return param;
+ }
+ /**
+ * Register the unmarshalling information so that it can
+ * be used to speed up subsequent marshalling events.
+ * @param mc
+ * @param packages
+ * @param packagesKey
+ */
static void registerUnmarshalInfo(MessageContext mc,
TreeSet<String> packages,
String packagesKey) throws AxisFault {