svn commit: r934596 [2/2] - in /axis/axis2/java/core/trunk/modules: jaxws/src/org/apache/axis2/jaxws/client/config/ jaxws/src/org/apache/axis2/jaxws/client/proxy/ jaxws/test-resources/wsdl/ jaxws/test

2010-04-15 Thread nthaker
Added: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/util/WSDLExtensionUtils.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/util/WSDLExtensionUtils.java?rev=934596&view=auto
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/util/WSDLExtensionUtils.java
 (added)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/util/WSDLExtensionUtils.java
 Thu Apr 15 21:23:57 2010
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.wsdl.Binding;
+import javax.wsdl.BindingFault;
+import javax.wsdl.BindingInput;
+import javax.wsdl.BindingOperation;
+import javax.wsdl.BindingOutput;
+import javax.wsdl.WSDLElement;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.UnknownExtensibilityElement;
+import javax.wsdl.extensions.soap.SOAPBinding;
+import javax.wsdl.extensions.soap12.SOAP12Binding;
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.jaxws.ExceptionFactory;
+import org.apache.axis2.jaxws.common.config.WSDLValidatorElement;
+import org.apache.axis2.jaxws.common.config.WSDLValidatorElement.State;
+import org.apache.axis2.jaxws.description.EndpointDescription;
+import org.apache.axis2.jaxws.description.EndpointDescriptionWSDL;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+/**
+ * This utility class stores methods that can be used to fetch extension 
elements
+ * from wsdl and will be used from RespectBindingConfigurator on Client and 
Server.
+ */
+public class WSDLExtensionUtils {
+private static final Log log = LogFactory.getLog(WSDLExtensionUtils.class);
+/**
+ * This method will search for all wsdl extensibility elements marked as 
required=true in wsdl:bindings
+ * As per the wsdl 2.2 specification section 2.5 here is how a 
wsdl:binding is defined:
+ * 
+ *   *
+ *   <-- extensibility element (1) --> *
+ **
+ *  <-- extensibility element (2) --> *
+ *   ?
+ *  <-- extensibility element (3) --> 
+ *  
+ *   ?
+ *  <-- extensibility element (4) --> *
+ *  
+ *   *
+ *  <-- extensibility element (5) --> *
+ *  
+ *   
+ *   
+ * 
+ * we will look for wsdl extensions in binding root, wsdl:operation, 
wsdl:input, wsdl:output and wsdl:fault.
+ * If the extensibility element is defines outside of these sections it 
will not be picked up by this method.
+ * 
+ * @param wsdlBinding - WSDLBinding Object read from WSDL Definition.
+ * @param set - Set that will be filled with list of required=true 
extension elements.
+ * @return
+ */
+public static void search(WSDLElement element, Set 
set, List unusedExtensions) {
+if(log.isDebugEnabled()){
+log.debug("Start Searching for WSDLExtensions");
+}
+if(element == null){
+return;
+}
+//This search method uses a simple BFS technique to search for 
Extension elements in WSDLBindings.
+//I will Queue all available WSDLElements starting in wsdl:binding and 
traverse them looking for 
+//extensions. Queue will be empty when I have processed everything.
+//NOTE:Binding, Operation, OperationInput, OperationOutput and 
OperationFault are all WSDLElements.
+LinkedList queue = new LinkedList();
+queue.offer(element);
+
+while(!queue.isEmpty()){
+WSDLElement wsdlElement = queue.remove();
+//WSDLElement in Queue could be wsdl Binding, BindingOperations, 
Input, Output or Fault
+//Find Extensibility Elements in wsdlElement.
+processWSDLElement(wsdlElement, set, unusedExtensions);
+//che

svn commit: r934683 - /axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/AddressingProviderTests.java

2010-04-15 Thread nthaker
Author: nthaker
Date: Fri Apr 16 04:07:24 2010
New Revision: 934683

URL: http://svn.apache.org/viewvc?rev=934683&view=rev
Log:
Commenting testWithRespectBinding() until we have a way to register 
AddressingValidator from Dispatch and Proxy JAX-WS Client.

Modified:

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/AddressingProviderTests.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/AddressingProviderTests.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/AddressingProviderTests.java?rev=934683&r1=934682&r2=934683&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/AddressingProviderTests.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/AddressingProviderTests.java
 Fri Apr 16 04:07:24 2010
@@ -138,12 +138,12 @@ public class AddressingProviderTests ext
  * SOAPAction and wsa:Action. 
  */
 public void testWithRespectBinding() throws Exception {
-
+/* Commenting this test until we have a way to register the addressing 
validator.
 Dispatch dispatch = createDispatchWithRespectBinding();
  
 BindingProvider bp = (BindingProvider) dispatch;
 Binding binding = (Binding) bp.getBinding();
-
+
 WebServiceFeature addressingFeature = 
binding.getFeature(AddressingFeature.ID);
 assertNotNull(addressingFeature);
 assertTrue("Expecting AddressingFeature to be enabled.", 
addressingFeature.isEnabled());
@@ -176,6 +176,7 @@ public class AddressingProviderTests ext
 assertResponseXML(response, "Hello Response");
 
 System.out.println(response.toString());
+*/
 }
 
 private SOAPElement assertResponseXML(SOAPMessage msg, String 
expectedText) throws Exception {




svn commit: r939003 - in /axis/axis2/java/core/trunk/modules/metadata: src/org/apache/axis2/jaxws/description/impl/ src/org/apache/axis2/jaxws/util/ test/org/apache/axis2/jaxws/utils/

2010-04-28 Thread nthaker
Author: nthaker
Date: Wed Apr 28 16:28:20 2010
New Revision: 939003

URL: http://svn.apache.org/viewvc?rev=939003&view=rev
Log:
Adding code to:
1)Modify logic of how JAX-WS tooling version is read by JAX-WS module.
2)Adding proper support for Legacy @Webmethod annotation behavior when JAX-WS 
2.2 version is detected by runtime and user wants old behavior.

Added:

axis/axis2/java/core/trunk/modules/metadata/test/org/apache/axis2/jaxws/utils/

axis/axis2/java/core/trunk/modules/metadata/test/org/apache/axis2/jaxws/utils/WSToolingUtilsTests.java
Modified:

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

axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/util/WSToolingUtils.java

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java?rev=939003&r1=939002&r2=939003&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
 Wed Apr 28 16:28:20 2010
@@ -249,21 +249,47 @@ public class EndpointInterfaceDescriptio
 AxisService axisService = 
getEndpointDescription().getAxisService();
 AxisOperation axisOperation = axisService
 
.getOperation(OperationDescriptionImpl.determineOperationQName(this, mdc));
-
+
 OperationDescription operation =
-new OperationDescriptionImpl(mdc, this, axisOperation);
-
-if (axisOperation == null) {
+new OperationDescriptionImpl(mdc, this, axisOperation);
+//In LegacyWebmethod case:
+//1) if wsdl is defined then we should only expose operations 
that are in wsdl.
+//NOTE:If wsdl is defined AxisService will have all operations 
found in wsdl, 
+//AxisServiceBuilder will do that part before metadata layer 
is invoked.
+//2) if wsdl not defined we need to expose operations based on 
annotation, in 
+//which case we need add operations not found in AxisService. 
+if(getWSDLDefinition() != null){
+if(log.isDebugEnabled()){
+log.debug("wsdl definition found, we will not expose 
operation not found in AxisService.");
+}
+if (log.isDebugEnabled())
+log.debug("EID: Just added operation= " + 
operation.getOperationName());
+addOperation(operation);
+}
+//Since wsdl is not defined add all operations we found.
+else if (axisOperation == null) {
+if(log.isDebugEnabled()){
+log.debug("wsdl defintion NOT found, we will expose 
operation using annotations.");
+}
 // This axisOperation did not already exist on the 
AxisService, and so was created
 // with the OperationDescription, so we need to add the 
operation to the service
 
((OperationDescriptionImpl)operation).addToAxisService(axisService);
+if (log.isDebugEnabled())
+log.debug("EID: Just added operation= " + 
operation.getOperationName());
+addOperation(operation);
+}
+//This check is to add operations in case an Async binding is 
used while generating
+//jax-ws artifacts, So any async operation example invokeAsync 
is mapped to operation invoke.
+//However, we will keep an operation Description that holds 
details of invokeAsync.
+//this check will ensure Async operations get added to 
operation description list. 
+else if(axisOperation!=null && 
operation.getName().getLocalPart()!=mdc.getMethodName()){
+if (log.isDebugEnabled())
+log.debug("EID: Just added operation= " + 
operation.getOperationName());
+addOperation(operation);
 }
 
-if (log.isDebugEnabled())
-log.debug("EID: Just added operation= " + 
operation.getOperationName());
-addOperation(operation);
 }
-
+   
 }
 
 if (log.isDebugEnabled())
@@ -945,7 +971,7 @@ public class Endpoint

svn commit: r939058 - in /axis/axis2/java/core/trunk/modules/metadata: src/org/apache/axis2/jaxws/description/impl/ src/org/apache/axis2/jaxws/feature/ src/org/apache/axis2/jaxws/server/config/ src/or

2010-04-28 Thread nthaker
Author: nthaker
Date: Wed Apr 28 19:23:09 2010
New Revision: 939058

URL: http://svn.apache.org/viewvc?rev=939058&view=rev
Log:
Adding Debug information in metadata module and test cases for Legacy 
@Webmethod changes made in revision 939003. 

Modified:

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

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

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

axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/feature/ServerFramework.java

axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/server/config/RespectBindingConfigurator.java

axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/util/WSDLExtensionUtils.java

axis/axis2/java/core/trunk/modules/metadata/test/org/apache/axis2/jaxws/description/AnnotationServiceImplDescriptionTests.java

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java?rev=939058&r1=939057&r2=939058&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionFactoryImpl.java
 Wed Apr 28 19:23:09 2010
@@ -233,7 +233,7 @@ public class DescriptionFactoryImpl {
 public static List createServiceDescriptionFromDBCMap(
 HashMap dbcMap, 
ConfigurationContext configContext, boolean performVaidation) {
 if (log.isDebugEnabled()) {
-
log.debug("createServiceDescriptionFromDBCMap(Hashmap,ConfigurationContext,boolean
 isValid " );
+
log.debug("createServiceDescriptionFromDBCMap(Hashmap,ConfigurationContext,boolean
 performVaidation " );
 }
 
 List serviceDescriptionList = new 
ArrayList();

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java?rev=939058&r1=939057&r2=939058&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointDescriptionImpl.java
 Wed Apr 28 19:23:09 2010
@@ -340,7 +340,7 @@ public class EndpointDescriptionImpl
 properties, Integer portCompositeIndex) {
 
 if (log.isDebugEnabled()) {
-log.debug("entry ");
+log.debug("entry EndpointDescriptionImpl(ServiceDescriptionImpl, 
String, Map, Integer)");
 log.debug("  parent=" + parent);
 log.debug("  serviceImplName=" + parent);
 log.debug("  portCompositeIndex=" + portCompositeIndex);
@@ -605,7 +605,7 @@ public class EndpointDescriptionImpl
 setupReleaseResources(composite.getConfigurationContext());
 releaseAxisServiceResources();
 if (log.isDebugEnabled()) {
-log.debug("exit");
+log.debug("exit EndpointDescriptionImpl(ServiceDescriptionImpl, 
String, Map, Integer)");
 }
 }
 
@@ -1697,6 +1697,9 @@ public class EndpointDescriptionImpl
 //configuration can be overridden. Should only be called on the
 //server side.
 private void configureWebServiceFeatures() {
+if(log.isDebugEnabled()){
+log.debug("Start configureWebServiceFeatures().");
+}
 String bindingType = getBindingType();
 Set ids = ServerConfiguratorRegistry.getIds();
 
@@ -1726,7 +1729,10 @@ public class EndpointDescriptionImpl
 if (log.isDebugEnabled()) {
 log.debug("No WebServiceFeatureAnnotation instances were found 
on the composite.");
 }
-}   
+}
+if(log.isDebugEnabled()){
+log.debug("Exit configureWebServiceFeatures().");
+}
 }
 
 public Definition getWSDLDefinition() {

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/LegacyMethodRetrieverImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/

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

2010-04-30 Thread nthaker
Author: nthaker
Date: Fri Apr 30 18:53:59 2010
New Revision: 939778

URL: http://svn.apache.org/viewvc?rev=939778&view=rev
Log:
Adding code to fix test case 
org.apache.axis2.jaxws.description.AnnotationServiceImplDescriptionTests
The test failure was introduced when Legacy @Webmethod changes where committed. 

Modified:

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

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java?rev=939778&r1=939777&r2=939778&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
 Fri Apr 30 18:53:59 2010
@@ -266,8 +266,8 @@ public class EndpointInterfaceDescriptio
 log.debug("EID: Just added operation= " + 
operation.getOperationName());
 addOperation(operation);
 }
-//Since wsdl is not defined add all operations we found.
-else if (axisOperation == null) {
+//Since wsdl is not defined add all operations to AxisService 
and OperationDescriptionList.
+else if(axisOperation == null) {
 if(log.isDebugEnabled()){
 log.debug("wsdl defintion NOT found, we will expose 
operation using annotations.");
 }
@@ -278,16 +278,13 @@ public class EndpointInterfaceDescriptio
 log.debug("EID: Just added operation= " + 
operation.getOperationName());
 addOperation(operation);
 }
-//This check is to add operations in case an Async binding is 
used while generating
-//jax-ws artifacts, So any async operation example invokeAsync 
is mapped to operation invoke.
-//However, we will keep an operation Description that holds 
details of invokeAsync.
-//this check will ensure Async operations get added to 
operation description list. 
-else if(axisOperation!=null && 
operation.getName().getLocalPart()!=mdc.getMethodName()){
+//This is the case where wsdl is not defined and AxisOperation 
is found in Axis Service.
+//Here we have to ensure that corresponding 
OperationDescription is added to OperationDescriptionList.
+else if(getWSDLDefinition()==null && axisOperation!=null){
 if (log.isDebugEnabled())
 log.debug("EID: Just added operation= " + 
operation.getOperationName());
 addOperation(operation);
 }
-
 }

 }




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

2010-06-07 Thread nthaker
Author: nthaker
Date: Mon Jun  7 18:16:31 2010
New Revision: 952358

URL: http://svn.apache.org/viewvc?rev=952358&view=rev
Log:
AXIS2-4732
Fix for Operation invocation failure on Partial wsdl scenario.

Modified:

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

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java?rev=952358&r1=952357&r2=952358&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
 Mon Jun  7 18:16:31 2010
@@ -265,6 +265,14 @@ public class EndpointInterfaceDescriptio
 if (log.isDebugEnabled())
 log.debug("EID: Just added operation= " + 
operation.getOperationName());
 addOperation(operation);
+//Cater to partial wsdl case, if wsdl is found but 
AxisService was
+//not built using this wsdl we need to add operation to 
AxisService.
+if(!getEndpointDescriptionImpl().isWSDLFullySpecified()){
+if(log.isDebugEnabled()){
+log.debug("Partial wsdl definition found, we will 
add operation to the AxisService.");
+}
+
((OperationDescriptionImpl)operation).addToAxisService(axisService);
+}
 }
 //Since wsdl is not defined add all operations to AxisService 
and OperationDescriptionList.
 else if(axisOperation == null) {




svn commit: r955636 - in /axis/axis2/java/core/trunk/modules/jaxws: src/org/apache/axis2/jaxws/ src/org/apache/axis2/jaxws/message/databinding/ src/org/apache/axis2/jaxws/message/databinding/impl/ src

2010-06-17 Thread nthaker
Author: nthaker
Date: Thu Jun 17 15:25:12 2010
New Revision: 955636

URL: http://svn.apache.org/viewvc?rev=955636&view=rev
Log:
JIRA: AXIS2-4745
Changes to allow reading of Generated artifacts from a cache. 

Added:

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/message/databinding/impl/

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/message/databinding/impl/ClassFinderImplTest.java
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/message/databinding/ClassFinder.java

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/ClassFinderImpl.java

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/ArtifactProcessor.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=955636&r1=955635&r2=955636&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
 Thu Jun 17 15:25:12 2010
@@ -126,4 +126,8 @@ public interface Constants {
  * 
  */
 public static final String WRITE_HEADER_ELEMENT_IF_NULL = 
"jaxws.header.parameter.isNull.write.element.with.xsi.nil";
+/**
+ * This constant will be used to store the location of JAX-WS generated 
artifacts cache.
+ */
+public static final String WS_CACHE="wsCache";
 }

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/ClassFinder.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/ClassFinder.java?rev=955636&r1=955635&r2=955636&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/ClassFinder.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/ClassFinder.java
 Thu Jun 17 15:25:12 2010
@@ -39,4 +39,14 @@ public interface ClassFinder {
  */
 ArrayList getClassesFromJarFile(String pkg, ClassLoader cl)
 throws ClassNotFoundException;
+
+/**
+ * This method will be used to add addition paths to existing classpath.
+ * We may need to add classpath to search for jax-ws wrapper classes that
+ * applicaiton developer did not package. 
+ * @param filePath: path of the location where wrapper classes may be 
stored.
+ * example a cache folder.
+ * @param cl
+ */
+public void updateClassPath(String filePath, ClassLoader cl) throws 
Exception;
 }

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/ClassFinderImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/ClassFinderImpl.java?rev=955636&r1=955635&r2=955636&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/ClassFinderImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/impl/ClassFinderImpl.java
 Thu Jun 17 15:25:12 2010
@@ -30,6 +30,7 @@ import org.apache.commons.logging.LogFac
 
 import java.io.File;
 import java.io.IOException;
+import java.lang.reflect.Method;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.security.PrivilegedActionException;
@@ -166,4 +167,42 @@ public class ClassFinderImpl implements 
 
 return cl;
 }
+
+/* (non-Javadoc)
+ * @see 
org.apache.axis2.jaxws.message.databinding.ClassFinder#updateClassPath(java.lang.String,
 java.lang.ClassLoader)
+ */
+public void updateClassPath(final String filePath, final ClassLoader cl) 
throws Exception{
+if(filePath == null){
+return;
+}
+if(filePath.length()==0){
+return;
+}
+if(cl instanceof URLClassLoader){
+//lets add the path to the classloader.
+try{
+AccessController.doPrivileged(
+new PrivilegedExceptionAction()  {
+public Object run() throws Exception{
+URLClassLoader ucl = (URLClassLoader)cl;
+//convert file path to URL.
+File file = new File(filePath

svn commit: r955663 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java

2010-06-17 Thread nthaker
Author: nthaker
Date: Thu Jun 17 16:17:02 2010
New Revision: 955663

URL: http://svn.apache.org/viewvc?rev=955663&view=rev
Log:
JIRA:AXIS2-4746
Suppressing log.error statements where we absorb exceptions, I am putting a 
check if(log.debugEnabled) to avoid unnecessary logging.

Modified:

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?rev=955663&r1=955662&r2=955663&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
 Thu Jun 17 16:17:02 2010
@@ -392,10 +392,14 @@ public class WSDL11ToAxisServiceBuilder 
 return axisService;
 
 } catch (WSDLException e) {
-log.error(e.getMessage(), e);
+if(log.isDebugEnabled()){
+log.error(e.getMessage(), e);
+}
 throw AxisFault.makeFault(e);
 } catch (Exception e) {
-log.error(e.getMessage(), e);
+if(log.isDebugEnabled()){
+log.error(e.getMessage(), e);
+}
 throw AxisFault.makeFault(e);
 }
 }




svn commit: r963508 - in /axis/axis2/java/core/trunk/modules/jaxws: ./ src/org/apache/axis2/jaxws/runtime/description/marshal/impl/ test/org/apache/axis2/jaxws/wrapper/ test/org/apache/axis2/jaxws/wra

2010-07-12 Thread nthaker
Author: nthaker
Date: Mon Jul 12 22:16:54 2010
New Revision: 963508

URL: http://svn.apache.org/viewvc?rev=963508&view=rev
Log:
AXIS2-4775
This change ensures that we will use Request and Response wrapper Bean packaged 
by customer or we will Generate Wrappers if they are not packaged.

Added:

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/wrapper/

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/wrapper/beans/

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/wrapper/beans/AddNumbersException.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/wrapper/beans/AddNumbersService.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/wrapper/beans/WrapperBeanMarshallTests.java
axis/axis2/java/core/trunk/modules/jaxws/wsgen-tests.xml
Modified:
axis/axis2/java/core/trunk/modules/jaxws/pom.xml

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/ArtifactProcessor.java

Modified: axis/axis2/java/core/trunk/modules/jaxws/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/pom.xml?rev=963508&r1=963507&r2=963508&view=diff
==
--- axis/axis2/java/core/trunk/modules/jaxws/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/jaxws/pom.xml Mon Jul 12 22:16:54 2010
@@ -1,5 +1,4 @@
 
-
 
 
 http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>   
 4.0.0
 
 org.apache.axis2
@@ -98,7 +97,25 @@
 ${version}
 test
 
+
+wsdl4j
+wsdl4j
+
+
+com.sun.xml.ws
+jaxws-tools
+2.1.3
+
+
+
+java
+tools
+$version
+system
+${JAVA_HOME}/lib/tools.jar
+
 
+
 
 src
 test
@@ -203,34 +220,39 @@
 1.5
 1.5
 1.5
+
 
 
 
 org.apache.maven.plugins
 maven-antrun-plugin
+
 
 
 gen-ts
 generate-test-sources
 
-
+ 
 
 
 
-
+ 
 
 
+   
 
 
 
 
+
 
 Generating JAX-B classes from XSDs
 
 Generating java from echo.xsd
 
 
+
 
 
 
@@ -266,7 +288,7 @@
 
 
 
-
+
 
 
 
@@ -287,6 +309,22 @@
 
 
+
+   
+   
+   
+   
+
+
+   
+   

+   

+   

+   

+
+ 
 
+
 

svn commit: r964185 - in /axis/axis2/java/core/trunk/modules/jaxws: pom.xml test/org/apache/axis2/jaxws/wrapper/beans/ wsgen-tests.xml

2010-07-14 Thread nthaker
Author: nthaker
Date: Wed Jul 14 20:28:30 2010
New Revision: 964185

URL: http://svn.apache.org/viewvc?rev=964185&view=rev
Log:
Backing out test case for Wrapper Beans as use of WSGen causes Hudson build 
failures.

Removed:

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/wrapper/beans/
axis/axis2/java/core/trunk/modules/jaxws/wsgen-tests.xml
Modified:
axis/axis2/java/core/trunk/modules/jaxws/pom.xml

Modified: axis/axis2/java/core/trunk/modules/jaxws/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/pom.xml?rev=964185&r1=964184&r2=964185&view=diff
==
--- axis/axis2/java/core/trunk/modules/jaxws/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/jaxws/pom.xml Wed Jul 14 20:28:30 2010
@@ -96,23 +96,6 @@
 axis2-transport-local
 ${version}
 test
-
-
-wsdl4j
-wsdl4j
-
-
-com.sun.xml.ws
-jaxws-tools
-2.1.3
-
-
-
-java
-tools
-$version
-system
-${JAVA_HOME}/lib/tools.jar
 
 
 
@@ -309,22 +292,6 @@
 
 
-
-   
-   
-   
-   
-
-
-   
-   

-   

-   

-   

-
- 
 
-
 
 
 
@@ -412,13 +379,6 @@
 
 org.apache.maven.plugins
 maven-surefire-report-plugin
-
-
-
-report-only
-
-
-
 
 
 




svn commit: r965900 - in /axis/axis2/java/core/trunk/modules/metadata: src/org/apache/axis2/jaxws/description/ src/org/apache/axis2/jaxws/description/builder/converter/ src/org/apache/axis2/jaxws/desc

2010-07-20 Thread nthaker
Author: nthaker
Date: Tue Jul 20 16:44:48 2010
New Revision: 965900

URL: http://svn.apache.org/viewvc?rev=965900&view=rev
Log:
AXIS2-4783: JAX-WS2.2 update for @RequestWrapper, @ResponseWrapper & @WebFault 
annotation.

Modified:

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

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

axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaClassToDBCConverter.java

axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaMethodsToMDCConverter.java

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

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

axis/axis2/java/core/trunk/modules/metadata/test/org/apache/axis2/jaxws/description/AnnotationServiceImplDescriptionTests.java

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/FaultDescription.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/FaultDescription.java?rev=965900&r1=965899&r2=965900&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/FaultDescription.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/FaultDescription.java
 Tue Jul 20 16:44:48 2010
@@ -81,6 +81,10 @@ public interface FaultDescription {
  * if not defined.
  */
 public String getTargetNamespace();
-
-
+
+/**
+ *  @return the name of the wsdl:message that defines the fault element.
+ * @return
+ */
+public String getMessageName();
 }
\ No newline at end of file

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/OperationDescription.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/OperationDescription.java?rev=965900&r1=965899&r2=965900&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/OperationDescription.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/OperationDescription.java
 Tue Jul 20 16:44:48 2010
@@ -172,7 +172,8 @@ public interface OperationDescription {
 public String getRequestWrapperTargetNamespace();
 
 public String getRequestWrapperLocalName();
-
+
+public String getRequestWrapperPartName();
 /**
  * @return the class name of the wrapper class. NOTE: This method will 
return null if the
  * request wrapper class is not known during the description layer 
processing. In such
@@ -185,6 +186,8 @@ public interface OperationDescription {
 public String getResponseWrapperTargetNamespace();
 
 public String getResponseWrapperLocalName();
+
+public String getResponseWrapperPartName();
 
 public String[] getParamNames();
 

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaClassToDBCConverter.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaClassToDBCConverter.java?rev=965900&r1=965899&r2=965900&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaClassToDBCConverter.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaClassToDBCConverter.java
 Tue Jul 20 16:44:48 2010
@@ -381,6 +381,7 @@ public class JavaClassToDBCConverter {
 webFaultAnnot.setFaultBean(webFault.faultBean());
 webFaultAnnot.setName(webFault.name());
 webFaultAnnot.setTargetNamespace(webFault.targetNamespace());
+webFaultAnnot.setMessageName(webFault.messageName());
 composite.setWebFaultAnnot(webFaultAnnot);
 }
 }

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaMethodsToMDCConverter.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaMethodsToMDCConverter.java?rev=965900&r1=965899&r2=965900&view=diff
==

svn commit: r981908 - in /axis/axis2/java/core/trunk/modules/metadata: src/org/apache/axis2/jaxws/description/builder/ src/org/apache/axis2/jaxws/description/builder/converter/ src/org/apache/axis2/ja

2010-08-03 Thread nthaker
Author: nthaker
Date: Tue Aug  3 15:00:28 2010
New Revision: 981908

URL: http://svn.apache.org/viewvc?rev=981908&view=rev
Log:
AXIS2-4790

JAX-WS 2.2 update, Changes to support Implicit SEI restriction on exposing 
Static and Final Method as webservices.

Added:

axis/axis2/java/core/trunk/modules/metadata/test/org/apache/axis2/jaxws/description/impl/PostRI216MethodRetrieverImplTests.java
Modified:

axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MethodDescriptionComposite.java

axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaMethodsToMDCConverter.java

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

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

axis/axis2/java/core/trunk/modules/metadata/test/org/apache/axis2/jaxws/description/AnnotationServiceImplDescriptionTests.java

axis/axis2/java/core/trunk/modules/metadata/test/org/apache/axis2/jaxws/description/builder/converter/ReflectiveConverterTests.java

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MethodDescriptionComposite.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MethodDescriptionComposite.java?rev=981908&r1=981907&r2=981908&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MethodDescriptionComposite.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MethodDescriptionComposite.java
 Tue Aug  3 15:00:28 2010
@@ -33,7 +33,9 @@ public class MethodDescriptionComposite 
 private String returnType;//Methods return type
 private String[] exceptions;
 private String declaringClass; //the class/interface that actually 
declares this method
-
+private boolean staticModifier= false;//true if method is static
+private boolean finalModifier = false; //true if method is final
+
 boolean oneWayAnnotated;
// boolean that indicates if an @XmlList annotation was found on the 
method
private boolean isListType = false;
@@ -333,6 +335,22 @@ public class MethodDescriptionComposite 
 this.parentDBC = dbc;
 }
 
+public boolean isStatic() {
+return staticModifier;
+}
+
+public void setStaticModifier(boolean staticModifier) {
+this.staticModifier = staticModifier;
+}
+
+public boolean isFinal() {
+return finalModifier;
+}
+
+public void setFinalModifier(boolean finalModifier) {
+this.finalModifier = finalModifier;
+}
+
 public boolean compare(Object obj) {
 if (obj instanceof MethodDescriptionComposite) {
 MethodDescriptionComposite mdc = (MethodDescriptionComposite)obj;

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaMethodsToMDCConverter.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaMethodsToMDCConverter.java?rev=981908&r1=981907&r2=981908&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaMethodsToMDCConverter.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/converter/JavaMethodsToMDCConverter.java
 Tue Aug  3 15:00:28 2010
@@ -75,6 +75,8 @@ public class JavaMethodsToMDCConverter {
 mdc.setMethodName(method.getName());
 setReturnType(mdc, method);
 setIsListType(mdc, method);
+
mdc.setStaticModifier(Modifier.isStatic(method.getModifiers()));
+mdc.setFinalModifier(Modifier.isFinal(method.getModifiers()));
 mdc.setDeclaringClass(method.getDeclaringClass().getName());
 attachHandlerChainAnnotation(mdc, method);
 attachOnewayAnnotation(mdc, method);

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java?rev=981908&r1=981907&r2=981908&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/im

svn commit: r983468 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java

2010-08-08 Thread nthaker
Author: nthaker
Date: Sun Aug  8 18:34:43 2010
New Revision: 983468

URL: http://svn.apache.org/viewvc?rev=983468&view=rev
Log:
Axis2-4793
Fix for NPE When invoking Shutdown Modules in ConfigurationContext.

Modified:

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java?rev=983468&r1=983467&r2=983468&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
 Sun Aug  8 18:34:43 2010
@@ -741,14 +741,16 @@ public class ConfigurationContext extend
 if(log.isDebugEnabled()){
 log.debug("Invoke modules shutdown.");
 }
-HashMap modules = axisConfiguration.getModules();
-if (modules != null) {
-Iterator moduleitr = modules.values().iterator();
-while (moduleitr.hasNext()) {
-AxisModule axisModule = (AxisModule) moduleitr.next();
-Module module = axisModule.getModule();
-if (module != null) {
-module.shutdown(this);
+if(axisConfiguration!=null){
+HashMap modules = axisConfiguration.getModules();
+if (modules != null) {
+Iterator moduleitr = modules.values().iterator();
+while (moduleitr.hasNext()) {
+AxisModule axisModule = (AxisModule) moduleitr.next();
+Module module = axisModule.getModule();
+if (module != null) {
+module.shutdown(this);
+}
 }
 }
 }
@@ -757,12 +759,14 @@ public class ConfigurationContext extend
 if(log.isDebugEnabled()){
 log.debug("Invoke services shutdown.");
 }
-for (Iterator services = 
axisConfiguration.getServices().values().iterator();
-services.hasNext();) {
-AxisService axisService = (AxisService) services.next();
-ServiceLifeCycle serviceLifeCycle = 
axisService.getServiceLifeCycle();
-if (serviceLifeCycle != null) {
-serviceLifeCycle.shutDown(this, axisService);
+if(axisConfiguration!=null){
+for (Iterator services = 
axisConfiguration.getServices().values().iterator();
+services.hasNext();) {
+AxisService axisService = (AxisService) services.next();
+ServiceLifeCycle serviceLifeCycle = 
axisService.getServiceLifeCycle();
+if (serviceLifeCycle != null) {
+serviceLifeCycle.shutDown(this, axisService);
+}
 }
 }
 stopped = true;




svn commit: r987195 - in /axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws: description/ description/impl/ i18n/

2010-08-19 Thread nthaker
Author: nthaker
Date: Thu Aug 19 15:43:59 2010
New Revision: 987195

URL: http://svn.apache.org/viewvc?rev=987195&view=rev
Log:
AXIS2-4801
Adding warning message for new @Webmethod behavior on JAX-WS2.2 for migrating 
applications.

Modified:

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

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

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

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

axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/MethodRetriever.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/MethodRetriever.java?rev=987195&r1=987194&r2=987195&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/MethodRetriever.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/MethodRetriever.java
 Thu Aug 19 15:43:59 2010
@@ -55,7 +55,15 @@ public abstract class MethodRetriever {
 
 //Logging setup
 private static final Log log = LogFactory.getLog(MethodRetriever.class);
-
+private String legacyWebMethod = null;
+public String getLegacyWebMethod() {
+return legacyWebMethod;
+}
+
+public void setLegacyWebMethod(String legacyWebMethod) {
+this.legacyWebMethod = legacyWebMethod;
+}
+
 protected MethodRetriever() {}
 
 /*

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java?rev=987195&r1=987194&r2=987195&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
 Thu Aug 19 15:43:59 2010
@@ -126,7 +126,21 @@ public class DescriptionUtils {
 
 return mdcList;
 }
-
+
+static boolean isWebmethodDefined(DescriptionBuilderComposite dbc){
+if(dbc == null){
+return false;
+}
+Iterator iter = 
dbc.getMethodDescriptionsList().iterator();
+while (iter.hasNext()) {
+MethodDescriptionComposite mdc = iter.next();
+if (mdc!=null && mdc.getWebMethodAnnot() != null) {
+return true;
+}
+}
+return false;
+}
+
 /*
   * Check whether a MethodDescriptionComposite contains a WebMethod 
annotation with
   * exlude set to true

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java?rev=987195&r1=987194&r2=987195&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
 Thu Aug 19 15:43:59 2010
@@ -836,7 +836,8 @@ public class EndpointInterfaceDescriptio
 }
 //Now based on the outcome of LegacyWebmethod and sun property check, 
retrieve methods to expose.
 methodRetriever = newSunBehavior ? new 
PostRI216MethodRetrieverImpl(dbc, this) : new LegacyMethodRetrieverImpl(dbc, 
this);
-
+//set LegacyWebmethod Definition on MethodRetriever.
+methodRetriever.setLegacyWebMethod(legacyWebmethod);
 if(log.isDebugEnabled()) {
 if (newSunBehavior) {
 log.debug("getMethodRetriever: returning a 
PostRI216MethodRetrieverImpl");

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/PostRI216MethodRetrieverImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/PostRI216MethodR

svn commit: r987597 - in /axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl: DescriptionUtils.java LegacyMethodRetrieverImpl.java

2010-08-20 Thread nthaker
Author: nthaker
Date: Fri Aug 20 18:32:09 2010
New Revision: 987597

URL: http://svn.apache.org/viewvc?rev=987597&view=rev
Log:
This change restrict exposure of static methods as webservice operations when 
legacy webmethod is turned on and jaxws.runtime.restrictStaticWebmethod system 
property is set.

Modified:

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

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

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java?rev=987597&r1=987596&r2=987597&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
 Fri Aug 20 18:32:09 2010
@@ -692,4 +692,31 @@ public class DescriptionUtils {
 return "Cannot dump DescriptionBuilderComposite due to : " + t;
 }
 }
+
+/**
+ * Utility method for converting a String value into a boolean.
+ * Case-insensitive forms of true, yes, and 1 correspond to true.
+ * Case-insensitive forms of false, no, and 0 correspond to false.
+ * Anything else will result in a false being returned.
+ * 
+ * @param value
+*the property's value
+* @return
+*true or false or null if neither
+*/
+public static Boolean getBooleanValue(String value) {
+Boolean b = null;
+
+if (value.equalsIgnoreCase("true") ||
+value.equalsIgnoreCase("yes") ||
+value.equals("1")) {
+b = Boolean.TRUE;
+} else if (value.equalsIgnoreCase("false") ||
+   value.equalsIgnoreCase("no") ||
+   value.equals("0")) {
+b = Boolean.FALSE;
+}
+// Anything else will result in false
+return b;
+}
 }

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/LegacyMethodRetrieverImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/LegacyMethodRetrieverImpl.java?rev=987597&r1=987596&r2=987597&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/LegacyMethodRetrieverImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/LegacyMethodRetrieverImpl.java
 Fri Aug 20 18:32:09 2010
@@ -19,6 +19,8 @@
 
 package org.apache.axis2.jaxws.description.impl;
 
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.jaxws.ExceptionFactory;
 import org.apache.axis2.jaxws.description.MethodRetriever;
 import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
@@ -151,7 +153,8 @@ public class LegacyMethodRetrieverImpl e
  */
 private ArrayList retrieveImplicitSEIMethods(
 DescriptionBuilderComposite dbc) {
-
+final String restrictStaticWebmethod = 
"jaxws.runtime.restrictStaticWebmethod";
+
 ArrayList retrieveList =
 new ArrayList();
 
@@ -164,20 +167,36 @@ public class LegacyMethodRetrieverImpl e
 if (retrieveList == null || retrieveList.size() == 0) {
 Iterator iter = null;
 List mdcList = 
dbc.getMethodDescriptionsList();
-
+AxisConfiguration ac = 
eid.getEndpointDescription().getServiceDescription().getAxisConfigContext().getAxisConfiguration();
+Parameter p =ac.getParameter(restrictStaticWebmethod);
+
+Boolean isRestrictStaticOperation=Boolean.FALSE;
+if(p!=null){
+isRestrictStaticOperation = 
DescriptionUtils.getBooleanValue((String)p.getValue());
+if(log.isDebugEnabled()){
+log.debug("System property 
jaxws.runtime.restrictStaticWebmethod is set to :"+isRestrictStaticOperation);
+}
+}
 if (mdcList != null) {
 iter = dbc.getMethodDescriptionsList().iterator();
 while (iter.hasNext()) {
 MethodDescriptionComposite mdc = iter.next();
-
-if (!DescriptionUtils.isExcludeTrue(mdc)) {
-mdc.setDeclaringC

svn commit: r990229 - in /axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider: SourceProviderTests.java source/SourceProvider.java

2010-08-27 Thread nthaker
Author: nthaker
Date: Fri Aug 27 18:52:17 2010
New Revision: 990229

URL: http://svn.apache.org/viewvc?rev=990229&view=rev
Log:
Test case to make sure no payload is returned in response when a user returns 
empty Source from Provider api.
As per JAX-WS 2.2 spec update empty Source can be created by using default 
constructor for Source example Source s = new StreamSource(). I am adding this 
test to verify that the function is already working and that we don't regress 
that in future.

Modified:

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/SourceProviderTests.java

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/source/SourceProvider.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/SourceProviderTests.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/SourceProviderTests.java?rev=990229&r1=990228&r2=990229&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/SourceProviderTests.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/SourceProviderTests.java
 Fri Aug 27 18:52:17 2010
@@ -262,7 +262,25 @@ public class SourceProviderTests extends
 }
 
 }
+public void testProviderEmptySource() throws Exception {
+TestLogger.logger.debug("---");
+TestLogger.logger.debug("test: " + getName());
+
+Dispatch dispatch = getDispatch();
 
+String request = "ReturnEmpty";
+Source requestSource = getSource(request);
+try {
+requestSource = getSource(request);
+Source responseSource = dispatch.invoke(requestSource);
+//Expecting empty response payload back. Nothing underneath soap 
body.
+assertNull(responseSource);
+}catch(Exception e){
+e.printStackTrace();
+fail("Caught exception " + e);
+}
+
+}
 public void testTwoElementsString() throws Exception {
 TestLogger.logger.debug("---");
 TestLogger.logger.debug("test: " + getName());

Modified: 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/source/SourceProvider.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/source/SourceProvider.java?rev=990229&r1=990228&r2=990229&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/source/SourceProvider.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/provider/source/SourceProvider.java
 Fri Aug 27 18:52:17 2010
@@ -82,7 +82,10 @@ public class SourceProvider implements P
text = userFault;
 }  else if (text != null && text.contains("ReturnNull")) {
 return null;
-   }
+   }else if (text!=null && text.contains("ReturnEmpty")){
+TestLogger.logger.debug(">> Return Empty Source: \n" + text);
+return new StreamSource();
+}
 

ByteArrayInputStream stream = new ByteArrayInputStream(text.getBytes());




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

2010-08-30 Thread nthaker
Author: nthaker
Date: Mon Aug 30 21:27:15 2010
New Revision: 990950

URL: http://svn.apache.org/viewvc?rev=990950&view=rev
Log:
Adding wsdl check before logging a warning message. When using new JAX-WS 
tooling runtime does not expose any operations not defined by wsdl, hence no 
warning is necessary when a wsdl is present in application.

Modified:

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

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/PostRI216MethodRetrieverImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/PostRI216MethodRetrieverImpl.java?rev=990950&r1=990949&r2=990950&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/PostRI216MethodRetrieverImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/impl/PostRI216MethodRetrieverImpl.java
 Mon Aug 30 21:27:15 2010
@@ -23,8 +23,11 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
+import javax.wsdl.Definition;
+
 import org.apache.axis2.jaxws.ExceptionFactory;
 import org.apache.axis2.jaxws.description.MethodRetriever;
+import org.apache.axis2.jaxws.description.ServiceDescriptionWSDL;
 import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
 import org.apache.axis2.jaxws.description.builder.MDQConstants;
 import org.apache.axis2.jaxws.description.builder.MethodDescriptionComposite;
@@ -142,11 +145,12 @@ public class PostRI216MethodRetrieverImp
 Iterator iter = 
retrieveList.iterator();
 while(iter.hasNext()){
 MethodDescriptionComposite mdc = iter.next();
-//If user defined a legacyWemethod, has atleast one operation 
with @Wemethod annotation
+//If user defined a legacyWemethod with no wsdl, has atleast 
one operation with @Wemethod annotation
 //and this is a public operation with no @Webmethod operation 
that is being exposed then
 //lets warn user of possible security exposure.
-if(getLegacyWebMethod()==null && isWebmethodDefined && 
mdc.getWebMethodAnnot()==null && !isConstructor(mdc)){  
-  log.warn(Messages.getMessage("MethodRetrieverWarning1", 
mdc.getMethodName())); 
+Definition wsdlDef = 
((ServiceDescriptionWSDL)eid.getEndpointDescription().getServiceDescription()).getWSDLDefinition();
 
+if(getLegacyWebMethod()==null && wsdlDef == null && 
isWebmethodDefined && mdc.getWebMethodAnnot()==null && !isConstructor(mdc)){
+log.warn(Messages.getMessage("MethodRetrieverWarning1", 
mdc.getMethodName()));
 }
 }
 }//Done with implied SEI's




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

2010-09-20 Thread nthaker
Author: nthaker
Date: Mon Sep 20 22:00:50 2010
New Revision: 999132

URL: http://svn.apache.org/viewvc?rev=999132&view=rev
Log:
https://issues.apache.org/jira/browse/AXIS2-4824

Performance improvement patch for addressing, code contributed by Katherine 
Sanders.

Modified:

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

Modified: 
axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?rev=999132&r1=999131&r2=999132&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
 Mon Sep 20 22:00:50 2010
@@ -64,13 +64,21 @@ public class AddressingOutHandler extend
 private static final String MODULE_NAME = "addressing";
 
 public InvocationResponse invoke(MessageContext msgContext) throws 
AxisFault {
-//determine whether outbound addressing has been disabled or not.
-// Get default value from module.xml or axis2.xml files
-Parameter param = msgContext.getModuleParameter(
-DISABLE_ADDRESSING_FOR_OUT_MESSAGES, MODULE_NAME, handlerDesc);
-boolean disableAddressing =
-msgContext.isPropertyTrue(DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
+Parameter param = null;
+boolean disableAddressing = false;
+
+Object o = msgContext.getProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES);
+if (o == null || !(o instanceof Boolean)) {
+//determine whether outbound addressing has been disabled or not.
+// Get default value from module.xml or axis2.xml files
+param = 
msgContext.getModuleParameter(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, MODULE_NAME, 
handlerDesc);
+disableAddressing =
+msgContext.isPropertyTrue(DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
 
JavaUtils.isTrueExplicitly(Utils.getParameterValue(param)));
+} else {
+   Boolean bool = (Boolean)o;
+   disableAddressing = bool.booleanValue();
+}
 
 if (disableAddressing) {
 if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) {




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: 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();




svn commit: r1031629 - in /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport: TransportUtils.java http/SOAPMessageFormatter.java

2010-11-05 Thread nthaker
Author: nthaker
Date: Fri Nov  5 15:33:41 2010
New Revision: 1031629

URL: http://svn.apache.org/viewvc?rev=1031629&view=rev
Log:
This is a performance improvement change. This performance change calculated 
MTOM Threshold values only when JAX-WS runtime detects that application is 
going to send/receive MTOM attachments.

The code contribution for this change is provided by Doug Larson of IBM.

Modified:

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java?rev=1031629&r1=1031628&r2=1031629&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
 Fri Nov  5 15:33:41 2010
@@ -525,14 +525,15 @@ public class TransportUtils {
}
 
Attachments attachments = msgContext.getAttachmentMap();
-   LifecycleManager lcm = 
(LifecycleManager)msgContext.getRootContext().getAxisConfiguration().getParameterValue(DeploymentConstants.ATTACHMENTS_LIFECYCLE_MANAGER);
+
if (attachments != null) {
// Get the list of Content IDs for the attachments...but does 
not try to pull the stream for new attachments.
// (Pulling the stream for new attachments will probably 
fail...the stream is probably closed)
List keys = attachments.getContentIDList();
-   if (keys != null) {
+   if (keys != null && keys.size() > 0) {
String key = null;
File file = null;
+  LifecycleManager lcm = 
(LifecycleManager)msgContext.getRootContext().getAxisConfiguration().getParameterValue(DeploymentConstants.ATTACHMENTS_LIFECYCLE_MANAGER);

DataSource dataSource = null;
for (int i = 0; i < keys.size(); i++) {
try {

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java?rev=1031629&r1=1031628&r2=1031629&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java
 Fri Nov  5 15:33:41 2010
@@ -55,14 +55,15 @@ public class SOAPMessageFormatter implem
 }
 OMElement element = msgCtxt.getEnvelope();
 
-int optimizedThreshold = Utils.getMtomThreshold(msgCtxt);   
-if(optimizedThreshold > 0){
-   if(log.isDebugEnabled()){
-   log.debug("Setting MTOM optimized Threshold Value on 
OMOutputFormat");
-   }
-   format.setOptimizedThreshold(optimizedThreshold);
-}  
-
+if (msgCtxt.isDoingMTOM()) {   
+int optimizedThreshold = Utils.getMtomThreshold(msgCtxt);   
+if(optimizedThreshold > 0){
+   if(log.isDebugEnabled()){
+   log.debug("Setting MTOM optimized Threshold Value on 
OMOutputFormat");
+   }
+   format.setOptimizedThreshold(optimizedThreshold);
+}  
+}
 try {
 if (!(format.isOptimized()) && format.isDoingSWA()) {
 // Write the SOAPBody to an output stream




svn commit: r1035769 - /axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/lifecycle/BaseLifecycleManager.java

2010-11-16 Thread nthaker
Author: nthaker
Date: Tue Nov 16 20:00:10 2010
New Revision: 1035769

URL: http://svn.apache.org/viewvc?rev=1035769&view=rev
Log:
Fix for JIRA AXIS2-4884

With this change @PostConstruct on non-public methods can now be invoked and we 
will not see java.lang.IllegalAccessException.

Modified:

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/lifecycle/BaseLifecycleManager.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/lifecycle/BaseLifecycleManager.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/lifecycle/BaseLifecycleManager.java?rev=1035769&r1=1035768&r2=1035769&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/lifecycle/BaseLifecycleManager.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/lifecycle/BaseLifecycleManager.java
 Tue Nov 16 20:00:10 2010
@@ -49,10 +49,32 @@ public abstract class BaseLifecycleManag
 }
 }
 
-protected void invokePostConstruct(Method method) throws 
LifecycleException {
+protected void invokePostConstruct(final Method method) throws 
LifecycleException {
 if (log.isDebugEnabled()) {
 log.debug("Invoking Method with @PostConstruct annotation");
 }
+/*
+ * As per JSR-250 pre destroy and post construct can be
+ * public, protected, private or default encapsulation.
+ * I will check and make sure the methods are accessible
+ * before we invoke them.
+ * 
+ */
+
+try {
+AccessController.doPrivileged(
+new PrivilegedExceptionAction() {
+public Object run() throws InvocationTargetException, 
IllegalAccessException {
+if(!method.isAccessible()){
+method.setAccessible(true);
+}
+return null;
+}
+}
+);
+} catch (PrivilegedActionException e) {
+throw new LifecycleException(e.getException());
+}
 invokeMethod(method, null);
 if (log.isDebugEnabled()) {
 log.debug("Completed invoke on Method with @PostConstruct 
annotation");