svn commit: r1005868 - /axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java

2010-10-08 Thread nthaker
Author: nthaker
Date: Fri Oct  8 15:49:18 2010
New Revision: 1005868

URL: http://svn.apache.org/viewvc?rev=1005868&view=rev
Log:
The WS-Addressing action that is being generated is not correct in some 
scenarios where faults are generated. The problem was discovered during CTS 
testing for jax-ws 2.2. I am committing code that will fix this issue.

Code Contribution by Brian DePradine.

JIRA Axis2-4839.

Modified:

axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java?rev=1005868&r1=1005867&r2=1005868&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
 Fri Oct  8 15:49:18 2010
@@ -529,6 +529,10 @@ class OperationDescriptionImpl
 portTypeName, 
 operationName, 
 faultMessage.getName());
+
+if (log.isDebugEnabled()) {
+log.debug("Default faultAction = "+faultAction);
+}
 
 
newAxisOperation.addFaultAction(faultDesc.getExceptionClassName(),  
faultAction);
 newAxisOperation.setFaultMessages(faultMessage);
@@ -559,7 +563,24 @@ class OperationDescriptionImpl
 }
 FaultDescription faultDesc = 
resolveFaultByExceptionName(className);
 if (faultDesc != null)  {
-newAxisOperation.addFaultAction(className, 
faultAction.value());
+
+String faultActionString = faultAction.value();
+if (log.isDebugEnabled()) {
+log.debug("SANDERKA: faultAction value = 
"+faultActionString);
+}
+
+if (faultActionString.equals("")) {
+faultActionString = 
+
WSDL11ActionHelper.getFaultActionFromStringInformation( targetNS, 
+portTypeName, 
+operationName, 
+
className.substring((className.lastIndexOf('.'))+1));
+
+if (log.isDebugEnabled()) {
+log.debug("New faultAction value = 
"+faultActionString);
+}
+}
+newAxisOperation.addFaultAction(className, 
faultActionString);
 }
 }
 }




svn commit: r1005887 - /axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java

2010-10-08 Thread scheu
Author: scheu
Date: Fri Oct  8 16:35:19 2010
New Revision: 1005887

URL: http://svn.apache.org/viewvc?rev=1005887&view=rev
Log:
AXIS2-4839
Contributor: Brian De Pradine
Committer: Rich Scheuerle

I changed Brian's commit slightly to remove the possibility of an NPE.

Modified:

axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java?rev=1005887&r1=1005886&r2=1005887&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
 Fri Oct  8 16:35:19 2010
@@ -534,6 +534,10 @@ class OperationDescriptionImpl
 log.debug("Default faultAction = "+faultAction);
 }
 
+if (log.isDebugEnabled()) {
+log.debug("Default faultAction = "+faultAction);
+}
+
 
newAxisOperation.addFaultAction(faultDesc.getExceptionClassName(),  
faultAction);
 newAxisOperation.setFaultMessages(faultMessage);
 }
@@ -563,19 +567,18 @@ class OperationDescriptionImpl
 }
 FaultDescription faultDesc = 
resolveFaultByExceptionName(className);
 if (faultDesc != null)  {
-
 String faultActionString = faultAction.value();
 if (log.isDebugEnabled()) {
-log.debug("SANDERKA: faultAction value = 
"+faultActionString);
+log.debug("faultAction value = 
"+faultActionString);
 }
-
-if (faultActionString.equals("")) {
+
+if (faultActionString == null || 
faultActionString.equals("")) {
 faultActionString = 
 
WSDL11ActionHelper.getFaultActionFromStringInformation( targetNS, 
-portTypeName, 
-operationName, 
-
className.substring((className.lastIndexOf('.'))+1));
-
+portTypeName, 
+operationName, 
+
className.substring((className.lastIndexOf('.'))+1));
+
 if (log.isDebugEnabled()) {
 log.debug("New faultAction value = 
"+faultActionString);
 }




svn commit: r1005893 - in /axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws: Constants.java marshaller/impl/alt/DocLitWrappedMethodMarshaller.java marshaller/impl/alt/MethodMarshall

2010-10-08 Thread scheu
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

svn commit: r1005915 - /axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java

2010-10-08 Thread nthaker
Author: nthaker
Date: Fri Oct  8 17:23:00 2010
New Revision: 1005915

URL: http://svn.apache.org/viewvc?rev=1005915&view=rev
Log:
JIRA- AXIS2-4845
The change addresses a performance problem in AddressingInHandler. code 
contributed by Doug Larson.

Currently, we first check to see if there is a parameter to disable inbound 
addressing which is normally false but then we find out there are no soap 
headers anyway. The change moves the check for soap headers before we check to 
see if there is a parameter to disable inbound addressing. 

Modified:

axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java

Modified: 
axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java?rev=1005915&r1=1005914&r2=1005915&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
 Fri Oct  8 17:23:00 2010
@@ -75,6 +75,12 @@ public class AddressingInHandler extends
 msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, 
Boolean.TRUE);
 msgContext.setProperty(IS_ADDR_INFO_ALREADY_PROCESSED, Boolean.FALSE);
 
+
+// if there are not headers put a flag to disable addressing temporary
+SOAPHeader header = msgContext.getEnvelope().getHeader();
+if (header == null) {
+return InvocationResponse.CONTINUE;
+}
 //Determine if we want to ignore addressing headers. This parameter 
must
 //be retrieved from the message context because it's value can vary on 
a
 //per service basis.
@@ -88,11 +94,6 @@ public class AddressingInHandler extends
 return InvocationResponse.CONTINUE; 
 }
 
-// if there are not headers put a flag to disable addressing temporary
-SOAPHeader header = msgContext.getEnvelope().getHeader();
-if (header == null) {
-return InvocationResponse.CONTINUE;
-}
 
 if(configuration == null){
AxisConfiguration conf = 
msgContext.getConfigurationContext().getAxisConfiguration();