Author: cschneider
Date: Mon Nov 19 09:06:15 2012
New Revision: 1411107
URL: http://svn.apache.org/viewvc?rev=1411107&view=rev
Log:
DOSGI-90 Do not use Endpoint ID as address
Modified:
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java
cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandlerTest.java
Modified:
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java
URL:
http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java?rev=1411107&r1=1411106&r2=1411107&view=diff
==============================================================================
---
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java
(original)
+++
cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandler.java
Mon Nov 19 09:06:15 2012
@@ -260,16 +260,7 @@ public class HttpServiceConfigurationTyp
}
protected String getHttpServiceAddress(Map sd, Class<?> iClass) {
- String address = OsgiUtils.getProperty(sd,
RemoteConstants.ENDPOINT_ID);
- if(address == null && sd.get(RemoteConstants.ENDPOINT_ID)!=null ){
- LOG.error("Could not use address property " +
RemoteConstants.ENDPOINT_ID );
- return null;
- }
-
-
- if (address == null) {
- address = OsgiUtils.getProperty(sd, Constants.WS_ADDRESS_PROPERTY);
- }
+ String address = OsgiUtils.getProperty(sd,
Constants.WS_ADDRESS_PROPERTY);
if(address == null && sd.get(Constants.WS_ADDRESS_PROPERTY)!=null ){
LOG.error("Could not use address property " +
Constants.WS_ADDRESS_PROPERTY );
return null;
Modified:
cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandlerTest.java
URL:
http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandlerTest.java?rev=1411107&r1=1411106&r2=1411107&view=diff
==============================================================================
---
cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandlerTest.java
(original)
+++
cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceConfigurationTypeHandlerTest.java
Mon Nov 19 09:06:15 2012
@@ -335,12 +335,13 @@ public class HttpServiceConfigurationTyp
ServiceReference sr = c.createMock(ServiceReference.class);
Map<String, Object> props = new HashMap<String, Object>();
- props.put(RemoteConstants.ENDPOINT_ID, "http://google.de/");
+ props.put(RemoteConstants.ENDPOINT_ID, "000001");
+ props.put(Constants.WS_ADDRESS_PROPERTY, "http://google.de/");
props.put(org.osgi.framework.Constants.OBJECTCLASS, new String[] {
"my.class" });
props.put(RemoteConstants.SERVICE_IMPORTED_CONFIGS, new String[] {
"my.config" });
EndpointDescription endpoint = new EndpointDescription(props);
- cpfb.setAddress((String)
EasyMock.eq(props.get(RemoteConstants.ENDPOINT_ID)));
+ cpfb.setAddress((String)
EasyMock.eq(props.get(Constants.WS_ADDRESS_PROPERTY)));
EasyMock.expectLastCall().atLeastOnce();
cpfb.setServiceClass(EasyMock.eq(CharSequence.class));