Author: alessio.soldano(a)jboss.com
Date: 2013-03-20 07:47:24 -0400 (Wed, 20 Mar 2013)
New Revision: 539
Modified:
core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/EndpointMethodCaller.java
core/trunk/core/src/test/java/org/jboss/wise/core/client/impl/reflection/WSMethodImplTest.java
Log:
[WISE-190] Remove ENDPOINT_ADDRESS props from BindingProvider when the target url is not
specified
Modified:
core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/EndpointMethodCaller.java
===================================================================
---
core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/EndpointMethodCaller.java 2013-03-19
17:02:41 UTC (rev 538)
+++
core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/EndpointMethodCaller.java 2013-03-20
11:47:24 UTC (rev 539)
@@ -113,6 +113,8 @@
if (epInstance.getTargetUrl() != null) {
((BindingProvider)epUnderlyingObjectInstance.get()).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
epInstance.getTargetUrl());
+ } else {
+
((BindingProvider)epUnderlyingObjectInstance.get()).getRequestContext().remove(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
}
}
Modified:
core/trunk/core/src/test/java/org/jboss/wise/core/client/impl/reflection/WSMethodImplTest.java
===================================================================
---
core/trunk/core/src/test/java/org/jboss/wise/core/client/impl/reflection/WSMethodImplTest.java 2013-03-19
17:02:41 UTC (rev 538)
+++
core/trunk/core/src/test/java/org/jboss/wise/core/client/impl/reflection/WSMethodImplTest.java 2013-03-20
11:47:24 UTC (rev 539)
@@ -36,6 +36,10 @@
import javax.jws.Oneway;
import javax.jws.WebParam;
import javax.jws.WebParam.Mode;
+import javax.xml.ws.Binding;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.EndpointReference;
+
import org.jboss.wise.core.client.InvocationResult;
import org.jboss.wise.core.client.WSEndpoint;
import org.jboss.wise.core.mapper.WiseMapper;
@@ -45,7 +49,7 @@
/**
* @author stefano.maestri(a)javalinux.it
*/
-public class WSMethodImplTest {
+public class WSMethodImplTest implements BindingProvider {
private boolean methodWorked = false;
@@ -280,4 +284,35 @@
}
+
+
+ // BindingProvider methods, required as the current class is used as test WSEndpoint
here...
+ @Override
+ public Map<String, Object> getRequestContext() {
+ return new HashMap<String, Object>();
+ }
+
+ @Override
+ public Map<String, Object> getResponseContext() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Binding getBinding() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public EndpointReference getEndpointReference() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public <T extends EndpointReference> T getEndpointReference(Class<T>
clazz) {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
Show replies by date