Author: darran.lofthouse(a)jboss.com
Date: 2010-05-12 10:58:53 -0400 (Wed, 12 May 2010)
New Revision: 12217
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
Log:
[JBWS-3004] JAX-WS Port injected using @WebServiceRef retains last message.
Refactoring to eliminate caching of EndpointInvocation within the CommonClient
referenced when injected.
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-05-12
14:26:09 UTC (rev 12216)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/CommonClient.java 2010-05-12
14:58:53 UTC (rev 12217)
@@ -89,8 +89,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
@@ -244,6 +242,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
@@ -285,7 +288,7 @@
binding.setHeaderSource(this);
// Create the invocation and sync the input parameters
- epInv = new EndpointInvocation(opMetaData);
+ EndpointInvocation epInv = createEndpointInvocation(opMetaData);
epInv.initInputParams(inputParams);
if (opMetaData.getEndpointMetaData().getType() != Type.JAXRPC &&
opMetaData.isRPCLiteral()
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2010-05-12
14:26:09 UTC (rev 12216)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2010-05-12
14:58:53 UTC (rev 12217)
@@ -48,6 +48,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;
@@ -68,6 +69,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.
*
@@ -87,6 +90,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>();
@@ -153,7 +158,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()