svn commit: r923426 - in /axis/axis2/java/core/trunk/modules/metadata: src/org/apache/axis2/jaxws/description/builder/MDQConstants.java test/org/apache/axis2/jaxws/description/builder/WebServiceFeatur

2010-03-15 Thread barrettj
Author: barrettj
Date: Mon Mar 15 20:39:31 2010
New Revision: 923426

URL: http://svn.apache.org/viewvc?rev=923426&view=rev
Log:
Support for client-side WebServiceFeature settings to be configured via DBC.  
Associated TDD test.

Added:

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

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

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java?rev=923426&r1=923425&r2=923426&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java
 Mon Mar 15 20:39:31 2010
@@ -58,6 +58,11 @@ public class MDQConstants {
 public static final String HANDLER_CHAIN_DECLARING_CLASS = 
"HANDLER_CHAIN_DECLARING_CLASS";
 
 public static final String SEI_MTOM_ENABLEMENT_MAP = 
"org.apache.axis2.jaxws.description.builder.SEI_MTOM_ENABLEMENT_MAP";
+// Note that this property is ONLY used on the client-side, not the server 
side.
+// Value is Map> where
+// String: SEI Class name (i.e. the port name)
+// Annotation: The list of WebServiceFeatures expressed as the 
corresponding Annotation related to that Port
+public static final String SEI_FEATURES_MAP = 
"org.apache.axis2.jaxws.description.build.SEI_FEATURES_MAP";
 public static final String BINDING_PROPS_MAP = 
"org.apache.axis2.jaxws.description.builder.BINDING_PROPS_MAP";
 
 //Represent SOAP/JMS Bindings

Added: 
axis/axis2/java/core/trunk/modules/metadata/test/org/apache/axis2/jaxws/description/builder/WebServiceFeatureTests.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/test/org/apache/axis2/jaxws/description/builder/WebServiceFeatureTests.java?rev=923426&view=auto
==
--- 
axis/axis2/java/core/trunk/modules/metadata/test/org/apache/axis2/jaxws/description/builder/WebServiceFeatureTests.java
 (added)
+++ 
axis/axis2/java/core/trunk/modules/metadata/test/org/apache/axis2/jaxws/description/builder/WebServiceFeatureTests.java
 Mon Mar 15 20:39:31 2010
@@ -0,0 +1,79 @@
+/*
+ * 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.description.builder;
+
+import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+
+/**
+ * Validate setting WebServiceFeatures on client-side DBC objects.
+ */
+public class WebServiceFeatureTests extends TestCase {
+
+public void testSetFeaturePropertyOnDBC() {
+DescriptionBuilderComposite sparseComposite = new 
DescriptionBuilderComposite();
+sparseComposite.getProperties().put(MDQConstants.SEI_FEATURES_MAP, 
null);
+assertNull("Property could not be retreived", 
+
sparseComposite.getProperties().get(MDQConstants.SEI_FEATURES_MAP));
+}
+
+public void testSetFeatureValueOnDBC() {
+DescriptionBuilderComposite sparseComposite = new 
DescriptionBuilderComposite();
+Map> map = new HashMap();
+
+ArrayList wsFeatures1 = new ArrayList();
+Annotation seiFeature1 = new MTOMAnnot();
+wsFeatures1.add(seiFeature1);
+Annotation seiFeature2 = new RespectBindingAnnot();
+wsFeatures1.add(seiFeature2);
+Annotation seiFeature3 = new AddressingAnnot();
+wsFeatures1.add(seiFeature3);
+map.put("sei1", wsFeatures1);
+
+ArrayList wsFeatures2 = new ArrayList();
+Annotation sei2Feature1

svn commit: r923428 - /axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java

2010-03-15 Thread barrettj
Author: barrettj
Date: Mon Mar 15 20:46:12 2010
New Revision: 923428

URL: http://svn.apache.org/viewvc?rev=923428&view=rev
Log:
Fix value for SEI_FEATURES_MAP

Modified:

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

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java?rev=923428&r1=923427&r2=923428&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MDQConstants.java
 Mon Mar 15 20:46:12 2010
@@ -62,7 +62,7 @@ public class MDQConstants {
 // Value is Map> where
 // String: SEI Class name (i.e. the port name)
 // Annotation: The list of WebServiceFeatures expressed as the 
corresponding Annotation related to that Port
-public static final String SEI_FEATURES_MAP = 
"org.apache.axis2.jaxws.description.build.SEI_FEATURES_MAP";
+public static final String SEI_FEATURES_MAP = 
"org.apache.axis2.jaxws.description.builder.SEI_FEATURES_MAP";
 public static final String BINDING_PROPS_MAP = 
"org.apache.axis2.jaxws.description.builder.BINDING_PROPS_MAP";
 
 //Represent SOAP/JMS Bindings




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

2010-03-19 Thread barrettj
Author: barrettj
Date: Fri Mar 19 20:21:32 2010
New Revision: 925405

URL: http://svn.apache.org/viewvc?rev=925405&view=rev
Log:
Correct logic so that newly created AxisOperations are added to AxisService 
when the SEI contains an @Action(input=) where input matches the operation name 
localpart.

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=925405&r1=925404&r2=925405&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 Mar 19 20:21:32 2010
@@ -570,8 +570,14 @@ class OperationDescriptionImpl
 void addToAxisService(AxisService axisService) {
 AxisOperation newAxisOperation = getAxisOperation();
 QName axisOpQName = newAxisOperation.getName();
-AxisOperation axisOperation = axisService.getOperation(axisOpQName);
-if (axisOperation == null) {
+// See if this operation is already added to the AxisService.  Note 
that we need to check the 
+// children of the service rather than using the 
getOperation(axisOpQName) method.  The reason is 
+// that method checks the alias table in addition to the children, and 
it is possible at this point
+// for an operation to have just been added to the alias table but not 
yet as a child.  It is this method
+// that will add that newly-created operation to the service.
+AxisOperation existingAxisOperation = (AxisOperation) 
axisService.getChild(axisOpQName);
+
+if (existingAxisOperation == null) {
 axisService.addOperation(newAxisOperation);
 // For a Doc/Lit/Bare operation, we also need to add the element 
mapping
 }
@@ -581,8 +587,8 @@ class OperationDescriptionImpl
 .BARE) {
 AxisMessage axisMessage =
 null;
-if (axisOperation!=null) {
-axisMessage = 
axisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+if (existingAxisOperation!=null) {
+axisMessage = 
existingAxisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
 } else {
 axisMessage = 
newAxisOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
 }




svn commit: r929963 - in /axis/axis2/java/core/trunk/modules: addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java integration/test/org/apache/axis2/addressing/MultiHopRedirec

2010-04-01 Thread barrettj
Author: barrettj
Date: Thu Apr  1 13:36:35 2010
New Revision: 929963

URL: http://svn.apache.org/viewvc?rev=929963&view=rev
Log:
AXIS2-4601
Patch contributed by Katherine Sanders to revert previous change made under 4601

Modified:

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

axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/addressing/MultiHopRedirectService1.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=929963&r1=929962&r2=929963&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
 Thu Apr  1 13:36:35 2010
@@ -452,7 +452,7 @@ public class AddressingOutHandler extend
 epr = new EndpointReference(anonymous);
 }
 }
-else if ((!isFinalAddressingNamespace || 
messageContext.isServerSide()) && epr.hasNoneAddress()) {
+else if (!isFinalAddressingNamespace && epr.hasNoneAddress()) {
 return; //Omit the header.
 }
 else if (epr.isWSAddressingAnonymous())

Modified: 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/addressing/MultiHopRedirectService1.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/addressing/MultiHopRedirectService1.java?rev=929963&r1=929962&r2=929963&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/addressing/MultiHopRedirectService1.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/integration/test/org/apache/axis2/addressing/MultiHopRedirectService1.java
 Thu Apr  1 13:36:35 2010
@@ -32,7 +32,6 @@ public class MultiHopRedirectService1 {
 currOutMc.setTo(new EndpointReference("http://127.0.0.1:"; + 
(UtilServer.TESTING_PORT) +
 "/axis2/services/MultiHopRedirectService2/echoRedirect"));
 currOutMc.setReplyTo(currInMc.getReplyTo());
-currOutMc.setServerSide(false);
 return ome;
 }
 }




svn commit: r931598 - in /axis/axis2/java/core/trunk/modules: jaxws/src/org/apache/axis2/jaxws/ jaxws/src/org/apache/axis2/jaxws/binding/ jaxws/src/org/apache/axis2/jaxws/client/proxy/ jaxws/test/org/

2010-04-07 Thread barrettj
Author: barrettj
Date: Wed Apr  7 15:57:53 2010
New Revision: 931598

URL: http://svn.apache.org/viewvc?rev=931598&view=rev
Log:
Add support for setting MTOM threshold via a DBC sparse composite as would be 
used for a deploment descriptor.  Add associated TDD test.

Added:

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/spi/ClientMetadataMTOMFeatureTests.java
Modified:

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

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/binding/SOAPBinding.java

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java

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

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

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

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java?rev=931598&r1=931597&r2=931598&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
 Wed Apr  7 15:57:53 2010
@@ -28,6 +28,7 @@ import org.apache.axis2.jaxws.client.Pro
 import org.apache.axis2.jaxws.core.InvocationContext;
 import org.apache.axis2.jaxws.core.MessageContext;
 import org.apache.axis2.jaxws.description.EndpointDescription;
+import org.apache.axis2.jaxws.description.ServiceDescription;
 import org.apache.axis2.jaxws.description.ServiceDescriptionWSDL;
 import org.apache.axis2.jaxws.handler.HandlerResolverImpl;
 import org.apache.axis2.jaxws.i18n.Messages;
@@ -126,6 +127,7 @@ public class BindingProvider implements 
 // MTOM can be enabled either at the ServiceDescription level (via 
the WSDL binding type) or
 // at the EndpointDescription level via the binding type used to 
create a Dispatch.
 boolean enableMTOMFromMetadata = false;
+int mtomThreshold = 0;
 
 // if we have an SEI for the port, then we'll use it in order to 
search for MTOM configuration
 if(endpointDesc.getEndpointInterfaceDescription() != null
@@ -133,9 +135,13 @@ public class BindingProvider implements 
 
endpointDesc.getEndpointInterfaceDescription().getSEIClass() != null) {
 enableMTOMFromMetadata = 
endpointDesc.getServiceDescription().isMTOMEnabled(serviceDelegate, 

endpointDesc.getEndpointInterfaceDescription().getSEIClass());
+mtomThreshold = 
getMTOMThreshold(endpointDesc.getServiceDescription(), serviceDelegate,
+
endpointDesc.getEndpointInterfaceDescription().getSEIClass());
 }
 else {
 enableMTOMFromMetadata = 
endpointDesc.getServiceDescription().isMTOMEnabled(serviceDelegate);
+// Threshold does not need to be set here based on the sparse 
composite (i.e. depolyment descriptor)
+// since it can only be applied to a port injection (i.e. an 
SEI) using a DD.
 }
 if (!enableMTOMFromMetadata) {
 String bindingType = endpointDesc.getClientBindingID();
@@ -145,6 +151,7 @@ public class BindingProvider implements 
 
 if (enableMTOMFromMetadata) {
 ((SOAPBinding) binding).setMTOMEnabled(true);
+((SOAPBinding) binding).setMTOMThreshold(mtomThreshold);
 }
 }
 
@@ -179,6 +186,12 @@ public class BindingProvider implements 
 }
 }
 
+private int getMTOMThreshold(ServiceDescription serviceDescription, 
ServiceDelegate serviceDelegate, Class seiClass) {
+int threshold = serviceDescription.getMTOMThreshold(serviceDelegate, 
seiClass);
+
+return threshold;
+}
+
 public ServiceDelegate getServiceDelegate() {
 return serviceDelegate;
 }

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/binding/SOAPBinding.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/binding/SOAPBinding.java?rev=931598&r1=931597&r2=931598&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/binding/SOAPBinding.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/s

svn commit: r932570 - in /axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2: datasource/jaxb/JAXBAttachmentMarshaller.java jaxws/message/attachments/JAXBAttachmentMarshaller.java

2010-04-09 Thread barrettj
Author: barrettj
Date: Fri Apr  9 20:07:06 2010
New Revision: 932570

URL: http://svn.apache.org/viewvc?rev=932570&view=rev
Log:
Support for MTOM.threshold on the client set via a WebServiceFeature on the 
factory APIs or via a sparse composite.

Modified:

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/attachments/JAXBAttachmentMarshaller.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java?rev=932570&r1=932569&r2=932570&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java
 Fri Apr  9 20:07:06 2010
@@ -111,32 +111,35 @@ public class JAXBAttachmentMarshaller ex
 
 String cid = null;
 
-try {
-// Create MIME Body Part
-InternetHeaders ih = new InternetHeaders();
-ih.setHeader(HTTPConstants.HEADER_CONTENT_TYPE, mimeType);
-MimeBodyPart mbp = new MimeBodyPart(ih, data);
-
-//Create a data source for the MIME Body Part
-MimePartDataSource mpds = new MimePartDataSource(mbp);
-long dataLength =data.length;
-Integer value = null;
-if (msgContext != null) {
-value = (Integer) 
msgContext.getProperty(Constants.Configuration.MTOM_THRESHOLD);
-}
-int optimizedThreshold = (value != null) ? value.intValue() : 
0;
-
-if(optimizedThreshold==0 || dataLength > optimizedThreshold){
-   DataHandler dataHandler = new DataHandler(mpds);
-   cid = addDataHandler(dataHandler);
-}
-
-// Add the content id to the mime body part
-mbp.setHeader(HTTPConstants.HEADER_CONTENT_ID, cid);
-} catch (MessagingException e) {
-throw new OMException(e);
+try {
+// Create MIME Body Part
+InternetHeaders ih = new InternetHeaders();
+ih.setHeader(HTTPConstants.HEADER_CONTENT_TYPE, mimeType);
+MimeBodyPart mbp = new MimeBodyPart(ih, data);
+
+//Create a data source for the MIME Body Part
+MimePartDataSource mpds = new MimePartDataSource(mbp);
+long dataLength =data.length;
+Integer value = null;
+if (msgContext != null) {
+value = (Integer) 
msgContext.getProperty(Constants.Configuration.MTOM_THRESHOLD);
+} else if (log.isDebugEnabled()) {
+log.debug("The msgContext is null so the MTOM threshold value 
can not be determined; it will default to 0.");
 }
-
+
+int optimizedThreshold = (value != null) ? value.intValue() : 0;
+
+if(optimizedThreshold==0 || dataLength > optimizedThreshold){
+DataHandler dataHandler = new DataHandler(mpds);
+cid = addDataHandler(dataHandler);
+}
+
+// Add the content id to the mime body part
+mbp.setHeader(HTTPConstants.HEADER_CONTENT_ID, cid);
+} catch (MessagingException e) {
+throw new OMException(e);
+}
+
 return cid == null ? null : "cid:" + cid;
 }
 

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/attachments/JAXBAttachmentMarshaller.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/attachments/JAXBAttachmentMarshaller.java?rev=932570&r1=932569&r2=932570&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/attachments/JAXBAttachmentMarshaller.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/attachments/JAXBAttachmentMarshaller.java
 Fri Apr  9 20:07:06 2010
@@ -19,6 +19,7 @@
 
 package org.apache.axis2.jaxws.message.attachments;
 
+import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.jaxws.message.Message;
 
 import javax.activation.DataHandler;
@@ -32,9 +33,24 @@ public class JAXBAttachmentMarshaller ex
 private Message message;
 
 public JAXBAttachmentMarshaller(Message message, XMLStreamWriter writer) {
-super(null, writer);

svn commit: r933413 - in /axis/axis2/java/core/trunk/modules: jaxws/src/org/apache/axis2/jaxws/ jaxws/src/org/apache/axis2/jaxws/binding/ jaxws/test/org/apache/axis2/jaxws/spi/ metadata/src/org/apache

2010-04-12 Thread barrettj
Author: barrettj
Date: Mon Apr 12 21:04:49 2010
New Revision: 933413

URL: http://svn.apache.org/viewvc?rev=933413&view=rev
Log:
Add support for RespectBinding feature set via a sparse composite (such as via 
a deployment descriptor).  Add associated TDD test.

Added:

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/spi/ClientMetadataRespectBindingFeatureTests.java
Modified:

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

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/binding/SOAPBinding.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/spi/ClientMetadataMTOMFeatureTests.java

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

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

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java?rev=933413&r1=933412&r2=933413&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
 Mon Apr 12 21:04:49 2010
@@ -122,37 +122,9 @@ public class BindingProvider implements 
 }
 }
 
-// See if the metadata from creating the service indicates that MTOM 
should be enabled
+// See if the metadata from creating the service indicates that MTOM 
and/or RespectBinding should be enabled
 if (binding instanceof SOAPBinding) {
-// MTOM can be enabled either at the ServiceDescription level (via 
the WSDL binding type) or
-// at the EndpointDescription level via the binding type used to 
create a Dispatch.
-boolean enableMTOMFromMetadata = false;
-int mtomThreshold = 0;
-
-// if we have an SEI for the port, then we'll use it in order to 
search for MTOM configuration
-if(endpointDesc.getEndpointInterfaceDescription() != null
-&&
-
endpointDesc.getEndpointInterfaceDescription().getSEIClass() != null) {
-enableMTOMFromMetadata = 
endpointDesc.getServiceDescription().isMTOMEnabled(serviceDelegate, 
-   
endpointDesc.getEndpointInterfaceDescription().getSEIClass());
-mtomThreshold = 
getMTOMThreshold(endpointDesc.getServiceDescription(), serviceDelegate,
-
endpointDesc.getEndpointInterfaceDescription().getSEIClass());
-}
-else {
-enableMTOMFromMetadata = 
endpointDesc.getServiceDescription().isMTOMEnabled(serviceDelegate);
-// Threshold does not need to be set here based on the sparse 
composite (i.e. depolyment descriptor)
-// since it can only be applied to a port injection (i.e. an 
SEI) using a DD.
-}
-if (!enableMTOMFromMetadata) {
-String bindingType = endpointDesc.getClientBindingID();
-enableMTOMFromMetadata = 
(bindingType.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING) || 
-  
bindingType.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING));
-}
-
-if (enableMTOMFromMetadata) {
-((SOAPBinding) binding).setMTOMEnabled(true);
-((SOAPBinding) binding).setMTOMThreshold(mtomThreshold);
-}
+configureBindingFromMetadata();
 }
 
 // check for properties that need to be set on the BindingProvider
@@ -186,6 +158,55 @@ public class BindingProvider implements 
 }
 }
 
+/**
+ * Configure the binding from the Metadata for MTOM and RespectBinding.
+ */
+private void configureBindingFromMetadata() {
+// MTOM can be enabled either at the ServiceDescription level (via the 
WSDL binding type) or
+// at the EndpointDescription level via the binding type used to 
create a Dispatch.
+boolean enableMTOMFromMetadata = false;
+int mtomThreshold = 0;
+boolean enableRespectBindingdFromMetadata = false;
+
+// if we have an SEI for the port, then we'll use it in order to 
search for MTOM configuration
+if(endpointDesc.getEndpointInterfaceDescription() != null
+&&
+endpointDesc.getEndpointInterfaceDescription().getSEIClass() 
!= null) {
+enableMTOMFromMetadata = 
endpointDesc.getServiceD

svn commit: r937071 - in /axis/axis2/java/core/trunk/modules: jaxws-integration/ metadata/ metadata/src/org/apache/axis2/jaxws/server/config/ metadata/test/org/apache/axis2/jaxws/description/feature/

2010-04-22 Thread barrettj
Author: barrettj
Date: Thu Apr 22 21:24:25 2010
New Revision: 937071

URL: http://svn.apache.org/viewvc?rev=937071&view=rev
Log:
Add support for JAXWS 2.2 Addressing.responses annotation attribute.  Add 
associated TDD tests.  Modify pom.xml to pickup annotations from JAXWS 2.2 jar 
instead of the JAXWS 2.1 classes in the JDK.

Modified:
axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml
axis/axis2/java/core/trunk/modules/metadata/pom.xml

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

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

Modified: axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml?rev=937071&r1=937070&r2=937071&view=diff
==
--- axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml Thu Apr 22 
21:24:25 2010
@@ -34,6 +34,10 @@
 
 
 org.apache.geronimo.specs
+geronimo-jaxws_2.2_spec
+
+
+org.apache.geronimo.specs
 geronimo-annotation_1.0_spec
 
 
@@ -114,6 +118,28 @@
 
 
 
+maven-dependency-plugin
+
+
+generate-sources
+
+copy
+
+
+
+
+
org.apache.geronimo.specs
+
geronimo-jaxws_2.2_spec
+jar
+true
+
target/endorsed
+ 
+
+
+
+
+
+
 maven-compiler-plugin
 true
 
@@ -1360,7 +1386,7 @@
 true
 
 pertest
--Xms256m -Xmx512m
+-Xms256m -Xmx512m 
-Xbootclasspath/p:${basedir}/target/endorsed/geronimo-jaxws_2.2_spec-1.0-SNAPSHOT.jar
 
 

Modified: axis/axis2/java/core/trunk/modules/metadata/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/pom.xml?rev=937071&r1=937070&r2=937071&view=diff
==
--- axis/axis2/java/core/trunk/modules/metadata/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/metadata/pom.xml Thu Apr 22 21:24:25 2010
@@ -143,15 +143,15 @@
 copy
 
 
- 
-   
- org.apache.geronimo.specs
- geronimo-jaxws_2.2_spec
- jar
- true
- target/endorsed
-   
- 
+
+
+
org.apache.geronimo.specs
+
geronimo-jaxws_2.2_spec
+jar
+true
+
target/endorsed
+ 
+
 
 
 
@@ -257,6 +257,9 @@
 maven-surefire-plugin
 true
 
+
+
-Xbootclasspath/p:${basedir}/target/endorsed/geronimo-jaxws_2.2_spec-1.0-SNAPSHOT.jar
   
+
 
 **/*Tests.java
 

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/server/config/AddressingConfigurator.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/server/config/AddressingConfigurator.java?rev=937071&r1=937070&r2=937071&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/server/config/AddressingConfigurator.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/server/config/AddressingConfigurator.java
 Thu Apr 22 21:24:25 2010
@@ -38,6 +38,7 @@ import org.apache.axis2.util.Utils;
 
 impo

svn commit: r938189 - in /axis/axis2/java/core/trunk/modules/metadata: src/org/apache/axis2/jaxws/description/builder/ test/org/apache/axis2/jaxws/description/builder/

2010-04-26 Thread barrettj
Author: barrettj
Date: Mon Apr 26 18:51:19 2010
New Revision: 938189

URL: http://svn.apache.org/viewvc?rev=938189&view=rev
Log:
Add toString method to feature annots and modify DBC toString to include the 
WebService Feature list.

Added:

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

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

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

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

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

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/AddressingAnnot.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/AddressingAnnot.java?rev=938189&r1=938188&r2=938189&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/AddressingAnnot.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/AddressingAnnot.java
 Mon Apr 26 18:51:19 2010
@@ -57,4 +57,17 @@ public class AddressingAnnot implements 
 return Addressing.class;
 }
 
+public String toString() {
+String string = null;
+try {
+string = "@" + getClass().getName() 
++ "(enabled=" + enabled
++ ", required=" + required
++ ", responses=" + responses
++ ")";
+} catch (Throwable t) {
+string = super.toString() + ": caught exception in toString(): " + 
t;
+}
+return string;
+}
 }

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java?rev=938189&r1=938188&r2=938189&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/DescriptionBuilderComposite.java
 Mon Apr 26 18:51:19 2010
@@ -924,6 +924,17 @@ public class DescriptionBuilderComposite
 FieldDescriptionComposite fdc = fdcIter.next();
sb.append(fdc.toString());
}
+
+if (features != null && !features.isEmpty()) {
+sb.append(newLine);
+sb.append(newLine);
+sb.append("WebService Feature Objects (as annotations):");
+sb.append(newLine);
+for (Annotation annotation : features) {
+sb.append(annotation.toString());
+sb.append(newLine);
+}
+}
 
 if(portCompositeList != null
 &&

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MTOMAnnot.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MTOMAnnot.java?rev=938189&r1=938188&r2=938189&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MTOMAnnot.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/MTOMAnnot.java
 Mon Apr 26 18:51:19 2010
@@ -46,4 +46,17 @@ public class MTOMAnnot implements MTOM {
 public Class annotationType() {
 return MTOM.class;
 }
+
+public String toString() {
+String string = null;
+try {
+string = "@" + getClass().getName() 
++ "(enabled=" + enabled
++ ", threshold=" + threshold
++ ")";
+} catch (Throwable t) {
+string = super.toString() + ": caught exception in toString(): " + 
t;
+}
+return string;
+}
 }

Modified: 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/description/builder/RespectBindingAnnot.java
URL: 
http://sv

svn commit: r938653 - in /axis/axis2/java/core/trunk/modules: jaxws-integration/pom.xml metadata/pom.xml parent/pom.xml

2010-04-27 Thread barrettj
Author: barrettj
Date: Tue Apr 27 21:21:52 2010
New Revision: 938653

URL: http://svn.apache.org/viewvc?rev=938653&view=rev
Log:
Changed Geronimo JAXWS 2.2 dependency to 1.0 rather than SNAPSHOT.  Fixed 
jaxws-integration bootclasspath specification to be platform independent.

Modified:
axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml
axis/axis2/java/core/trunk/modules/metadata/pom.xml
axis/axis2/java/core/trunk/modules/parent/pom.xml

Modified: axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml?rev=938653&r1=938652&r2=938653&view=diff
==
--- axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml Tue Apr 27 
21:21:52 2010
@@ -1397,7 +1397,7 @@
 true
 
 pertest
--Xms256m -Xmx512m 
-Xbootclasspath/p:${project.build.directory}/endorsed/jaxb-api.jar:${project.build.directory}/endorsed/geronimo-saaj_1.3_spec.jar:${project.build.directory}/endorsed/geronimo-jaxws_2.2_spec.jar
+-Xms256m -Xmx512m 
-Xbootclasspath/p:${project.build.directory}/endorsed/jaxb-api.jar${path.separator}${project.build.directory}/endorsed/geronimo-saaj_1.3_spec.jar${path.separator}${project.build.directory}/endorsed/geronimo-jaxws_2.2_spec.jar
 
 

Modified: axis/axis2/java/core/trunk/modules/metadata/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/pom.xml?rev=938653&r1=938652&r2=938653&view=diff
==
--- axis/axis2/java/core/trunk/modules/metadata/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/metadata/pom.xml Tue Apr 27 21:21:52 2010
@@ -148,10 +148,11 @@
 
org.apache.geronimo.specs
 
geronimo-jaxws_2.2_spec
 jar
-true
-
target/endorsed
  
 
+true
+
${project.build.directory}/endorsed
+true
 
 
 
@@ -169,7 +170,7 @@
 true
 
 
-
-Xbootclasspath/p:${basedir}/target/endorsed/geronimo-jaxws_2.2_spec-1.0-SNAPSHOT.jar
   
+
-Xbootclasspath/p:${project.build.directory}/endorsed/geronimo-jaxws_2.2_spec.jar
   
 
 1.5
 1.5
@@ -258,7 +259,7 @@
 true
 
 
-
-Xbootclasspath/p:${basedir}/target/endorsed/geronimo-jaxws_2.2_spec-1.0-SNAPSHOT.jar
   
+
-Xbootclasspath/p:${project.build.directory}/endorsed/geronimo-jaxws_2.2_spec.jar
   
 
 
 **/*Tests.java

Modified: axis/axis2/java/core/trunk/modules/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/parent/pom.xml?rev=938653&r1=938652&r2=938653&view=diff
==
--- axis/axis2/java/core/trunk/modules/parent/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/parent/pom.xml Tue Apr 27 21:21:52 2010
@@ -110,7 +110,7 @@
 1.0.1
 1.1.2
 1.0.1
-1.0-SNAPSHOT
+1.0
 4.0
 5.0
 1.5rc3




svn commit: r938986 - in /axis/axis2/java/core/trunk/modules: jaxws/ jaxws/src/org/apache/axis2/jaxws/client/config/ jaxws/test/org/apache/axis2/jaxws/client/dispatch/ jaxws/test/org/apache/axis2/jaxw

2010-04-28 Thread barrettj
Author: barrettj
Date: Wed Apr 28 14:37:43 2010
New Revision: 938986

URL: http://svn.apache.org/viewvc?rev=938986&view=rev
Log:
Add support for JAXWS 2.2 Addressing.responses on client side.

Modified:
axis/axis2/java/core/trunk/modules/jaxws/pom.xml

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/config/AddressingConfigurator.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/dispatch/DispatchAddressingFeatureTest.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/proxy/ProxyAddressingFeatureTest.java

axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/server/config/AddressingConfigurator.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=938986&r1=938985&r2=938986&view=diff
==
--- axis/axis2/java/core/trunk/modules/jaxws/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/jaxws/pom.xml Wed Apr 28 14:37:43 2010
@@ -37,6 +37,10 @@
 geronimo-annotation_1.0_spec
 
 
+org.apache.geronimo.specs
+geronimo-jaxws_2.2_spec
+
+
 org.apache.axis2
 axis2-kernel
 ${version}
@@ -150,6 +154,38 @@
 
 
 
+maven-dependency-plugin
+
+
+generate-sources
+
+copy
+
+
+
+
+javax.xml.bind
+jaxb-api
+jar
+
+
+
org.apache.geronimo.specs
+
geronimo-saaj_1.3_spec
+jar
+
+
+
org.apache.geronimo.specs
+
geronimo-jaxws_2.2_spec
+ 
+
+true
+
${project.build.directory}/endorsed
+true
+
+
+
+
+
   maven-jar-plugin
   
   
@@ -162,7 +198,7 @@
 true
 
 
-
-Xbootclasspath/p:${basedir}/../jaxws-api/target/classes${path.separator}${basedir}/../jws-api/target/classes
+
-Xbootclasspath/p:${project.build.directory}/endorsed/geronimo-jaxws_2.2_spec.jar${path.separator}${basedir}/../jaxws-api/target/classes${path.separator}${basedir}/../jws-api/target/classes
 
 1.5
 1.5
@@ -282,7 +318,7 @@
 true
 
 once
--Xms256m -Xmx512m
+-Xms256m -Xmx512m 
-Xbootclasspath/p:${project.build.directory}/endorsed/jaxb-api.jar${path.separator}${project.build.directory}/endorsed/geronimo-saaj_1.3_spec.jar${path.separator}${project.build.directory}/endorsed/geronimo-jaxws_2.2_spec.jar
 
 

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/config/AddressingConfigurator.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/config/AddressingConfigurator.java?rev=938986&r1=938985&r2=938986&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/config/AddressingConfigurator.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/config/AddressingConfigurator.java
 Wed Apr 28 14:37:43 2010
@@ -167,6 +167,13 @@ public class AddressingConfigurator impl
 
 messageContext.setProperty(AddressingConstants.WS_ADDRESSING_VERSION, 
addressingNamespace);
 
messageContext.setProperty(AddressingConstants.DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
 disableAddressing);
+
+// If the Addressing feature was specified, then get the responses 
value from it and map to the value 
+// the addressing handler expects
+if (addressingFeature != null) {
+
messageContext.setProperty(AddressingConstants.WSAM_INVOCATION_PATTERN_PARAMETER_NAME,
 
+ 

svn commit: r939784 - in /axis/axis2/java/core/trunk/modules/jaxws: src/org/apache/axis2/jaxws/addressing/util/ src/org/apache/axis2/jaxws/spi/ test-resources/wsdl/ test/org/apache/axis2/jaxws/spi/

2010-04-30 Thread barrettj
Author: barrettj
Date: Fri Apr 30 19:12:58 2010
New Revision: 939784

URL: http://svn.apache.org/viewvc?rev=939784&view=rev
Log:
AXIS2-4699, patch submitted by Katherine Sanders.  Add new 
Provider.createW3CEndpointReference method for JAXWS 2.2.

Added:
axis/axis2/java/core/trunk/modules/jaxws/test-resources/wsdl/Echo.wsdl
axis/axis2/java/core/trunk/modules/jaxws/test-resources/wsdl/Invalid.wsdl

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/spi/ProviderTests.java
Modified:

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/addressing/util/EndpointReferenceUtils.java

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/Provider.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/addressing/util/EndpointReferenceUtils.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/addressing/util/EndpointReferenceUtils.java?rev=939784&r1=939783&r2=939784&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/addressing/util/EndpointReferenceUtils.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/addressing/util/EndpointReferenceUtils.java
 Fri Apr 30 19:12:58 2010
@@ -22,6 +22,7 @@ package org.apache.axis2.jaxws.addressin
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.addressing.EndpointReferenceHelper;
 import org.apache.axis2.addressing.metadata.InterfaceName;
@@ -39,6 +40,8 @@ import javax.xml.transform.stream.Stream
 import javax.xml.transform.stream.StreamSource;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.util.List;
+import java.util.Map;
 
 public final class EndpointReferenceUtils {
 
@@ -164,6 +167,34 @@ public final class EndpointReferenceUtil
 /**
  * 
  * @param axis2EPR
+ * @param elements
+ * @throws Exception
+ */
+public static void addExtensibleElements(EndpointReference axis2EPR, 
Element... elements)
+throws Exception {
+if (elements != null) {
+for (Element element : elements) {
+OMElement omElement = XMLUtils.toOM(element);
+axis2EPR.addExtensibleElement(omElement);
+}
+}
+}
+
+public static void addExtensibleAttributes(EndpointReference axis2EPR, 
Map attributes)
+throws Exception {
+if (attributes != null) {
+OMFactory fac = OMAbstractFactory.getOMFactory();
+for (Map.Entry attribute : attributes.entrySet()) {
+QName qName = attribute.getKey();
+OMNamespace omNamespace = 
fac.createOMNamespace(qName.getNamespaceURI(), qName.getPrefix());
+axis2EPR.addAttribute(qName.getLocalPart(), omNamespace, 
attribute.getValue());
+}
+}
+}
+
+/**
+ * 
+ * @param axis2EPR
  * @param metadata
  * @throws Exception
  */

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/Provider.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/Provider.java?rev=939784&r1=939783&r2=939784&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/Provider.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/Provider.java
 Fri Apr 30 19:12:58 2010
@@ -40,6 +40,7 @@ import javax.xml.ws.spi.ServiceDelegate;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 import java.net.URL;
 import java.util.List;
+import java.util.Map;
 
 public class Provider extends javax.xml.ws.spi.Provider {
 private static final Log log = LogFactory.getLog(Provider.class);
@@ -114,6 +115,51 @@ public class Provider extends javax.xml.
 
 return w3cEPR;
 }
+
+@Override
+public W3CEndpointReference createW3CEndpointReference(String address,
+QName interfaceName, 
+QName serviceName,
+QName portName,
+List metadata,
+String wsdlDocumentLocation,
+List referenceParameters,
+List elements,
+Map attributes) {
+String addressingNamespace =
+
EndpointReferenceUtils.getAddressingNamespace(W3CEndpointReference.class);  
+org.apache.axis2.addressing.EndpointReference axis2EPR =
+EndpointReferenceUtils.createAxis2EndpointReference(address, 
serviceName, portName, wsdlDocumentLocation, addressingNamespace);
+
+

svn commit: r940682 - in /axis/axis2/java/core/trunk/modules: jaxws/src/org/apache/axis2/jaxws/ jaxws/src/org/apache/axis2/jaxws/binding/ jaxws/src/org/apache/axis2/jaxws/client/proxy/ jaxws/test/org/

2010-05-03 Thread barrettj
Author: barrettj
Date: Tue May  4 00:25:24 2010
New Revision: 940682

URL: http://svn.apache.org/viewvc?rev=940682&view=rev
Log:
Add Addressing support on client side configurable via metadata.  Add 
associated TDD tests.

Added:

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/proxy/ProxyAddressingMetadataTest.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/spi/ClientMetadataAddressingFeatureTests.java
Modified:

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

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/binding/SOAPBinding.java

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java

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

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

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java?rev=940682&r1=940681&r2=940682&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
 Tue May  4 00:25:24 2010
@@ -43,6 +43,7 @@ import javax.xml.ws.EndpointReference;
 import javax.xml.ws.WebServiceException;
 import javax.xml.ws.WebServiceFeature;
 import javax.xml.ws.handler.HandlerResolver;
+import javax.xml.ws.soap.AddressingFeature.Responses;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 import java.util.Hashtable;
 import java.util.Map;
@@ -122,7 +123,7 @@ public class BindingProvider implements 
 }
 }
 
-// See if the metadata from creating the service indicates that MTOM 
and/or RespectBinding should be enabled
+// See if the metadata from creating the service indicates that MTOM, 
Addressing and/or RespectBinding should be enabled
 if (binding instanceof SOAPBinding) {
 configureBindingFromMetadata();
 }
@@ -159,16 +160,20 @@ public class BindingProvider implements 
 }
 
 /**
- * Configure the binding from the Metadata for MTOM and RespectBinding.
+ * Configure the binding from the Metadata for WebService Features.
  */
 private void configureBindingFromMetadata() {
 // MTOM can be enabled either at the ServiceDescription level (via the 
WSDL binding type) or
 // at the EndpointDescription level via the binding type used to 
create a Dispatch.
 boolean enableMTOMFromMetadata = false;
 int mtomThreshold = 0;
+boolean isAddressingConfiguredViaMetadata = false;
 boolean enableRespectBindingdFromMetadata = false;
+boolean enableAddressingFromMetadata = false;
+boolean requireAddressingFromMetadata = false;
+Responses addressingResponses = null;
 
-// if we have an SEI for the port, then we'll use it in order to 
search for MTOM configuration
+// if we have an SEI for the port, then we'll use it in order to 
search for WebService Feature configuration
 if(endpointDesc.getEndpointInterfaceDescription() != null
 &&
 endpointDesc.getEndpointInterfaceDescription().getSEIClass() 
!= null) {
@@ -179,11 +184,24 @@ public class BindingProvider implements 
 
 enableRespectBindingdFromMetadata = 
isRespectBindingEnabled(endpointDesc.getServiceDescription(), serviceDelegate,
 
endpointDesc.getEndpointInterfaceDescription().getSEIClass());
+
+isAddressingConfiguredViaMetadata = 
isAddressingConfigured(endpointDesc.getServiceDescription(), serviceDelegate,
+
endpointDesc.getEndpointInterfaceDescription().getSEIClass());
+if (isAddressingConfiguredViaMetadata) {
+enableAddressingFromMetadata = 
isAddressingEnabled(endpointDesc.getServiceDescription(), serviceDelegate,
+
endpointDesc.getEndpointInterfaceDescription().getSEIClass());
+requireAddressingFromMetadata = 
isAddressingRequired(endpointDesc.getServiceDescription(), serviceDelegate,
+
endpointDesc.getEndpointInterfaceDescription().getSEIClass());
+addressingResponses = 
getAddressingResponses(endpointDesc.getServiceDescription(), serviceDelegate,
+
endpointDesc.getEndpointInterfaceDescription().getSEIClass());
+}
+   
+
 }
 else {
 enableMTOMFromMetadata = 
endpointDesc.get

svn commit: r941108 - in /axis/axis2/java/core/trunk/modules/jaxws: src/org/apache/axis2/jaxws/client/config/ src/org/apache/axis2/jaxws/client/proxy/ test/org/apache/axis2/jaxws/client/proxy/

2010-05-04 Thread barrettj
Author: barrettj
Date: Tue May  4 23:44:34 2010
New Revision: 941108

URL: http://svn.apache.org/viewvc?rev=941108&view=rev
Log:
Add client-side enablement for AddressingFeature.required set via 
AddressingFeature on the factory methods or via metadata.  Update associated 
tests.

Modified:

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/config/AddressingConfigurator.java

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/proxy/ProxyAddressingFeatureTest.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/proxy/ProxyAddressingMetadataTest.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/config/AddressingConfigurator.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/config/AddressingConfigurator.java?rev=941108&r1=941107&r2=941108&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/config/AddressingConfigurator.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/config/AddressingConfigurator.java
 Tue May  4 23:44:34 2010
@@ -60,6 +60,7 @@ public class AddressingConfigurator impl
 String addressingNamespace = bnd.getAddressingNamespace();
 Boolean disableAddressing =
 (Boolean) 
messageContext.getProperty(AddressingConstants.DISABLE_ADDRESSING_FOR_OUT_MESSAGES);
+String addressingRequired = AddressingConstants.ADDRESSING_UNSPECIFIED;
 
 //Figure out which WS-Addressing feature was specified causing this 
configurator to run. 
 if (addressingFeature != null && submissionAddressingFeature != null) {
@@ -75,6 +76,9 @@ public class AddressingConfigurator impl
 addressingNamespace = Final.WSA_NAMESPACE;
 
 disableAddressing = Boolean.FALSE;
+if (addressingFeature.isRequired() || 
submissionAddressingFeature.isRequired()) {
+addressingRequired = 
AddressingConstants.ADDRESSING_REQUIRED;
+}
 }
 else if (w3cAddressingEnabled) {
 //Enable only 2005/08 addressing
@@ -85,6 +89,9 @@ public class AddressingConfigurator impl
 }
 addressingNamespace = Final.WSA_NAMESPACE;
 disableAddressing = Boolean.FALSE;
+if (addressingFeature.isRequired()) {
+addressingRequired = 
AddressingConstants.ADDRESSING_REQUIRED;
+}
 }
 else if (submissionAddressingEnabled) {
 //Enable only 2004/08 addressing
@@ -95,6 +102,9 @@ public class AddressingConfigurator impl
 }
 addressingNamespace = Submission.WSA_NAMESPACE;
 disableAddressing = Boolean.FALSE;
+if (submissionAddressingFeature.isRequired()) {
+addressingRequired = 
AddressingConstants.ADDRESSING_REQUIRED;
+}
 }
 else {
 //Disable 2005/08 and 2004/08 addressing
@@ -114,6 +124,9 @@ public class AddressingConfigurator impl
 }
 addressingNamespace = Final.WSA_NAMESPACE;
 disableAddressing = Boolean.FALSE;
+if (addressingFeature.isRequired()) {
+addressingRequired = 
AddressingConstants.ADDRESSING_REQUIRED;
+}
 }
 else {
 //Disable 2005/08 addressing
@@ -133,6 +146,9 @@ public class AddressingConfigurator impl
 }
 addressingNamespace = Submission.WSA_NAMESPACE;
 disableAddressing = Boolean.FALSE;
+if (submissionAddressingFeature.isRequired()) {
+addressingRequired = 
AddressingConstants.ADDRESSING_REQUIRED;
+}
 }
 else {
 //Disable 2004/08 addressing
@@ -167,6 +183,7 @@ public class AddressingConfigurator impl
 
 messageContext.setProperty(AddressingConstants.WS_ADDRESSING_VERSION, 
addressingNamespace);
 
messageContext.setProperty(AddressingConstants.DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
 disableAddressing);
+
messageContext.setProperty(AddressingConstants.ADDRESSING_REQUIREMENT_PARAMETER,
 addressingRequired);
 
 // If the Addressing feature was specified, then get the responses 
value from it and map to the value 
 // the addressing handler expects

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java
URL: 
http

svn commit: r941769 - in /axis/axis2/java/core/trunk/modules: addressing/src/org/apache/axis2/handlers/addressing/ addressing/test/org/apache/axis2/handlers/addressing/ jaxws/test/org/apache/axis2/jax

2010-05-06 Thread barrettj
Author: barrettj
Date: Thu May  6 15:09:55 2010
New Revision: 941769

URL: http://svn.apache.org/viewvc?rev=941769&view=rev
Log:
Add enforcement of Addressing.required on the client side.  Patch submitted by 
Katherine Sanders.

Modified:

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

axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/dispatch/DispatchAddressingFeatureTest.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/dispatch/DispatchSubmissionAddressingFeatureTest.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/proxy/ProxyAddressingFeatureTest.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/proxy/ProxySubmissionAddressingFeatureTest.java

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java

axis/axis2/java/core/trunk/modules/kernel/test/org/apache/axis2/addressing/AddressingHelperTest.java

Modified: 
axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingValidationHandler.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingValidationHandler.java?rev=941769&r1=941768&r2=941769&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingValidationHandler.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingValidationHandler.java
 Thu May  6 15:09:55 2010
@@ -65,26 +65,35 @@ public class AddressingValidationHandler
 }
 
 /**
- * Check that if the wsaddressing="required" attribute exists on the 
service definition or
- *  was found in the WSDL 
that WS-Addressing
- * headers were found on the inbound message
+ * Check that if the wsaddressing="required" attribute exists on the 
service definition
+ * (or AddressingFeature on the client) or 
+ * was found in the WSDL (provider side only) that WS-Addressing headers 
were found on
+ * the inbound message.
  */
 private void checkUsingAddressing(MessageContext msgContext)
 throws AxisFault {
+String addressingFlag;
AxisDescription ad = msgContext.getAxisService();
 if (ad == null) {
+// On client side, get required value from the message context
+// (set by AddressingConfigurator).
+// We do not use the UsingAddressing required attribute on the
+// client side since it is not generated/processed by java tooling.
+addressingFlag = 
AddressingHelper.getAddressingRequirementParemeterValue(msgContext);
 if (log.isTraceEnabled()) {
-log.trace("checkUsingAddressing: axisService null, cannot 
check UsingAddressing");
+log.trace("checkUsingAddressing: WSAddressingFlag from 
MessageContext=" + addressingFlag);
+}
+} else {
+// On provider side, get required value from AxisOperation
+// (set by AddressingConfigurator and UsingAddressing WSDL 
processing).
+if(msgContext.getAxisOperation()!=null){
+  ad = msgContext.getAxisOperation();
+}
+addressingFlag =
+AddressingHelper.getAddressingRequirementParemeterValue(ad);
+if (log.isTraceEnabled()) {
+log.trace("checkUsingAddressing: WSAddressingFlag from 
AxisOperation=" + addressingFlag);
 }
-return;
-}
-if(msgContext.getAxisOperation()!=null){
-   ad = msgContext.getAxisOperation();
-}
-String addressingFlag =
-AddressingHelper.getAddressingRequirementParemeterValue(ad);
-if (log.isTraceEnabled()) {
-log.trace("checkUsingAddressing: WSAddressingFlag=" + 
addressingFlag);
 }
 if (AddressingConstants.ADDRESSING_REQUIRED.equals(addressingFlag)) {
 
AddressingFaultsHelper.triggerMessageAddressingRequiredFault(msgContext,

Modified: 
axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java?rev=941769&r1=941768&r2=941769&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/addressing/t

svn commit: r942898 - in /axis/axis2/java/core/trunk/modules: jaxws/test/org/apache/axis2/jaxws/spi/ metadata/src/org/apache/axis2/jaxws/description/ metadata/src/org/apache/axis2/jaxws/description/bu

2010-05-10 Thread barrettj
Author: barrettj
Date: Mon May 10 20:51:22 2010
New Revision: 942898

URL: http://svn.apache.org/viewvc?rev=942898&view=rev
Log:
Add a String property on the sparse composite that will be included as part of 
the uniqueness of the client-side Service instance.  This can be used to attach 
unique configurations (such as policy set) to different instances of the same 
WSDL Service injected on the client if each service uses a different service 
ref name for example.  Add associated TDD test also.

Added:

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/spi/ClientMetadataServiceRefNameTests.java
Modified:

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

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

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

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

Added: 
axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/spi/ClientMetadataServiceRefNameTests.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/spi/ClientMetadataServiceRefNameTests.java?rev=942898&view=auto
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/spi/ClientMetadataServiceRefNameTests.java
 (added)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/spi/ClientMetadataServiceRefNameTests.java
 Mon May 10 20:51:22 2010
@@ -0,0 +1,331 @@
+/*
+ * 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.spi;
+
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.jaxws.description.DescriptionTestUtils2;
+import org.apache.axis2.jaxws.description.EndpointDescription;
+import org.apache.axis2.jaxws.description.ServiceDescription;
+import org.apache.axis2.jaxws.description.builder.DescriptionBuilderComposite;
+import org.apache.axis2.jaxws.description.builder.MDQConstants;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import java.net.URL;
+
+import junit.framework.TestCase;
+
+/**
+ * Validate the behavior related to a ServiceRefName being specified (or not) 
in the client metadata.  Different 
+ * ServiceRefName values should result in different instances of an 
AxisService.  This is so that unique policy sets
+ * can be attached to AxisSerivces based on a ServiceRefName.  If the 
ServiceRefName is not unique then the AxisService
+ * should be shared.  Also if no ServiceRefName is specified, the AxisService 
should be shared.
+ * 
+ * Note that all these tests require that a test client configuration factory 
which caches ServiceDescriptions be
+ * installed and restored at the end.
+ */
+public class ClientMetadataServiceRefNameTests extends TestCase {
+static final String namespaceURI = 
"http://description.jaxws.axis2.apache.org";;
+static final String svcLocalPart = "svcLocalPart";
+static final String originalWsdl_portLocalPart = "portLocalPart";
+
+
+static final String originalWsdl = "ClientMetadata.wsdl";
+
+// All tests require a test client configuration factory which caches 
ServiceDescriptions
+protected void setUp() throws Exception {
+ClientMetadataTest.installCachingFactory();
+}
+protected void tearDown() throws Exception {
+ClientMetadataTest.restoreOriginalFactory();
+}
+
+/**
+ * Validate that multiple ports created under the same service without 
additional service metadata
+ * specified via a setServiceMetatadata(composite) and therefore without a 
service ref name being specified
+ * share the same description objects and Axis service.
+ */

svn commit: r944485 - in /axis/axis2/java/core/trunk/modules: addressing/src/org/apache/axis2/handlers/addressing/ addressing/test/org/apache/axis2/handlers/addressing/ kernel/src/org/apache/axis2/add

2010-05-14 Thread barrettj
Author: barrettj
Date: Fri May 14 21:36:50 2010
New Revision: 944485

URL: http://svn.apache.org/viewvc?rev=944485&view=rev
Log:
Commit patch for AXIS2-4715 contributed by Katherine Sanders.  Fix 
Addressing.required enforcement on client side.

Modified:

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

axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java

Modified: 
axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingValidationHandler.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingValidationHandler.java?rev=944485&r1=944484&r2=944485&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingValidationHandler.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingValidationHandler.java
 Fri May 14 21:36:50 2010
@@ -73,19 +73,19 @@ public class AddressingValidationHandler
 private void checkUsingAddressing(MessageContext msgContext)
 throws AxisFault {
 String addressingFlag;
-   AxisDescription ad = msgContext.getAxisService();
-if (ad == null) {
-// On client side, get required value from the message context
+if (!msgContext.isServerSide()) {
+// On client side, get required value from the request message 
context
 // (set by AddressingConfigurator).
 // We do not use the UsingAddressing required attribute on the
 // client side since it is not generated/processed by java tooling.
-addressingFlag = 
AddressingHelper.getAddressingRequirementParemeterValue(msgContext);
+addressingFlag = 
AddressingHelper.getRequestAddressingRequirementParameterValue(msgContext);
 if (log.isTraceEnabled()) {
 log.trace("checkUsingAddressing: WSAddressingFlag from 
MessageContext=" + addressingFlag);
 }
 } else {
 // On provider side, get required value from AxisOperation
 // (set by AddressingConfigurator and UsingAddressing WSDL 
processing).
+AxisDescription ad = msgContext.getAxisService();
 if(msgContext.getAxisOperation()!=null){
   ad = msgContext.getAxisOperation();
 }

Modified: 
axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java?rev=944485&r1=944484&r2=944485&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingValidationHandlerTest.java
 Fri May 14 21:36:50 2010
@@ -23,12 +23,18 @@ import junit.framework.TestCase;
 import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.OperationContext;
+import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.InOnlyAxisOperation;
 import org.apache.axis2.description.InOutAxisOperation;
+import org.apache.axis2.description.OutInAxisOperation;
+import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.handlers.util.TestUtil;
 
 import javax.xml.namespace.QName;
@@ -129,19 +135,40 @@ public class AddressingValidationHandler
 }
 
 public void testCheckUsingAdressingOnClient() throws Exception {
-// Make addressing required using the same property as the 
AddressingConfigurator
-MessageContext mc = new MessageContext();
-mc.setProperty(AddressingConstants.ADDRESSING_REQUIREMENT_PARAMETER, 
AddressingConstants.ADDRESSING_REQUIRED);
+// Need to create full description hierarchy to prevent 
NullPointerExceptions
+AxisOperation axisOperation = new OutInAxisOperation(new 
QName(&quo

svn commit: r966696 - /axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java

2010-07-22 Thread barrettj
Author: barrettj
Date: Thu Jul 22 14:53:48 2010
New Revision: 966696

URL: http://svn.apache.org/viewvc?rev=966696&view=rev
Log:
Add doPriv necessary when creating MIME attachment objects

Modified:

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java?rev=966696&r1=966695&r2=966696&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/datasource/jaxb/JAXBAttachmentMarshaller.java
 Thu Jul 22 14:53:48 2010
@@ -26,6 +26,7 @@ import org.apache.axiom.om.impl.llom.OMT
 import org.apache.axis2.Constants;
 import org.apache.axis2.Constants.Configuration;
 import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.java.security.AccessController;
 import org.apache.axis2.transport.http.HTTPConstants;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -38,6 +39,8 @@ import javax.mail.internet.MimePartDataS
 import javax.xml.bind.attachment.AttachmentMarshaller;
 import javax.xml.stream.XMLStreamWriter;
 
+import java.security.PrivilegedAction;
+
 /**
  * An implementation of the JAXB AttachmentMarshaller that is used to handle 
binary data from JAXB
  * and create populate the appropriate constructs on the MessageContext
@@ -113,12 +116,23 @@ public class JAXBAttachmentMarshaller ex
 
 try {
 // Create MIME Body Part
-InternetHeaders ih = new InternetHeaders();
+final InternetHeaders ih = new InternetHeaders();
+final byte[] dataArray = data; 
 ih.setHeader(HTTPConstants.HEADER_CONTENT_TYPE, mimeType);
-MimeBodyPart mbp = new MimeBodyPart(ih, data);
+final MimeBodyPart mbp = (MimeBodyPart) 
AccessController.doPrivileged(new PrivilegedAction() {
+public Object run() {
+try {
+return new MimeBodyPart(ih, dataArray);
+} catch (MessagingException e) {
+throw new OMException(e);
+}
+}});
 
 //Create a data source for the MIME Body Part
-MimePartDataSource mpds = new MimePartDataSource(mbp);
+MimePartDataSource mpds = (MimePartDataSource) 
AccessController.doPrivileged(new PrivilegedAction() {
+public Object run() {
+return new MimePartDataSource(mbp);
+}});
 long dataLength =data.length;
 Integer value = null;
 if (msgContext != null) {




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

2010-08-19 Thread barrettj
Author: barrettj
Date: Thu Aug 19 19:59:44 2010
New Revision: 987287

URL: http://svn.apache.org/viewvc?rev=987287&view=rev
Log:
Cleanup a couple log.warn messages and add related log.debug to log exception 
with stack traceback

Modified:

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.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/OperationDescriptionImpl.java

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

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=987287&r1=987286&r2=987287&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 Aug 19 19:59:44 2010
@@ -393,12 +393,12 @@ public class WSDL11ToAxisServiceBuilder 
 
 } catch (WSDLException e) {
 if(log.isDebugEnabled()){
-log.error(e.getMessage(), e);
+log.debug(e.getMessage(), e);
 }
 throw AxisFault.makeFault(e);
 } catch (Exception e) {
 if(log.isDebugEnabled()){
-log.error(e.getMessage(), e);
+log.debug(e.getMessage(), e);
 }
 throw AxisFault.makeFault(e);
 }

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=987287&r1=987286&r2=987287&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
 Thu Aug 19 19:59:44 2010
@@ -451,9 +451,7 @@ public class EndpointDescriptionImpl
 
 } else if (composite.getWsdlDefinition() == null) {
 //This is a SOAP12 binding that does not contain a WSDL 
definition, log a WARNING
-log.warn("This implementation does not contain a WSDL definition 
and is not a SOAP 1.1 based binding. "
-+ "Per JAXWS spec. - a WSDL definition cannot be generated 
for this implementation. Name: "
-+ composite.getClassName());
+log.warn(Messages.getMessage("generateWSDLNonSoap11", 
composite.getClassName()));
 }
 
 if (isSOAP11){
@@ -1006,7 +1004,10 @@ public class EndpointDescriptionImpl
 String wsdlLocation = 
(getServiceDescriptionImpl().getWSDLLocation() != null) ?
 getServiceDescriptionImpl().getWSDLLocation().toString() : 
null;
 String implClassName = composite.getClassName();
-
log.warn(Messages.getMessage("bldAxisSrvcFromWSDLErr",implClassName,wsdlLocation),e);
+log.warn(Messages.getMessage("bldAxisSrvcFromWSDLErr", 
implClassName, wsdlLocation, e.getMessage()));
+if (log.isDebugEnabled()) {
+log.debug("Exception processing WSDL file.  Impl class: " + 
implClassName + "; WSDL Location: "+ wsdlLocation, e);
+}
 
 isBuiltFromWSDL = false;
 }

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=987287&r1=987286&r2=987287&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
 Thu Aug 19 19:59:44 2010
@@ -2353,7 +2353,10 @@ class OperationDescriptionImpl
 try {
 theAxisOperation.addParameter(headerQNParameter);
 } catch (AxisFault e) {
-
log.warn(Messages.getMessage("regMUHead

svn commit: r990207 - /axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties

2010-08-27 Thread barrettj
Author: barrettj
Date: Fri Aug 27 16:58:08 2010
New Revision: 990207

URL: http://svn.apache.org/viewvc?rev=990207&view=rev
Log:
Correct quote marks as required by some translation tools.  Patch submitted by 
Phil Adams.

Modified:

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/i18n/resource.properties
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties?rev=990207&r1=990206&r2=990207&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
 Fri Aug 27 16:58:08 2010
@@ -353,5 +353,5 @@ axisEndpointReferenceFactoryErr=Cannot c
 axisEndpointReferenceFactoryErr2=Cannot create an endpoint reference because 
the address, service name, and/or port name are null.
 dispatchInvalidTypeWithMode=Unsupported Dispatch Type: Dispatch type 
javax.xml.soap.SOAPMessage cannot be used with messages in Payload mode.
 serviceDelegateConstruct2=An attempt was made to construct the ServiceDelegate 
object with the {0} service and with WebServicesFeatures, but there are no 
standard features defined for service creation in the current specification.
-MethodRetrieverWarning1=Public method {0} will be exposed as a Web Service 
operation per JAX-WS 2.2 tooling rules. If you intend to expose only operations 
that have @WebMethod annotation, set the manifest property 'LegacyWebmethod: 
true' or set a JVM property 'jaxws.runtime.legacyWebMethod=true'. 
+MethodRetrieverWarning1=Public method {0} will be exposed as a Web Service 
operation per JAX-WS 2.2 tooling rules. If you intend to expose only operations 
that have @WebMethod annotation, set the manifest property ''LegacyWebmethod: 
true'' or set a JVM property ''jaxws.runtime.legacyWebMethod=true''. 
 generateWSDLNonSoap11=This implementation does not contain a WSDL definition 
and is not a SOAP 1.1 based binding. Per the JAXWS specification, a WSDL 
definition cannot be generated for this implementation.  The implementation 
class name is {0} 
\ No newline at end of file




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

2010-09-07 Thread barrettj
Author: barrettj
Date: Tue Sep  7 16:07:16 2010
New Revision: 993410

URL: http://svn.apache.org/viewvc?rev=993410&view=rev
Log:
Always shudown modules in the terminate method.  Added logs to indicate what 
will be shutdown.

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=993410&r1=993409&r2=993410&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
 Tue Sep  7 16:07:16 2010
@@ -735,6 +735,9 @@ public class ConfigurationContext extend
  */
 public void shutdownModulesAndServices() throws AxisFault{
 if(stopped){
+if (log.isDebugEnabled()) {
+log.debug("ConfigurationContext is stopped, modules and 
services not being shut down");
+}
 return;
 }
 /*Shut down the modules*/
@@ -743,6 +746,9 @@ public class ConfigurationContext extend
 }
 if(axisConfiguration!=null){
 HashMap modules = axisConfiguration.getModules();
+if (log.isDebugEnabled()) {
+log.debug("Modules to be shutdown from axisConfiguration: " + 
modules);
+}
 if (modules != null) {
 Iterator moduleitr = modules.values().iterator();
 while (moduleitr.hasNext()) {
@@ -777,16 +783,9 @@ public class ConfigurationContext extend
  * @throws AxisFault
  */
 public void terminate() throws AxisFault {
+shutdownModulesAndServices();
 if (listenerManager != null) {
 listenerManager.destroy();
-} else {
-if(log.isDebugEnabled()){
-log.debug("Start Invoke modules and services shutdown.");
-}
-shutdownModulesAndServices();
-if(log.isDebugEnabled()){
-log.debug("End Invoke modules and services shutdown.");
-}
 }
 if (axisConfiguration != null) {
 axisConfiguration.cleanup();




svn commit: r1000664 - /axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/util/WSToolingUtils.java

2010-09-23 Thread barrettj
Author: barrettj
Date: Thu Sep 23 23:20:50 2010
New Revision: 1000664

URL: http://svn.apache.org/viewvc?rev=1000664&view=rev
Log:
Fix NPE if tooling classes can't be found.

Modified:

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/util/WSToolingUtils.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/util/WSToolingUtils.java?rev=1000664&r1=1000663&r2=1000664&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/util/WSToolingUtils.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/util/WSToolingUtils.java
 Thu Sep 23 23:20:50 2010
@@ -71,7 +71,7 @@ public class WSToolingUtils {
 if (log.isDebugEnabled()) {
 log.debug("Exception thrown from getWsGenVersion: " + 
e2.getMessage(), e2);
 }
-throw (ClassNotFoundException) e2.getException();
+throw (ClassNotFoundException) e2;
 }
 }
 




svn commit: r1004667 - in /axis/axis2/java/core/trunk/modules: jaxws-integration/ jaxws-integration/test-resources/wsdl/ jaxws-integration/test/org/apache/axis2/jaxws/sample/ jaxws-integration/test/or

2010-10-05 Thread barrettj
Author: barrettj
Date: Tue Oct  5 15:11:30 2010
New Revision: 1004667

URL: http://svn.apache.org/viewvc?rev=1004667&view=rev
Log:
Add support for Doc/Lit/Bare operations with no arguments.  These flow as 
messages with empty soap:Body elements.  Also add associated unit and 
integration tests.

Added:

axis/axis2/java/core/trunk/modules/jaxws-integration/test-resources/wsdl/doclitbarenoarg.wsdl

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/BareNoArgTests.java

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbarenoarg/

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbarenoarg/DocLitBareNoArgPortTypeImpl.java

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbarenoarg/META-INF/

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbarenoarg/META-INF/doclitbarenoarg.wsdl

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbarenoarg/sei/

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbarenoarg/sei/BareDocLitNoArgService.java

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/doclitbarenoarg/sei/DocLitBareNoArgPortType.java
Modified:
axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml

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

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedDispatcher.java

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcher.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/DocLitBareResolveOperationTests.java

Modified: axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml?rev=1004667&r1=1004666&r2=1004667&view=diff
==
--- axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/jaxws-integration/pom.xml Tue Oct  5 
15:11:30 2010
@@ -967,6 +967,19 @@
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -1258,6 +1271,7 @@
 **/MTOMFeatureTests.java
 **/JAXBProviderTests.java
 **/BareTests.java
+**/BareNoArgTests.java
 **/AddNumbersHandlerTests.java
 **/HeadersHandlerTests.java
 **/AddNumbersTests.java

Added: 
axis/axis2/java/core/trunk/modules/jaxws-integration/test-resources/wsdl/doclitbarenoarg.wsdl
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/test-resources/wsdl/doclitbarenoarg.wsdl?rev=1004667&view=auto
==
--- 
axis/axis2/java/core/trunk/modules/jaxws-integration/test-resources/wsdl/doclitbarenoarg.wsdl
 (added)
+++ 
axis/axis2/java/core/trunk/modules/jaxws-integration/test-resources/wsdl/doclitbarenoarg.wsdl
 Tue Oct  5 15:11:30 2010
@@ -0,0 +1,68 @@
+
+
+
+
+http://schemas.xmlsoap.org/wsdl/";
+xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
+xmlns:tns="http://sei.doclitbarenoarg.sample.jaxws.axis2.apache.org";
+xmlns:xsd="http://www.w3.org/2001/XMLSchema"; name="DoclitBareNoArg"
+targetNamespace="http://sei.doclitbarenoarg.sample.jaxws.axis2.apache.org";>
+
+
+http://sei.doclitbarenoarg.sample.jaxws.axis2.apache.org";
+
xmlns:tns="http://sei.doclitbarenoarg.sample.jaxws.axis2.apache.org";
+xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+http://schemas.xmlsoap.org/soap/http"; />
+
+
+
+

svn commit: r1028438 - in /axis/axis2/java/core/trunk/modules/jaxws: src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java test/org/apache/axis2/jaxws/client/dispatch/DispatchOperationResolutio

2010-10-28 Thread barrettj
Author: barrettj
Date: Thu Oct 28 19:15:02 2010
New Revision: 1028438

URL: http://svn.apache.org/viewvc?rev=1028438&view=rev
Log:
D/L/B messages may have an empty body or a body with no element.  Add unit test 
and dispatch operation resolution code for those cases.

Modified:

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/dispatch/DispatchOperationResolutionDocLitBareTest.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java?rev=1028438&r1=1028437&r2=1028438&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/dispatch/BaseDispatch.java
 Thu Oct 28 19:15:02 2010
@@ -286,35 +286,38 @@ public abstract class BaseDispatch ex
 
QName bodyElementQName) {
 OperationDescription operationDesc = null;
 
-// This logic mimics the code in 
SOAPMessageBodyBasedOperationDispatcher.findOperation.  We will look for
-// the AxisOperation corresponding to the body element name.  Note 
that we are searching for the AxisOperation instead
-// of searching through the OperationDescriptions so that we can use 
the getOperationByMessageElementQName
-// for the Doc/Lit/Bare case.  Once we have the AxisOperation, we'll 
use that to find the Operation Description.
-AxisService axisService = 
endpointInterfaceDesc.getEndpointDescription().getAxisService();
-AxisOperation axisOperation = null;
-
-// Doc/Lit/Wrapped and RPC, the operation name is the first body 
element qname
-axisOperation = axisService.getOperation(new 
QName(bodyElementQName.getLocalPart()));
-
-if (axisOperation == null) {
-// Doc/Lit/Bare, the first body element qname is the element name 
contained in the wsdl:message part
-axisOperation = 
axisService.getOperationByMessageElementQName(bodyElementQName);
-}
-
-if (axisOperation == null) {
-// Not sure why we wouldn't have found the operation above using 
just the localPart rather than the full QName used here,
-// but this is what 
SOAPMessageBodyBasedOperationDispatcher.findOperation does.
-axisOperation = axisService.getOperation(bodyElementQName);
-}
-
-// If we found an axis operation, then find the operation description 
that corresponds to it
-if (axisOperation != null) {
-OperationDescription allOpDescs[] = 
endpointInterfaceDesc.getDispatchableOperations();
-for (OperationDescription checkOpDesc : allOpDescs ) {
-AxisOperation checkAxisOperation = 
checkOpDesc.getAxisOperation();
-if (checkAxisOperation == axisOperation) {
-operationDesc = checkOpDesc;
-break;
+// If there's no bodyElementQName for us to work with, there's nothing 
more we can do.
+if (bodyElementQName != null) {
+// This logic mimics the code in 
SOAPMessageBodyBasedOperationDispatcher.findOperation.  We will look for
+// the AxisOperation corresponding to the body element name.  Note 
that we are searching for the AxisOperation instead
+// of searching through the OperationDescriptions so that we can 
use the getOperationByMessageElementQName
+// for the Doc/Lit/Bare case.  Once we have the AxisOperation, 
we'll use that to find the Operation Description.
+AxisService axisService = 
endpointInterfaceDesc.getEndpointDescription().getAxisService();
+AxisOperation axisOperation = null;
+
+// Doc/Lit/Wrapped and RPC, the operation name is the first body 
element qname
+axisOperation = axisService.getOperation(new 
QName(bodyElementQName.getLocalPart()));
+
+if (axisOperation == null) {
+// Doc/Lit/Bare, the first body element qname is the element 
name contained in the wsdl:message part
+axisOperation = 
axisService.getOperationByMessageElementQName(bodyElementQName);
+}
+
+if (axisOperation == null) {
+// Not sure why we wouldn't have found the operation above 
using just the localPart rather than the full QName used here,
+// but this is what 
SOAPMessageBodyBasedOperationDispatcher.findOperation does.
+  

svn commit: r1032619 - in /axis/axis2/java/core/trunk/modules: jaxws-integration/test/org/apache/axis2/jaxws/dispatch/ jaxws/src/org/apache/axis2/jaxws/message/ metadata/src/org/apache/axis2/jaxws/des

2010-11-08 Thread barrettj
Author: barrettj
Date: Mon Nov  8 16:16:10 2010
New Revision: 1032619

URL: http://svn.apache.org/viewvc?rev=1032619&view=rev
Log:
AXIS2-4855.  Patch contributed by Phil Adams with some additional comments and 
test change by Jeff Barrett.  Change the JMS namespace to the value defined in 
the JMS spec.

Modified:

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/SOAP12DispatchTest.java

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/Protocol.java

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

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

Modified: 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/SOAP12DispatchTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/SOAP12DispatchTest.java?rev=1032619&r1=1032618&r2=1032619&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/SOAP12DispatchTest.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/dispatch/SOAP12DispatchTest.java
 Mon Nov  8 16:16:10 2010
@@ -149,7 +149,19 @@ public class SOAP12DispatchTest extends 
 /**
  * Test sending a SOAP 1.2 request in PAYLOAD mode using SOAP/JMS
  */
-public void testSOAP12JMSDispatchPayloadMode() throws Exception {
+/*
+ * This test was shown to be invalid by the changes made under Jira 
AXIS2-4855.  Basically, this test was passing 
+ * based on a bug in 
modules/jaxws/src/org/apache/axis2/jaxws/message/Protocol.java creating the 
protocol table.  
+ * There is only one JMS namespace defined by the JMS spec, and it is used 
for both SOAP11 and SOAP12.  Therefore, 
+ * when the SOAP12 protocol was registered after the SOAP11 protocol, it 
overwrote the previous value (since the namespace
+ * is used as the key).  
+ * 
+ * For a WSDL-based client or service, the SOAP version is determined by 
the SOAP namespace used on the
+ * binding.  For a WSDL-less client or service, there is no JMS 
spec-defined way to determine the difference.  For now
+ * JAX-WS will default to SOAP11, and SOAP12 is not registered as a 
protocol for the JMS namespace.  See AXIS2-4855
+ * for more information.
+ */
+public void _testSOAP12JMSDispatchPayloadMode() throws Exception {
 // Create the JAX-WS client needed to send the request
 Service service = Service.create(QNAME_SERVICE);
service.addPort(QNAME_PORT, MDQConstants.SOAP12JMS_BINDING, 
URL_ENDPOINT);

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/Protocol.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/Protocol.java?rev=1032619&r1=1032618&r2=1032619&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/Protocol.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/message/Protocol.java
 Mon Nov  8 16:16:10 2010
@@ -61,8 +61,12 @@ public enum Protocol {
 protocolMappings.put(SOAPBinding.SOAP12HTTP_BINDING, Protocol.soap12);
 protocolMappings.put(SOAPBinding.SOAP12HTTP_MTOM_BINDING, 
Protocol.soap12);
 protocolMappings.put(HTTPBinding.HTTP_BINDING, Protocol.rest);
-protocolMappings.put(MDQConstants.SOAP12JMS_BINDING, Protocol.soap12);
-protocolMappings.put(MDQConstants.SOAP12JMS_MTOM_BINDING, 
Protocol.soap12);
+// There is only one binding value declared by the spec; there is no 
differentiation
+// between SOAP11 and SOAP12, unlike HTTP.  This may be an issue in 
the spec.  However,
+// for now, since the values are the same, we can only register one 
protocol, so we 
+// use SOAP11 (above).  See Jira AXIS2-4855 for more information.
+//protocolMappings.put(MDQConstants.SOAP12JMS_BINDING, 
Protocol.soap12);
+//protocolMappings.put(MDQConstants.SOAP12JMS_MTOM_BINDING, 
Protocol.soap12);
 
 // Add each of the URLs with a "/" at the end for flexibility
 Map updates = new HashMap();

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

svn commit: r1056346 - in /axis/axis2/java/core/trunk/modules/metadata: src/org/apache/axis2/jaxws/util/WSToolingUtils.java test/org/apache/axis2/jaxws/utils/WSToolingUtilsTests.java

2011-01-07 Thread barrettj
Author: barrettj
Date: Fri Jan  7 15:23:24 2011
New Revision: 1056346

URL: http://svn.apache.org/viewvc?rev=1056346&view=rev
Log:
Fix the WsGen version number checking, which is used to determine the WebMethod 
annotation processing rules.  Update associated test.

Modified:

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

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/util/WSToolingUtils.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/util/WSToolingUtils.java?rev=1056346&r1=1056345&r2=1056346&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/util/WSToolingUtils.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/metadata/src/org/apache/axis2/jaxws/util/WSToolingUtils.java
 Fri Jan  7 15:23:24 2011
@@ -141,6 +141,13 @@ public class WSToolingUtils {
 return cl;
 }
 
+/**
+ * Answer if the input version number is 2.1.6 or later.  Version 2.1.6 is 
the Sun RI version that changed
+ * the WebMethod annotation semantics.
+ * 
+ * @param wsGenVersion A version number separated by "."  Up to the first 
3 values will be checked.
+ * @return true if the version number is 2.1.6 or later, false otherwise.
+ */
 public static boolean isValidVersion(String wsGenVersion) {
 if(log.isDebugEnabled()){
 log.debug("Start isValidVersion(String)");
@@ -162,66 +169,98 @@ public class WSToolingUtils {
  * we return false if version is less that 2.1.6.
  * possible input version strings could be "JAX-WS RI 2.2-b05-", 
"2.1.6" "2.1.0" etc.
  */
-// Beginning of reuseable code
-final int VERSION_FIELD_1 = 2;
-final int VERSION_FIELD_2 = 1;
-final int VERSION_FIELD_3 = 6;
+
+// Minimum version required is 2.1.6
+final int minimumVersionRequired[] = {2, 1, 6};
 
 String version = wsGenVersion.trim();
 
 StringTokenizer st = new StringTokenizer(version, ".");
-if(st.countTokens()<=0){
+if(st.countTokens() <= 0){
 if(log.isDebugEnabled()){
 log.debug("No Tokens to validate the tooling version, Input 
version String is invalid.");
 }
 return false;
 }
-for(int tokenCnt = 1;st.hasMoreTokens();tokenCnt++){
+
+// Check up to as many version values as we have values in the minimum 
required version
+boolean lastCheckEqual = false;
+int tokenCnt = 0;
+
+for( ; tokenCnt < minimumVersionRequired.length && st.hasMoreTokens(); 
tokenCnt++) {
 String token = st.nextToken();
 if(token == null){
 return false;
 }
-int versionNumber = getDigit(token);
-if (tokenCnt==1 && versionNumber < VERSION_FIELD_1) {
+int versionNumber = getIntegerValue(token);
+int minimumVersionNumber = minimumVersionRequired[tokenCnt];
+
+if (versionNumber < minimumVersionNumber) {
+// The version number is too low, so it is invalid
 if(log.isDebugEnabled()){
-log.debug("Validation failed of tokenCnt="+tokenCnt);
-log.debug("Input VersionNumber ="+versionNumber);
+log.debug("Validation failed on tokenCnt = " + tokenCnt);
+log.debug("Input VersionNumber =" + versionNumber);
+log.debug("Minimum Version Number required = " + 
minimumVersionNumber);
 }
 return false;
-} 
-if(tokenCnt == 2 && versionNumber < VERSION_FIELD_2 ){  
+} else if (versionNumber > minimumVersionNumber) {
+// The version number is higher than required, so it passes 
validation.
 if(log.isDebugEnabled()){
-log.debug("Validation failed of tokenCnt="+tokenCnt);
-log.debug("Input VersionNumber ="+versionNumber);
+log.debug("Validation passed on tokenCnt = " + tokenCnt);
+log.debug("Input VersionNumber = " + versionNumber);
+log.debug("Minimum Version Number required = " + 
minimumVersionNumber);
 }
-return false;
-} 
-if (tokenCnt==3 && versionNumber < VERSION_FIELD_3) {
+return true;
+  

svn commit: r1059115 - in /axis/axis2/java/core/trunk/modules: jaxws/src/org/apache/axis2/jaxws/server/dispatcher/ kernel/src/org/apache/axis2/addressing/wsdl/ kernel/src/org/apache/axis2/description/

2011-01-14 Thread barrettj
Author: barrettj
Date: Fri Jan 14 19:02:46 2011
New Revision: 1059115

URL: http://svn.apache.org/viewvc?rev=1059115&view=rev
Log:
AXIS2-4922.  Patch contributed by Katherine Sanders.  Fixes to WS-A metadata 
action code.

Modified:

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaDispatcher.java

axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java

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

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaDispatcher.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaDispatcher.java?rev=1059115&r1=1059114&r2=1059115&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaDispatcher.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/server/dispatcher/JavaDispatcher.java
 Fri Jan 14 19:02:46 2011
@@ -300,11 +300,23 @@ public abstract class JavaDispatcher imp
  MessageContext response) {
  AxisOperation operation = 
request.getOperationDescription().getAxisOperation();
  if (operation != null) {
- exception = ClassUtils.getRootCause(exception);
- String action = 
operation.getFaultAction(exception.getClass().getName());
- 
- if (action != null)
+ exception = ClassUtils.getRootCause(exception);
+ String className = exception.getClass().getName();
+ String action = operation.getFaultAction(className);
+ if (action == null) {
+ className = 
className.substring((className.lastIndexOf('.'))+1);
+ action = operation.getFaultAction(className);
+ }
+ if (log.isDebugEnabled()) {
+ for(String faultActionName : operation.getFaultActionNames())
+ log.debug("Fault action map entry: key = "  + 
faultActionName + ", value = " + operation.getFaultAction(faultActionName));
+ }
+ if (action != null) {
+ if (log.isDebugEnabled()) {
+ log.debug("Setting fault action " + action + " for 
Exception: "+className);
+ }
  response.getAxisMessageContext().setWSAAction(action);
+ }
  }
 }
 

Modified: 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java?rev=1059115&r1=1059114&r2=1059115&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/addressing/wsdl/WSDL11ActionHelper.java
 Fri Jan 14 19:02:46 2011
@@ -63,7 +63,7 @@ public class WSDL11ActionHelper {
 public static String getActionFromInputElement(Definition def, PortType 
wsdl4jPortType,
Operation op, Input input) {
 String result = getWSAWActionExtensionAttribute(input);
-if (result == null) {
+if (result == null || result.equals("")) {
 result = WSDL11DefaultActionPatternHelper
 .generateActionFromInputElement(def, wsdl4jPortType, op, 
input);
 }
@@ -83,7 +83,7 @@ public class WSDL11ActionHelper {
 public static String getActionFromOutputElement(Definition def, PortType 
wsdl4jPortType,
 Operation op, Output 
output) {
 String result = getWSAWActionExtensionAttribute(output);
-if (result == null) {
+if (result == null || result.equals("")) {
 result = WSDL11DefaultActionPatternHelper
 .generateActionFromOutputElement(def, wsdl4jPortType, op, 
output);
 }
@@ -103,7 +103,7 @@ public class WSDL11ActionHelper {
 public static String getActionFromFaultElement(Definition def, PortType 
wsdl4jPortType,
Operation op, Fault fault) {
 String result = getWSAWActionExtensionAttribute(fault);
-if (result == null) {
+if (result == null || result.equals("")) {
 result = WSDL11DefaultActionPatternHelper
 .generateActionFromFaultElement(def, wsdl4jPortType, op

svn commit: r1068985 - in /axis/axis2/java/core/trunk/modules: jaxws/test/org/apache/axis2/jaxws/client/ jaxws/test/org/apache/axis2/jaxws/client/dispatch/ metadata/src/org/apache/axis2/jaxws/descript

2011-02-09 Thread barrettj
Author: barrettj
Date: Wed Feb  9 17:13:37 2011
New Revision: 1068985

URL: http://svn.apache.org/viewvc?rev=1068985&view=rev
Log:
AXIS2-4952
Scope dynamic ports to the instance of the service that did the addPort(...).  
Add TDD Unit test and flag to revert to previous behavior of sharing dynamic 
ports across services.

Modified:

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/ReleaseServiceTests.java

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/dispatch/DynamicPortCachingTests.java

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

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

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/ReleaseServiceTests.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/ReleaseServiceTests.java?rev=1068985&r1=1068984&r2=1068985&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/ReleaseServiceTests.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/client/ReleaseServiceTests.java
 Wed Feb  9 17:13:37 2011
@@ -118,16 +118,27 @@ public class ReleaseServiceTests extends
  * before the next one is created.  This should release the resources for 
that service.  The
  * number of services and ports created is large enough to cause an OOM if 
the release isn't
  * being done correctly.
+ * 
+ * IMPORTANT NOTE!  Due to a change where dynamic ports are not shared 
across services,
+ * it *may* be that too many ports are being added, which could result in 
an OOM before
+ * they can be released.  The OOM does not necessarily indicate that the 
services are
+ * not being released; it may indicate that the given number of dynamic 
ports, now not
+ * shared across services, is too large. Even though the dynamic ports are 
being relased
+ * the memory is not freed up for re-use until garbage collection is run.
+ * 
+ * NOTE: This test is disabled because forcing garbage collection is an 
inexact science
+ * at best.  You can only ask the JVM to consider doing GC, and that 
behaves differently
+ * on different JVMS.  So, there's no reliable way to make sure this test 
runs on various
+ * JVMs.  So, it is disabled.  
  */
-public void testMultipleServiceMultiplePortReleaseLoop() {
+public void _DISABLED_testMultipleServiceMultiplePortReleaseLoop() {
 // Create a bunch of different services, make sure the service desc 
finalizer is called
 try {
 ClientMetadataTest.installCachingFactory();
-
 for (int i = 0; i < 1000; i++) {
 QName svcQN = new QName(namespaceURI, svcLocalPart + "_" + i);
 Service svc1 = Service.create(svcQN);
-for (int j = 0; j < 200; j++) {
+for (int j = 0; j < 100; j++) {
 QName portQN = new QName(namespaceURI, dynamicPort1 + 
"_svc_" + i + "_port_" + j);
 svc1.addPort(portQN, bindingID1, epr1);
 }
@@ -545,17 +556,17 @@ public class ReleaseServiceTests extends
 
 EndpointDescription epDesc1_port1 = 
svcDesc1.getEndpointDescription(portQN1, sd1);
 EndpointDescription epDesc2_port1 = 
svcDesc1.getEndpointDescription(portQN1, sd2);
-assertSame(epDesc1_port1, epDesc2_port1);
+assertNotSame(epDesc1_port1, epDesc2_port1);
 AxisService axisSvc1_port1 = epDesc1_port1.getAxisService();
 AxisService axisSvc2_port1 = epDesc2_port1.getAxisService();
-assertSame(axisSvc1_port1, axisSvc2_port1);
+assertNotSame(axisSvc1_port1, axisSvc2_port1);
 
 EndpointDescription epDesc1_port2 = 
svcDesc1.getEndpointDescription(portQN2, sd1);
 EndpointDescription epDesc2_port2 = 
svcDesc1.getEndpointDescription(portQN2, sd2);
-assertSame(epDesc1_port2, epDesc2_port2);
+assertNotSame(epDesc1_port2, epDesc2_port2);
 AxisService axisSvc1_port2 = epDesc1_port2.getAxisService();
 AxisService axisSvc2_port2 = epDesc2_port2.getAxisService();
-assertSame(axisSvc1_port2, axisSvc2_port2);
+assertNotSame(axisSvc1_port2, axisSvc2_port2);
 
 // First close should NOT cleanup the endpoints since the other 
service is
 // still using them.
@@ -584,9 +595,9 @@ public class ReleaseServiceTests extends
 ServiceDescription svcDesc3 = sd3.getServiceDescription();
 assertSame(svcDesc2_afterClose, svcDesc3);
 End

svn commit: r1069659 - in /axis/axis2/java/core/trunk/modules: addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java jaxws/src/org/apache/axis2/jaxws/BindingProvider.java jaxws

2011-02-10 Thread barrettj
Author: barrettj
Date: Fri Feb 11 01:46:35 2011
New Revision: 1069659

URL: http://svn.apache.org/viewvc?rev=1069659&view=rev
Log:
AXIS2-4938
Patch submitted by Katherine Sanders.  BindingProvider.getEndpointReference 
should put reference parameters from WSDL in returned EPR.

Modified:

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

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

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/spi/ServiceDelegate.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=1069659&r1=1069658&r2=1069659&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
 Fri Feb 11 01:46:35 2011
@@ -526,18 +526,30 @@ public class AddressingOutHandler extend
Iterator iterator = 
referenceparameters.iterator();
while (iterator.hasNext()) {
OMElement omElement = 
(OMElement)iterator.next();
-SOAPHeaderBlock newElement = 
ElementHelper.toSOAPHeaderBlock(omElement, factory);
-   if (isFinalAddressingNamespace) {
-   
newElement.addAttribute(Final.WSA_IS_REFERENCE_PARAMETER_ATTRIBUTE,
-   
Final.WSA_TYPE_ATTRIBUTE_VALUE,
-   
addressingNamespaceObject);
-   }
-   addRoleToHeader(newElement);
-   header.addChild(newElement);
+// Only add the reference parameter from the WSDL 
if it does not already exist.
+// This allows clients to override the values 
before invoking the service.
+if (referenceInformation == null || 
!referenceInformation.containsKey(omElement.getQName())) {
+SOAPHeaderBlock newElement = 
ElementHelper.toSOAPHeaderBlock(omElement, factory);
+if (isFinalAddressingNamespace) {
+
newElement.addAttribute(Final.WSA_IS_REFERENCE_PARAMETER_ATTRIBUTE,
+
Final.WSA_TYPE_ATTRIBUTE_VALUE,
+
addressingNamespaceObject);
+}
+addRoleToHeader(newElement);
+header.addChild(newElement);
+} else {
+if (LoggingControl.debugLoggingAllowed && 
log.isTraceEnabled()) {
+
log.trace("processToEPRReferenceInformation: Reference parameter already exists 
so ignoring value from WSDL: " + omElement);
+}
+}
}
}
}
 }
+
+if (log.isTraceEnabled()) {
+log.trace("processToEPRReferenceInformation: Header after 
adding reference parameters: "+header);
+}
 }
 
 /**

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java?rev=1069659&r1=1069658&r2=1069659&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/BindingProvider.java
 Fri Feb 11 01:46:35 2011
@@ -19,8 +19,11 @@
 
 package org.apache.axis2.jaxws;
 
+import org.apache.axiom.om.OMElement;
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.AddressingHelper;
+import org.apache.axis2.description.AxisEndpoint;
+import org.apache.axis2.description.AxisService;
 import org.apache.axis2.jaxws.addressing.util.EndpointReferenceUtils;
 import org.apache.axis2.jaxws.binding.BindingUtils;
 import org.apache.axis2.jaxws.bindin

svn commit: r1069898 - in /axis/axis2/java/core/trunk/modules: jaxws-integration/test-resources/wsdl/ jaxws-integration/test/org/apache/axis2/jaxws/sample/ jaxws-integration/test/org/apache/axis2/jaxw

2011-02-11 Thread barrettj
Author: barrettj
Date: Fri Feb 11 17:11:59 2011
New Revision: 1069898

URL: http://svn.apache.org/viewvc?rev=1069898&view=rev
Log:
AXIS2-4948
Patch contributed by Katherine Sanders.  Wrong WSDL location returned by 
BindingProvider; was using the local filesystem path instead of the endpoint 
URL.

Modified:

axis/axis2/java/core/trunk/modules/jaxws-integration/test-resources/wsdl/resourceinjection.wsdl

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/ResourceInjectionTests.java

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/resourceinjection/META-INF/resourceinjection.wsdl

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/resourceinjection/ResourceInjectionPortTypeImpl.java

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/resourceinjection/sei/ResourceInjectionPortType.java

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/resourceinjection/sei/ResourceInjectionService.java

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

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/addressing/factory/impl/Axis2EndpointReferenceFactoryImpl.java

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/context/WebServiceContextImpl.java

Modified: 
axis/axis2/java/core/trunk/modules/jaxws-integration/test-resources/wsdl/resourceinjection.wsdl
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/test-resources/wsdl/resourceinjection.wsdl?rev=1069898&r1=1069897&r2=1069898&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws-integration/test-resources/wsdl/resourceinjection.wsdl
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws-integration/test-resources/wsdl/resourceinjection.wsdl
 Fri Feb 11 17:11:59 2011
@@ -19,9 +19,9 @@
   ~ under the License.
   -->
 
-http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:tns="http://resourceinjection.sample.test.org"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; name="ResourceInjection" 
targetNamespace="http://resourceinjection.sample.test.org";>
+http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:tns="http://resourceinjection.sample.jaxws.axis2.apache.org"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; name="ResourceInjection" 
targetNamespace="http://resourceinjection.sample.jaxws.axis2.apache.org";>
   
-http://resourceinjection.sample.test.org"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
+http://resourceinjection.sample.jaxws.axis2.apache.org"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
   


@@ -53,7 +53,7 @@
   
 http://schemas.xmlsoap.org/soap/http"/>
 
-  http://resourceinjection.sample.test.org/NewOperation"/>
+  http://resourceinjection.sample.jaxws.axis2.apache.org/NewOperation"/>
   
 
   

Modified: 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/ResourceInjectionTests.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/ResourceInjectionTests.java?rev=1069898&r1=1069897&r2=1069898&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/ResourceInjectionTests.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/ResourceInjectionTests.java
 Fri Feb 11 17:11:59 2011
@@ -19,14 +19,15 @@
 
 package org.apache.axis2.jaxws.sample;
 
+import javax.xml.ws.BindingProvider;
+
 import junit.framework.Test;
 import junit.framework.TestSuite;
+
 import org.apache.axis2.jaxws.framework.AbstractTestCase;
 import 
org.apache.axis2.jaxws.sample.resourceinjection.sei.ResourceInjectionPortType;
 import 
org.apache.axis2.jaxws.sample.resourceinjection.sei.ResourceInjectionService;
 
-import javax.xml.ws.BindingProvider;
-
 public class ResourceInjectionTests extends AbstractTestCase {
 String axisEndpoint = 
"http://localhost:6060/axis2/services/ResourceInjectionService.ResourceInjectionPortTypeImplPort";;

@@ -66,4 +67,30 @@ public class ResourceInjectionTests exte
 
 }

+/*
+ * TODO:  This test is currently disabled.  The path tested assumes the 
webcontainer will
+ * receive the request for /?wsdl and redirect appropriately 
to either
+ * the on-disk WSDL or, if an on-disk WSDL does not exist, a generated 
WSDL.  The
+ * Axis2 test webserver/

svn commit: r1075057 - in /axis/axis2/java/core/trunk/modules/jaxws: src/org/apache/axis2/jaxws/WebServiceExceptionLogger.java test/org/apache/axis2/jaxws/WebServiceExceptionLoggerTests.java

2011-02-27 Thread barrettj
Author: barrettj
Date: Sun Feb 27 14:11:00 2011
New Revision: 1075057

URL: http://svn.apache.org/viewvc?rev=1075057&view=rev
Log:
Prevent index out of bounds exception, or any exception, from attempting to 
log.  Add TDD/UT for same.

Added:

axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/WebServiceExceptionLoggerTests.java
Modified:

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

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/WebServiceExceptionLogger.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/WebServiceExceptionLogger.java?rev=1075057&r1=1075056&r2=1075057&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/WebServiceExceptionLogger.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/WebServiceExceptionLogger.java
 Sun Feb 27 14:11:00 2011
@@ -52,68 +52,80 @@ public class WebServiceExceptionLogger {
Class serviceImplClass,
Object serviceInstance,
Object[] args) {
-
-// Must have debug or error logging enabled
-if (!log.isDebugEnabled() && !log.isErrorEnabled()) {
-return;
-}
-
-// Get the root of the exception
-Throwable rootT = null;
-if (throwable instanceof InvocationTargetException) {
-rootT = ((InvocationTargetException) 
throwable).getTargetException();
-}
-
-
-String name = rootT.getClass().getName();
-String stack = stackToString(rootT);
-
-// Determine if this is a checked exception or non-checked exception
-Class checkedException = JavaUtils.getCheckedException(rootT, method);
-
-if (checkedException == null) {
-// Only log errors for non-checked exceptions
-if (log.isErrorEnabled()) {
-String text = "";
-if (logFully) {
-text = Messages.getMessage("failureLogger", name, 
rootT.toString());
-   
-} else {
-text = Messages.getMessage("failureLogger", name, stack);
-}
-log.error(text);
+
+// No matter what happens in this logging method, do not surface that 
exception.  We don't want a logging
+// failure to mask the real exception we are trying to log or affect 
subsequent processing.
+try {
+
+// Must have debug or error logging enabled
+if (!log.isDebugEnabled() && !log.isErrorEnabled()) {
+return;
 }
 
-} 
-
-// Full logging if debug is enabled.
-if (log.isDebugEnabled()) {
-log.debug("Exception invoking a method of " + 
serviceImplClass.toString()
-+ " of instance " + serviceInstance.toString());
-log.debug("Exception type thrown: " + 
throwable.getClass().getName());
-if (rootT != null) {
-log.debug("Root Exception type thrown: " + 
rootT.getClass().getName());
-}
-if (checkedException != null) {
-log.debug("The exception is an instance of checked exception: 
" + 
-  checkedException.getName());
+// Get the root of the exception
+Throwable rootT = null;
+if (throwable instanceof InvocationTargetException) {
+rootT = ((InvocationTargetException) 
throwable).getTargetException();
+} else {
+rootT = throwable;
 }
 
-// Extra trace if ElementNSImpl incompatibility problem.
-// The incompatibility exception occurs if the JAXB Unmarshaller 
-// unmarshals to a dom element instead of a generated object.  
This can 
-// result in class cast exceptions.  The solution is usually a 
missing
-// @XmlSeeAlso annotation in the jaxws or jaxb classes. 
-if (rootT.toString().contains("org.apache.xerces.dom.ElementNSImpl 
incompatible")) {
-   log.debug("This exception may be due to a missing @XmlSeeAlso 
in the client's jaxws or" +
-   " jaxb classes.");
+String name = rootT.getClass().getName();
+log.debug("693210: root Throwable, may cause index error: " + 
rootT.toString(), rootT);
+String stack = stackToString(rootT);
+
+// Determine if this is a checked exception or n

svn commit: r1096530 - in /axis/axis2/java/core/trunk/modules: jaxws-integration/test/org/apache/axis2/jaxws/sample/ jaxws-integration/test/org/apache/axis2/jaxws/sample/addnumbershandler/ jaxws/src/o

2011-04-25 Thread barrettj
Author: barrettj
Date: Mon Apr 25 17:22:44 2011
New Revision: 1096530

URL: http://svn.apache.org/viewvc?rev=1096530&view=rev
Log:
On JAX-WS Client, treat local exceptions (e.g. ConnectException) as a 
SOAPFault, driving the JAX-WS handler handleFault methods and throwing a 
SOAPFAultException back through the client invocation.  Also provide a property 
to revert to previous behavior of creating an empty message, driving the JAX-WS 
handler handleMessage methods, and throwing a WebServiceException back through 
the client invocation.

Modified:

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java

axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/addnumbershandler/AddNumbersClientLogicalHandler3.java

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/client/dispatch/BaseDispatch.java

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/client/proxy/JAXWSProxyHandler.java

axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/impl/AxisInvocationController.java

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

Modified: 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java?rev=1096530&r1=1096529&r2=1096530&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java
 Mon Apr 25 17:22:44 2011
@@ -27,6 +27,7 @@ import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.StringWriter;
+import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.Future;
@@ -45,6 +46,7 @@ import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Dispatch;
 import javax.xml.ws.Response;
 import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceException;
 import javax.xml.ws.handler.Handler;
 import javax.xml.ws.handler.HandlerResolver;
 import javax.xml.ws.handler.PortInfo;
@@ -53,7 +55,11 @@ import javax.xml.ws.soap.SOAPFaultExcept
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.jaxws.TestLogger;
+import org.apache.axis2.jaxws.description.ServiceDescription;
 import org.apache.axis2.jaxws.framework.AbstractTestCase;
 import 
org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersClientLogicalHandler;
 import 
org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersClientLogicalHandler2;
@@ -64,11 +70,14 @@ import org.apache.axis2.jaxws.sample.add
 import 
org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersHandlerPortType;
 import 
org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersHandlerService;
 import 
org.apache.axis2.jaxws.sample.addnumbershandler.AddNumbersProtocolHandler2;
+import org.apache.axis2.jaxws.spi.ServiceDelegate;
 import org.test.addnumbershandler.AddNumbersHandlerResponse;
 
 public class AddNumbersHandlerTests extends AbstractTestCase {

 String axisEndpoint = 
"http://localhost:6060/axis2/services/AddNumbersHandlerService.AddNumbersHandlerPortTypeImplPort";;
+String invalidAxisEndpoint = 
"http://invalidHostName:6060/axis2/services/AddNumbersHandlerService.AddNumbersHandlerPortTypeImplPort";;
+
 static File requestFile = null;
 static {
 String resourceDir = System.getProperty("basedir",".")+
@@ -568,7 +577,6 @@ public class AddNumbersHandlerTests exte
 
 fail("We should have got an exception due to the handler.");
 } catch(Exception e) {
-e.printStackTrace();
 assertTrue("Exception should be SOAPFaultException", e instanceof 
SOAPFaultException);
 assertEquals(((SOAPFaultException)e).getMessage(), "I don't like 
the value 99");
 
@@ -828,7 +836,7 @@ public class AddNumbersHandlerTests exte
 
 String log = readLogFile();
 String expected_calls = "AddNumbersClientLogicalHandler4 
HANDLE_MESSAGE_OUTBOUND\n"
-+ "AddNumbersClientLogicalHandler3 HANDLE_FAULT_OUTBOUND\n"
++ "AddNumbersClientLog

svn commit: r1096557 - in /axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws: Constants.java server/endpoint/EndpointImpl.java

2011-04-25 Thread barrettj
Author: barrettj
Date: Mon Apr 25 18:45:30 2011
New Revision: 1096557

URL: http://svn.apache.org/viewvc?rev=1096557&view=rev
Log:
Two changes in JAX-WS Endpoint implementation (1) Override setEndpointContext 
method, (2) Add logic to throw an exception if endpoint publishing is disabled 
by a property (publishing is enabled by default); per JSR-109 5.3.3 dynamically 
publishing endpoints in a server environment is non portable and should be 
disabled.  A server runtime can use the property to disabled dynamically 
publishing JAX-WS endpoints via Endpoint.publish methods.

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/server/endpoint/EndpointImpl.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=1096557&r1=1096556&r2=1096557&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
 Mon Apr 25 18:45:30 2011
@@ -250,4 +250,21 @@ public interface Constants {
  * called with that empty message.  Setting this property to "true" will 
revert to this behavior.
  */
 public static final String  DISABLE_SOAPFAULT_FOR_LOCAL_EXCEPTION = 
"jaxws.soapfault.local.exceptions.disable"; 
+
+/** 
+ * Context Property:
+ * Name: jaxws.endpoint.publish.disable
+ * Value: String "false" or "true"
+ * Default: null, which is interpreted as "false"
+ * Can be set on:
+ * - Axis Configuration, which affects all jax-ws endpoints
+ *
+ * Indicates if the javax.xml.ws.Endpoint.publish methods should be 
disabled, throwing an exception if
+ * they are called.  This may be necessary in a managed environment, since 
as noted in JSR-109 section
+ * 5.3.3 "Publishing Endpoints" using publish is non-portable in managed 
environments, and managed 
+ * environments may disallow publishing of endpoints dynamciall.
+ * 
+ * If this property is set, the Endpoint.publish methods will throw an 
UnsupportedOperationException.
+ */
+public static final String  DISABLE_ENDPOINT_PUBLISH_METHODS = 
"jaxws.endpoint.publish.disable"; 
 }

Modified: 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/server/endpoint/EndpointImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/server/endpoint/EndpointImpl.java?rev=1096557&r1=1096556&r2=1096557&view=diff
==
--- 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/server/endpoint/EndpointImpl.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/jaxws/src/org/apache/axis2/jaxws/server/endpoint/EndpointImpl.java
 Mon Apr 25 18:45:30 2011
@@ -22,6 +22,8 @@ package org.apache.axis2.jaxws.server.en
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.jaxws.ExceptionFactory;
 import org.apache.axis2.jaxws.addressing.util.EndpointReferenceUtils;
 import org.apache.axis2.jaxws.binding.BindingUtils;
@@ -38,6 +40,7 @@ import javax.xml.namespace.QName;
 import javax.xml.transform.Source;
 import javax.xml.ws.Binding;
 import javax.xml.ws.EndpointReference;
+import javax.xml.ws.EndpointContext;
 import javax.xml.ws.WebServiceException;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 import java.io.IOException;
@@ -57,6 +60,7 @@ public class EndpointImpl extends javax.
 private List metadata;
 private Map properties;
 private Executor executor;
+private EndpointContext endpointCntx;
 
 public EndpointImpl(Object o) {
 implementor = o;
@@ -147,6 +151,14 @@ public class EndpointImpl extends javax.
 
 /*
  * (non-Javadoc)
+ * @see 
javax.xml.ws.Endpoint#setEndpointContext(javax.xml.ws.EndpointContext)
+ */
+public void setEndpointContext(EndpointContext ctxt) {
+ this.endpointCntx = ctxt;
+ }
+
+/*
+ * (non-Javadoc)
  * @see javax.xml.ws.Endpoint#isPublished()
  */
 public boolean isPublished() {
@@ -158,7 +170,39 @@ public class EndpointImpl extends javax.
  * @see javax.xml.ws.Endpoint#publish(java.lang.Object)
  */
 public void publish(Object obj) {
+if (isPublishDisabled()) {
+throw new UnsupportedOperationException("Endpo