Author: veithen Date: Mon Aug 15 10:28:16 2011 New Revision: 1157762 URL: http://svn.apache.org/viewvc?rev=1157762&view=rev Log: AXIS2-5115: Merged r1157373, r1157415 and r1157424 to the 1.6 branch.
Modified: axis/axis2/java/core/branches/1_6/ (props changed) axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/AbstractTestCase.java axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/jaxb/string/JAXBStringUTF16Tests.java axis/axis2/java/core/branches/1_6/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java axis/axis2/java/core/branches/1_6/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java Propchange: axis/axis2/java/core/branches/1_6/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Aug 15 10:28:16 2011 @@ -1 +1 @@ -/axis/axis2/java/core/trunk:1068985,1069659,1069898,1070439,1072077,1072271,1072296,1072499,1072510,1075057,1078242,1081563,1081587,1081590,1082316,1082322,1082600,1082702,1082726,1082738,1083180,1083192,1083379,1083381,1083425,1083433,1083446,1084753,1085157,1085173,1085514,1085889,1085927,1085931,1087073,1088239,1088248-1088249,1088251,1088268,1088730,1088904,1089225,1089989,1090429,1090457,1091178,1091191,1094117,1096530,1096557,1099385,1099389,1100628,1101037,1103013,1103336,1103606,1103760,1128580,1128584,1128618,1128645,1130590,1131425,1134438,1134616,1136156,1136159,1136177,1137153,1137159,1138144,1138203,1139448,1139484,1156305,1156382,1157501,1157517,1157522,1157535 +/axis/axis2/java/core/trunk:1068985,1069659,1069898,1070439,1072077,1072271,1072296,1072499,1072510,1075057,1078242,1081563,1081587,1081590,1082316,1082322,1082600,1082702,1082726,1082738,1083180,1083192,1083379,1083381,1083425,1083433,1083446,1084753,1085157,1085173,1085514,1085889,1085927,1085931,1087073,1088239,1088248-1088249,1088251,1088268,1088730,1088904,1089225,1089989,1090429,1090457,1091178,1091191,1094117,1096530,1096557,1099385,1099389,1100628,1101037,1103013,1103336,1103606,1103760,1128580,1128584,1128618,1128645,1130590,1131425,1134438,1134616,1136156,1136159,1136177,1137153,1137159,1138144,1138203,1139448,1139484,1156305,1156382,1157373,1157415,1157424,1157501,1157517,1157522,1157535 Modified: axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/AbstractTestCase.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/AbstractTestCase.java?rev=1157762&r1=1157761&r2=1157762&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/AbstractTestCase.java (original) +++ axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/framework/AbstractTestCase.java Mon Aug 15 10:28:16 2011 @@ -30,17 +30,12 @@ import junit.framework.TestCase; import org.apache.axis2.jaxws.TestLogger; import org.apache.axis2.jaxws.dispatch.DispatchTestConstants; import org.apache.axis2.testutils.RuntimeIgnoreException; -import org.apache.log4j.BasicConfigurator; public class AbstractTestCase extends TestCase { public AbstractTestCase() { super(); } - static { - BasicConfigurator.configure(); - } - /* * users may pass in their own repositoryDir path and path to custom configuration file. * Passing 'null' for either param will use the default Modified: axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/jaxb/string/JAXBStringUTF16Tests.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/jaxb/string/JAXBStringUTF16Tests.java?rev=1157762&r1=1157761&r2=1157762&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/jaxb/string/JAXBStringUTF16Tests.java (original) +++ axis/axis2/java/core/branches/1_6/modules/jaxws-integration/test/org/apache/axis2/jaxws/jaxb/string/JAXBStringUTF16Tests.java Mon Aug 15 10:28:16 2011 @@ -6,7 +6,6 @@ import org.apache.axis2.jaxws.TestLogger import org.apache.axis2.jaxws.framework.AbstractTestCase; import javax.xml.ws.BindingProvider; -import javax.xml.ws.WebServiceException; public class JAXBStringUTF16Tests extends AbstractTestCase { String axisEndpoint = "http://localhost:6060/axis2/services/JAXBStringService.JAXBStringPortTypeImplPort"; @@ -88,24 +87,19 @@ public class JAXBStringUTF16Tests extend } private void runTestWithEncoding(String input, String output, String encoding, String endpoint) { TestLogger.logger.debug("Test : " + getName()); - try { - JAXBStringPortType myPort = (new JAXBStringService()).getJAXBStringPort(); - BindingProvider p = (BindingProvider) myPort; - p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpoint); - - if (encoding != null) { - p.getRequestContext().put(org.apache.axis2.Constants.Configuration.CHARACTER_SET_ENCODING, encoding); - } - - Echo request = new Echo(); - request.setArg(input); - EchoResponse response = myPort.echoString(request); - TestLogger.logger.debug(response.getResponse()); - assertEquals(output, response.getResponse()); - } catch (WebServiceException webEx) { - webEx.printStackTrace(); - fail(); + JAXBStringPortType myPort = (new JAXBStringService()).getJAXBStringPort(); + BindingProvider p = (BindingProvider) myPort; + p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpoint); + + if (encoding != null) { + p.getRequestContext().put(org.apache.axis2.Constants.Configuration.CHARACTER_SET_ENCODING, encoding); } + + Echo request = new Echo(); + request.setArg(input); + EchoResponse response = myPort.echoString(request); + TestLogger.logger.debug(response.getResponse()); + assertEquals(output, response.getResponse()); } } Modified: axis/axis2/java/core/branches/1_6/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java?rev=1157762&r1=1157761&r2=1157762&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java (original) +++ axis/axis2/java/core/branches/1_6/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java Mon Aug 15 10:28:16 2011 @@ -66,11 +66,11 @@ import org.apache.commons.logging.LogFac public class EndpointInterfaceDescriptionImpl implements EndpointInterfaceDescription, EndpointInterfaceDescriptionJava, EndpointInterfaceDescriptionWSDL { - private EndpointDescriptionImpl parentEndpointDescription; - private ArrayList<OperationDescription> operationDescriptions = + private final EndpointDescriptionImpl parentEndpointDescription; + private final ArrayList<OperationDescription> operationDescriptions = new ArrayList<OperationDescription>(); private Map<QName, List<OperationDescription>> dispatchableOperations; - private DescriptionBuilderComposite dbc; + private final DescriptionBuilderComposite dbc; //Logging setup private static final Log log = LogFactory.getLog(EndpointInterfaceDescriptionImpl.class); @@ -354,6 +354,16 @@ public class EndpointInterfaceDescriptio return; } else if (sei != null) { + // Reset any cached state (see AXIS2-5115) + webServiceAnnotation = null; + webServiceTargetNamespace = null; + webService_Name = null; + soapBindingAnnotation = null; + soapBindingStyle = null; + soapBindingUse = null; + soapParameterStyle = null; + dispatchableOperations = null; + seiClass = sei; dbc.setCorrespondingClass(sei); // Update (or possibly add) the OperationDescription for each of the methods on the SEI. Modified: axis/axis2/java/core/branches/1_6/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_6/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java?rev=1157762&r1=1157761&r2=1157762&view=diff ============================================================================== --- axis/axis2/java/core/branches/1_6/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java (original) +++ axis/axis2/java/core/branches/1_6/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java Mon Aug 15 10:28:16 2011 @@ -100,11 +100,11 @@ import java.util.concurrent.Future; class OperationDescriptionImpl implements OperationDescription, OperationDescriptionJava, OperationDescriptionWSDL { - private EndpointInterfaceDescription parentEndpointInterfaceDescription; - private AxisOperation axisOperation; - private QName operationQName; + private final EndpointInterfaceDescription parentEndpointInterfaceDescription; + private final AxisOperation axisOperation; + private final QName operationQName; private Method seiMethod; - private MethodDescriptionComposite methodComposite; + private final MethodDescriptionComposite methodComposite; private ParameterDescription[] parameterDescriptions; private FaultDescription[] faultDescriptions; private static final Log log = LogFactory.getLog(OperationDescriptionImpl.class); @@ -200,6 +200,7 @@ class OperationDescriptionImpl OperationDescriptionImpl(Method method, EndpointInterfaceDescription parent) { parentEndpointInterfaceDescription = parent; + methodComposite = null; partAttachmentMap = new HashMap<String, AttachmentDescription>(); setSEIMethod(method); @@ -210,7 +211,11 @@ class OperationDescriptionImpl if (getEndpointInterfaceDescription().getEndpointDescription() != null) { if (!getEndpointInterfaceDescription().getEndpointDescription().getServiceDescription().isServerSide()) { axisOperation = createClientAxisOperation(); + } else { + axisOperation = null; } + } else { + axisOperation = null; } if(this.axisOperation != null) { try { @@ -228,6 +233,7 @@ class OperationDescriptionImpl parentEndpointInterfaceDescription = parent; partAttachmentMap = new HashMap<String, AttachmentDescription>(); axisOperation = operation; + methodComposite = null; if(this.axisOperation != null) { this.operationQName = axisOperation.getName(); try { @@ -237,6 +243,8 @@ class OperationDescriptionImpl catch(AxisFault af) { throw ExceptionFactory.makeWebServiceException(Messages.getMessage("operationDescriptionErr1")); } + } else { + operationQName = null; } buildAttachmentInformation(); } @@ -637,6 +645,38 @@ class OperationDescriptionImpl throw ExceptionFactory.makeWebServiceException( new UnsupportedOperationException(Messages.getMessage("seiMethodErr"))); } else { + // Reset any cached state (see AXIS2-5115) + webMethodAnnotation = null; + webMethodOperationName = null; + webMethodAction = null; + webMethodExclude = null; + requestWrapperAnnotation = null; + requestWrapperLocalName = null; + requestWrapperTargetNamespace = null; + requestWrapperClassName = null; + requestWrapperPartName = null; + responseWrapperAnnotation = null; + responseWrapperLocalName = null; + responseWrapperTargetNamespace = null; + responseWrapperClassName = null; + responseWrapperPartName = null; + webParamNames = null; + webParamTargetNamespace = null; + webParamMode = null; + webResultAnnotation = null; + webResultName = null; + webResultPartName = null; + webResultTargetNamespace = null; + webResultHeader = null; + soapBindingAnnotation = null; + soapBindingStyle = null; + soapBindingUse = null; + soapBindingParameterStyle = null; + actionAnnotation = null; + onewayAnnotation = null; + onewayIsOneway = null; + resultActualTypeClazz = null; + seiMethod = method; webMethodAnnotation = (WebMethod) getAnnotation(seiMethod, WebMethod.class);