Author: darran.lofthouse(a)jboss.com
Date: 2010-05-12 12:20:01 -0400 (Wed, 12 May 2010)
New Revision: 12219
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
Log:
[JBPAPP-4120] JAX-WS Port injected using @WebServiceRef retains last message.
Refactoring to eliminate caching of EndpointInvocation within the CommonClient
referenced when injected.
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/CommonClient.java 2010-05-12
15:39:09 UTC (rev 12218)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/CommonClient.java 2010-05-12
16:20:01 UTC (rev 12219)
@@ -84,8 +84,6 @@
protected EndpointMetaData epMetaData;
// The current operation name
protected QName operationName;
- // Output parameters
- protected EndpointInvocation epInv;
// The binding provider
protected CommonBindingProvider bindingProvider;
// A Map<QName,UnboundHeader> of header entries
@@ -239,6 +237,11 @@
protected abstract boolean shouldMaintainSession();
+ protected EndpointInvocation createEndpointInvocation(OperationMetaData opMetaData)
+ {
+ return new EndpointInvocation(opMetaData);
+ }
+
/** Call invokation goes as follows:
*
* 1) synchronize the operation name with the operation meta data
@@ -279,7 +282,7 @@
binding.setHeaderSource(this);
// Create the invocation and sync the input parameters
- epInv = new EndpointInvocation(opMetaData);
+ EndpointInvocation epInv = createEndpointInvocation(opMetaData);
epInv.initInputParams(inputParams);
// Set the required outbound properties
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
---
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2010-05-12
15:39:09 UTC (rev 12218)
+++
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2010-05-12
16:20:01 UTC (rev 12219)
@@ -50,6 +50,7 @@
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonClient;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.RoleSource;
import org.jboss.ws.core.WSTimeoutException;
import org.jboss.ws.core.binding.TypeMappingImpl;
@@ -71,6 +72,8 @@
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.common.JavaUtils;
+import com.sun.corba.se.spi.orb.Operation;
+
/** Provides support for the dynamic invocation of a service endpoint.
* The javax.xml.rpc.Service interface acts as a factory for the creation of Call
instances.
*
@@ -90,6 +93,8 @@
private QName portType;
// A Map<String,Object> of Call properties
private Map<String, Object> properties = new HashMap<String, Object>();
+ // The EndpointInvocation for the call.
+ private EndpointInvocation epInv;
// The set of supported properties
private static final Set<String> standardProperties = new
HashSet<String>();
@@ -156,7 +161,15 @@
{
return properties;
}
+
+ @Override
+ protected EndpointInvocation createEndpointInvocation(OperationMetaData opMetaData)
+ {
+ epInv = super.createEndpointInvocation(opMetaData);
+ return epInv;
+ }
+
/** Gets the address of a target service endpoint.
*/
public String getTargetEndpointAddress()
Show replies by date