Author: jim.ma
Date: 2010-03-19 05:24:06 -0400 (Fri, 19 Mar 2010)
New Revision: 11811
Added:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointMetadataProvider.java
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/StubExt.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
Log:
[JBPAPP-3948]:merged the ClassCastException fix(JBWS-2888) to branch
Added:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointMetadataProvider.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointMetadataProvider.java
(rev 0)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/EndpointMetadataProvider.java 2010-03-19
09:24:06 UTC (rev 11811)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.core;
+
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
+
+/**
+ *
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 18-Jan-2010
+ */
+public interface EndpointMetadataProvider
+{
+ /**
+ * Get the endpoint meta data for this stub/dispatch
+ */
+ EndpointMetaData getEndpointMetaData();
+}
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/StubExt.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/StubExt.java 2010-03-19
09:19:28 UTC (rev 11810)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/StubExt.java 2010-03-19
09:24:06 UTC (rev 11811)
@@ -27,15 +27,13 @@
import javax.xml.rpc.ParameterMode;
import javax.xml.soap.AttachmentPart;
-import org.jboss.ws.metadata.umdm.EndpointMetaData;
-
/**
* An extension of the standard JAXRPC/JAXWS stubs.
*
* @author Thomas.Diesler(a)jboss.org
* @since 17-Jan-2007
*/
-public interface StubExt extends ConfigProvider
+public interface StubExt extends ConfigProvider, EndpointMetadataProvider
{
/** ClientTimeout property: org.jboss.ws.timeout */
static final String PROPERTY_CLIENT_TIMEOUT = "org.jboss.ws.timeout";
@@ -71,11 +69,6 @@
static final String PROPERTY_AUTH_TYPE_WSSE = "org.jboss.ws.authType.wsse";
/** Enable MTOM on the stub */
static final String PROPERTY_MTOM_ENABLED= "org.jboss.ws.mtom.enabled";
-
- /**
- * Get the endpoint meta data for this stub
- */
- EndpointMetaData getEndpointMetaData();
/**
* Add a header that is not bound to an input parameter.
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2010-03-19
09:19:28 UTC (rev 11810)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2010-03-19
09:24:06 UTC (rev 11811)
@@ -55,6 +55,7 @@
import org.jboss.ws.WSException;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.ConfigProvider;
+import org.jboss.ws.core.EndpointMetadataProvider;
import org.jboss.ws.core.MessageAbstraction;
import org.jboss.ws.core.client.EndpointInfo;
import org.jboss.ws.core.client.HTTPProtocolConnection;
@@ -88,7 +89,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 04-Jul-2006
*/
-public class DispatchImpl<T> implements Dispatch<T>, ConfigProvider
+public class DispatchImpl<T> implements Dispatch<T>, ConfigProvider,
EndpointMetadataProvider
{
// provide logging
private final Logger log = Logger.getLogger(DispatchImpl.class);
@@ -639,4 +640,9 @@
log.debug("Cannot find the right operation metadata!");
return opMetaData;
}
+
+ public EndpointMetaData getEndpointMetaData()
+ {
+ return epMetaData;
+ }
}
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2010-03-19
09:19:28 UTC (rev 11810)
+++
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2010-03-19
09:24:06 UTC (rev 11811)
@@ -54,6 +54,7 @@
import javax.xml.ws.spi.ServiceDelegate;
import org.jboss.logging.Logger;
+import org.jboss.ws.core.EndpointMetadataProvider;
import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxws.client.ClientFeatureProcessor;
import org.jboss.ws.core.jaxws.client.ClientImpl;
@@ -558,7 +559,7 @@
{
if (features != null)
{
- EndpointMetaData epMetaData = ((StubExt)stub).getEndpointMetaData();
+ EndpointMetaData epMetaData =
((EndpointMetadataProvider)stub).getEndpointMetaData();
for (WebServiceFeature feature : features)
{
ClientFeatureProcessor.processFeature(feature, epMetaData, stub);