diff --git a/ipojo/runtime/core-it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/PlainHelloImpl.java b/ipojo/runtime/core-it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/PlainHelloImpl.java
new file mode 100755
index 0000000..79f29bc
--- /dev/null
+++ b/ipojo/runtime/core-it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/components/PlainHelloImpl.java
@@ -0,0 +1,46 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.apache.felix.ipojo.runtime.core.api.components;
+
+import org.apache.felix.ipojo.runtime.core.api.services.PlainHello;
+
+
+public class PlainHelloImpl implements PlainHello {
+
+    public void sayHello() {
+        System.out.println("Plainly Hello :D");
+
+    }
+
+    public PlainHelloImpl() {
+        System.out.println("in constructor");
+    }
+
+
+    public void start() {
+
+        System.out.println("Hello, this is the plain hello component start method");
+    }
+
+    public void stop() {
+        System.out.println("Bye, this is the plain hello component stop method");
+    }
+
+
+}
diff --git a/ipojo/runtime/core-it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/services/PlainHello.java b/ipojo/runtime/core-it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/services/PlainHello.java
new file mode 100755
index 0000000..1f07468
--- /dev/null
+++ b/ipojo/runtime/core-it/ipojo-api-test/src/main/java/org/apache/felix/ipojo/runtime/core/api/services/PlainHello.java
@@ -0,0 +1,24 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+package org.apache.felix.ipojo.runtime.core.api.services;
+
+public interface PlainHello {
+    public void sayHello();
+
+}
\ No newline at end of file
diff --git a/ipojo/runtime/core-it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/CompositeTest.java b/ipojo/runtime/core-it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/CompositeTest.java
index 5d1c460..6fa187a 100644
--- a/ipojo/runtime/core-it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/CompositeTest.java
+++ b/ipojo/runtime/core-it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/CompositeTest.java
@@ -83,7 +83,7 @@
                 "(component.providedServiceSpecifications=" + Foo.class.getName() + ")");
         assertThat(refs.length, is(not(0)));
 
-        Factory factory = (Factory) osgiHelper.getServiceObject(refs[0]);
+        Factory factory = (Factory) osgiHelper.getRawServiceObject(refs[0]);
         System.out.println(factory.getComponentDescription().getDescription());
 
         CompositeComponentType type = new CompositeComponentType()
diff --git a/ipojo/runtime/core-it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/PrimitiveComponentTest.java b/ipojo/runtime/core-it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/PrimitiveComponentTest.java
index 57423d8..e9b7b22 100644
--- a/ipojo/runtime/core-it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/PrimitiveComponentTest.java
+++ b/ipojo/runtime/core-it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/PrimitiveComponentTest.java
@@ -19,16 +19,14 @@
 
 package org.apache.felix.ipojo.runtime.core.api;
 
-import org.apache.felix.ipojo.ComponentInstance;
-import org.apache.felix.ipojo.ConfigurationException;
-import org.apache.felix.ipojo.MissingHandlerException;
-import org.apache.felix.ipojo.UnacceptableConfiguration;
+import org.apache.felix.ipojo.*;
 import org.apache.felix.ipojo.api.Dependency;
 import org.apache.felix.ipojo.api.PrimitiveComponentType;
 import org.apache.felix.ipojo.api.Service;
 import org.apache.felix.ipojo.api.SingletonComponentType;
 import org.apache.felix.ipojo.runtime.core.api.components.FooImpl;
 import org.apache.felix.ipojo.runtime.core.api.components.MyComponentImpl;
+import org.apache.felix.ipojo.runtime.core.api.components.PlainHelloImpl;
 import org.apache.felix.ipojo.runtime.core.api.services.Foo;
 import org.junit.Before;
 import org.junit.Test;
@@ -79,15 +77,13 @@
         PrimitiveComponentType type = createAProvider();
         ci = type.createInstance();
         assertThat("Ci is valid", ci.getState(), is(ComponentInstance.VALID));
-        ServiceReference ref = ipojoHelper.getServiceReferenceByName(Foo.class
-                .getName(), ci.getInstanceName());
-        assertThat(ref, is(notNullValue()));
+        assertThat(ipojoHelper.isServiceAvailableByName(Foo.class.getName(), ci
+                .getInstanceName()), is(true));
         type.stop();
         assertThat("Ci is disposed", ci.getState(),
                 is(ComponentInstance.DISPOSED));
-        ref = ipojoHelper.getServiceReferenceByName(Foo.class.getName(), ci
-                .getInstanceName());
-        assertThat(ref, is(nullValue()));
+        assertThat(ipojoHelper.isServiceAvailableByName(Foo.class.getName(), ci
+                .getInstanceName()), is(false));
 
     }
 
@@ -134,6 +130,29 @@
         assertThat("cons2 is valid", cons2.getState(), is(ComponentInstance.VALID));
     }
 
+    @Test
+    public void notManipulatedComponent() throws Exception {
+        assertThat(context, is(notNullValue()));
+        ComponentInstance ci;
+
+        PrimitiveComponentType x= new PrimitiveComponentType()
+                .setBundleContext(context)
+                .setClassName(PlainHelloImpl.class.getName())
+                .setValidateMethod("start")
+                .setInvalidateMethod("stop");
+
+        x.start();
+
+        assertThat(x, is(notNullValue()));
+        assertThat(x.getFactory().getState(), is(Factory.VALID));
+
+        ci = x.createInstance();
+        ci.start();
+        assertThat(ci.getState(), is(ComponentInstance.VALID));
+
+        x.stop();
+    }
+
     private PrimitiveComponentType createAProvider() {
         return new PrimitiveComponentType()
                 .setBundleContext(context)
diff --git a/ipojo/runtime/core-it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/SingletonComponentTest.java b/ipojo/runtime/core-it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/SingletonComponentTest.java
index 323b2dd..9c5f8f8 100644
--- a/ipojo/runtime/core-it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/SingletonComponentTest.java
+++ b/ipojo/runtime/core-it/ipojo-api-test/src/test/java/org/apache/felix/ipojo/runtime/core/api/SingletonComponentTest.java
@@ -77,9 +77,8 @@
         type.stop();
         assertThat("Ci is disposed", ci.getState(),
                 is(ComponentInstance.DISPOSED));
-        ref = ipojoHelper.getServiceReferenceByName(Foo.class.getName(), ci
-                .getInstanceName());
-        assertThat(ref, is(nullValue()));
+        assertThat(ipojoHelper.isServiceAvailableByName(Foo.class.getName(), ci
+                .getInstanceName()), is(false));
     }
 
     @Test
diff --git a/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/Common.java b/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/Common.java
index 91c45fd..9e26d3d 100644
--- a/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/Common.java
+++ b/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/Common.java
@@ -109,7 +109,7 @@
         bundle.add(HelloServiceProvider.class);
         InputStream inputStream = bundle
                 .set(Constants.BUNDLE_SYMBOLICNAME, "iPOJO-Hello-Provider")
-                .set(Constants.IMPORT_PACKAGE, "*")
+                //.set(Constants.IMPORT_PACKAGE, "*")
                 .build(IPOJOStrategy.withiPOJO());
 
         try {
@@ -138,7 +138,7 @@
         bundle.add(HelloServiceConsumer.class);
         InputStream inputStream = bundle
                 .set(Constants.BUNDLE_SYMBOLICNAME, "iPOJO-Hello-Consumer")
-                .set(Constants.IMPORT_PACKAGE, "*")
+                //.set(Constants.IMPORT_PACKAGE, "*")
                 .build(IPOJOStrategy.withiPOJO());
 
         try {
@@ -175,7 +175,7 @@
 
         InputStream inputStream = bundle
                 .set(Constants.BUNDLE_SYMBOLICNAME, "hello-provider-scr")
-                .set(Constants.IMPORT_PACKAGE, "*")
+                //.set(Constants.IMPORT_PACKAGE, "*")
                 .set("Service-Component", "scr/provider.xml")
                 .build(withBnd());
 
@@ -210,7 +210,7 @@
 
         InputStream inputStream = bundle
                 .set(Constants.BUNDLE_SYMBOLICNAME, "hello-consumer-scr")
-                .set(Constants.IMPORT_PACKAGE, "*")
+               // .set(Constants.IMPORT_PACKAGE, "*")
                 .set("Service-Component", "scr/consumer.xml")
                 .build(withBnd());
 
@@ -248,7 +248,7 @@
 
         InputStream inputStream = bundle
                 .set(Constants.BUNDLE_SYMBOLICNAME, "hello-provider-blueprint")
-                .set(Constants.IMPORT_PACKAGE, "*")
+               // .set(Constants.IMPORT_PACKAGE, "*")
                 .set("Bundle-Blueprint", "blueprint/provider.xml")
                 .build(withBnd());
 
@@ -283,7 +283,7 @@
 
         InputStream inputStream = bundle
                 .set(Constants.BUNDLE_SYMBOLICNAME, "hello-consumer-blueprint")
-                .set(Constants.IMPORT_PACKAGE, "*")
+               // .set(Constants.IMPORT_PACKAGE, "*")
                 .set("Bundle-Blueprint", "blueprint/consumer.xml")
                 .build(withBnd());
 
diff --git a/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestBeingConsumedByEquinoxSCR1_4_100.java b/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestBeingConsumedByEquinoxSCR1_4_100.java
index ec16c7f..34d3177 100644
--- a/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestBeingConsumedByEquinoxSCR1_4_100.java
+++ b/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestBeingConsumedByEquinoxSCR1_4_100.java
@@ -35,11 +35,9 @@
  */
 public class TestBeingConsumedByEquinoxSCR1_4_100 extends Common {
 
-    public static String DS_URL = "http://www.dynamis-technologies.com/ipojo/bundles/org.eclipse.equinox.ds_1.4.100" +
-            ".v20130515-2026.jar";
+    public static String DS_URL = "http://people.apache.org/~clement/ipojo/bundle4tests/org.eclipse.equinox.ds_1.4.101.v20130813-1853.jar";
 
-    public static String UTILS_URL = "http://www.dynamis-technologies.com/ipojo/bundles/org.eclipse.equinox.util_1.0" +
-            ".500.v20130404-1337.jar";
+    public static String UTILS_URL = "http://people.apache.org/~clement/ipojo/bundle4tests/org.eclipse.equinox.util_1.0.500.v20130404-1337.jar";
 
     @Override
     public Option[] bundles() {
diff --git a/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestConsumingProviderUsingEquinoxSCR1_4_100.java b/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestConsumingProviderUsingEquinoxSCR1_4_100.java
index 8cbb335..b7287ee 100644
--- a/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestConsumingProviderUsingEquinoxSCR1_4_100.java
+++ b/ipojo/runtime/core-it/ipojo-compatibility-test/src/test/java/org/apache/felix/ipojo/test/compatibility/TestConsumingProviderUsingEquinoxSCR1_4_100.java
@@ -38,11 +38,9 @@
  */
 public class TestConsumingProviderUsingEquinoxSCR1_4_100 extends Common {
 
-    public static String DS_URL = "http://www.dynamis-technologies.com/ipojo/bundles/org.eclipse.equinox.ds_1.4.100" +
-            ".v20130515-2026.jar";
+    public static String DS_URL = "http://people.apache.org/~clement/ipojo/bundle4tests/org.eclipse.equinox.ds_1.4.101.v20130813-1853.jar";
 
-    public static String UTILS_URL = "http://www.dynamis-technologies.com/ipojo/bundles/org.eclipse.equinox.util_1.0" +
-            ".500.v20130404-1337.jar";
+    public static String UTILS_URL = "http://people.apache.org/~clement/ipojo/bundle4tests/org.eclipse.equinox.util_1.0.500.v20130404-1337.jar";
 
     @Override
     public Option[] bundles() {
diff --git a/ipojo/runtime/core-it/ipojo-core-annotations-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/annotations/TestDependency.java b/ipojo/runtime/core-it/ipojo-core-annotations-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/annotations/TestDependency.java
index 6ef8078..7a26f23 100644
--- a/ipojo/runtime/core-it/ipojo-core-annotations-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/annotations/TestDependency.java
+++ b/ipojo/runtime/core-it/ipojo-core-annotations-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/annotations/TestDependency.java
@@ -126,7 +126,7 @@
 
         assertNotNull(ref);
 
-        CheckService svc = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService svc = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertFalse(svc.check());
 
         // The following instantiation exposes the BarService required by instance.
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-admin-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdated.java b/ipojo/runtime/core-it/ipojo-core-configuration-admin-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdated.java
index 56f602e..0f71b61 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-admin-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdated.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-admin-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdated.java
@@ -48,11 +48,10 @@
         Configuration configuration = admin.createFactoryConfiguration(factoryName, "?");
         configuration.update(props);
 
-        ServiceReference ref = osgiHelper.waitForService(FooService.class.getName(),
+        FooService fs = osgiHelper.waitForService(FooService.class,
                 "(instance.name=" + configuration.getPid() + ")",
                 1000);
 
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
         assertEquals(fs.getInt(), 1);
 
         // Update the property
@@ -88,11 +87,10 @@
         Configuration configuration = admin.createFactoryConfiguration(factoryName, "?");
         configuration.update(props);
 
-        ServiceReference ref = osgiHelper.waitForService(FooService.class.getName(),
+        FooService fs = osgiHelper.waitForService(FooService.class,
                 "(instance.name=" + configuration.getPid() + ")",
                 1000);
 
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
         assertEquals(fs.getInt(), 1);
 
         // Update the property using the managed service.
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-processor-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestComplexConfigurations.java b/ipojo/runtime/core-it/ipojo-core-configuration-processor-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestComplexConfigurations.java
index e718d41..2e08f71 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-processor-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestComplexConfigurations.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-processor-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestComplexConfigurations.java
@@ -124,18 +124,15 @@
         TimeUtils.grace(500);
         osgiHelper.waitForService(FooService.class, null, 10000);
 
-        ServiceReference ref1 = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), "complex1");
-        Assert.assertNotNull(ref1);
-        FooService fs1 = (FooService) osgiHelper.getServiceObject(ref1);
+        FooService fs1 = ipojoHelper.getServiceObjectByName(FooService.class, "complex1");
         Properties props1 = fs1.fooProps();
         Assert.assertTrue(((String)props1.get("content")).contains("I'm file 1"));
         Assert.assertEquals(((Bean)props1.get("bean")).getMessage(), "I'm 1");
         Assert.assertEquals(((Bean)props1.get("bean")).getCount(), 1);
         Assert.assertEquals(((Map<String, String>)props1.get("map")).get("a"), "b");
 
-        ServiceReference ref2 = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), "complex2");
-        Assert.assertNotNull(ref2);
-        FooService fs2 = (FooService) osgiHelper.getServiceObject(ref2);
+        FooService fs2 = ipojoHelper.getServiceObjectByName(FooService.class, "complex2");
+        Assert.assertNotNull(fs2);
         Properties props2 = fs2.fooProps();
         Assert.assertTrue(((String)props2.get("content")).contains("I'm file 2"));
         Assert.assertEquals(((Bean)props2.get("bean")).getMessage(), "I'm 2");
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestBothProperties.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestBothProperties.java
index b59c2ea..07fb384 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestBothProperties.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestBothProperties.java
@@ -86,7 +86,7 @@
     public void testConfigurationPrimitive() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -129,7 +129,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -174,7 +174,7 @@
     public void testConfigurationPrimitiveString() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -217,7 +217,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -262,7 +262,7 @@
     public void testConfigurationPrimitiveArrays() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -321,7 +321,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -382,7 +382,7 @@
     public void testConfigurationPrimitiveArraysString() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -441,7 +441,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -502,7 +502,7 @@
     public void testConfigurationObj() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -523,7 +523,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
@@ -545,7 +545,7 @@
     public void testConfigurationObjString() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -566,7 +566,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
@@ -636,7 +636,7 @@
     public void testConfigurationPrimitiveNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -679,7 +679,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -724,7 +724,7 @@
     public void testConfigurationPrimitiveArraysNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -767,7 +767,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -828,7 +828,7 @@
     public void testConfigurationObjNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
 
@@ -849,7 +849,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestComplexProperties.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestComplexProperties.java
index 4ad966b..782915d 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestComplexProperties.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestComplexProperties.java
@@ -44,7 +44,7 @@
     public void setUp() {
         m_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "complex");
         assertNotNull("Complex service availability", m_ref);
-        m_check = (CheckService) osgiHelper.getServiceObject(m_ref);
+        m_check = (CheckService) osgiHelper.getRawServiceObject(m_ref);
     }
 
     @After
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestConstructorInjectionOfProperties.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestConstructorInjectionOfProperties.java
index e6bf206..b153268 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestConstructorInjectionOfProperties.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestConstructorInjectionOfProperties.java
@@ -49,7 +49,7 @@
                 "(instance.name=" + instance.getInstanceName() +")",
                 1000);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertEquals(cs.getProps().getProperty("message"), "message");
     }
 
@@ -65,7 +65,7 @@
                 "(instance.name=" + instance.getInstanceName() +")",
                 1000);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertEquals(cs.getProps().getProperty("message"), "message");
     }
 
@@ -78,7 +78,7 @@
                 "(instance.name=" + instance.getInstanceName() +")",
                 1000);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertEquals(cs.getProps().getProperty("message"), "message");
     }
 
@@ -94,7 +94,7 @@
                 "(instance.name=" + instance.getInstanceName() +")",
                 1000);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertEquals(cs.getProps().getProperty("message"), "message");
         assertEquals(cs.getProps().getProperty("product"), "ipojo");
     }
@@ -111,7 +111,7 @@
                 "(instance.name=" + instance.getInstanceName() +")",
                 1000);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertEquals(cs.getProps().getProperty("message"), "message");
         assertNotNull(cs.getProps().get("context"));
         assertTrue(cs.getProps().get("context") instanceof BundleContext);
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestFieldProperties.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestFieldProperties.java
index 9630e12..b3e3380 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestFieldProperties.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestFieldProperties.java
@@ -96,7 +96,7 @@
     public void testConfigurationPrimitive() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -121,7 +121,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -148,7 +148,7 @@
     public void testConfigurationPrimitiveNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -173,7 +173,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -200,7 +200,7 @@
     public void testConfigurationPrimitiveString() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -225,7 +225,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -252,7 +252,7 @@
     public void testConfigurationPrimitiveStringNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -277,7 +277,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -304,7 +304,7 @@
     public void testConfigurationPrimitiveArrays() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -345,7 +345,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -388,7 +388,7 @@
     public void testConfigurationPrimitiveArraysNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -413,7 +413,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -456,7 +456,7 @@
     public void testConfigurationPrimitiveArraysString() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -497,7 +497,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -540,7 +540,7 @@
     public void testConfigurationPrimitiveArraysStringNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -565,7 +565,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -608,7 +608,7 @@
     public void testConfigurationObj() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -622,8 +622,7 @@
         reconfigure(instance);
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
-        assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
@@ -638,8 +637,7 @@
     @Test
     public void testConfigurationObjNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
-        assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -651,10 +649,8 @@
         reconfigure(instance2);
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
-        assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
-
         s = (String) props.get("string");
         ss = (String[]) props.get("strings");
 
@@ -667,8 +663,7 @@
     @Test
     public void testConfigurationObjString() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
-        assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -682,8 +677,7 @@
         reconfigureString(instance);
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
-        assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
@@ -698,8 +692,7 @@
     @Test
     public void testConfigurationObjStringNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
-        assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -711,8 +704,8 @@
         reconfigureString(instance2);
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
-        assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        assertNotNull("TeosgiHelper.getRawServiceObjectty", ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestListeners.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestListeners.java
index 56ba027..d420fa8 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestListeners.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestListeners.java
@@ -82,7 +82,7 @@
 
         // Get the service
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), "FooProvider-42");
-        foo = (FooService) osgiHelper.getServiceObject(ref);
+        foo = (FooService) osgiHelper.getRawServiceObject(ref);
     }
 
     @After
@@ -194,9 +194,12 @@
         fooConfig.addListener(null);
     }
 
-    @Test(expected = NoSuchElementException.class)
+    /**
+     * This test was initially expecting a NoSuchElementException, in 1.11.2, we changed the method to ignore missing
+     * listeners.
+     */
+    @Test
     public void testRemoveNonexistentProvidedServiceListener() {
-        // Should fail!
         fooConfig.removeListener(new ThrowingListener());
     }
 }
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestMethodProperties.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestMethodProperties.java
index f57f256..c707cf4 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestMethodProperties.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestMethodProperties.java
@@ -126,7 +126,7 @@
     public void testConfigurationPrimitive() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -169,7 +169,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -214,7 +214,7 @@
     public void testConfigurationPrimitiveString() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -257,7 +257,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -302,7 +302,7 @@
     public void testConfigurationPrimitiveArrays() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -361,7 +361,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -422,7 +422,7 @@
     public void testConfigurationPrimitiveArraysString() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -481,7 +481,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -542,7 +542,7 @@
     public void testConfigurationObj() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -563,7 +563,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
@@ -585,7 +585,7 @@
     public void testConfigurationObjString() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -606,7 +606,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
@@ -628,7 +628,7 @@
     public void testConfigurationPrimitive2() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -671,7 +671,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -716,7 +716,7 @@
     public void testConfigurationPrimitive2String() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -759,7 +759,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -804,7 +804,7 @@
     public void testConfigurationPrimitiveArrays2() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -863,7 +863,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -924,7 +924,7 @@
     public void testConfigurationPrimitiveArrays2String() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -983,7 +983,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -1044,7 +1044,7 @@
     public void testConfigurationObj2() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -1065,7 +1065,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
@@ -1087,7 +1087,7 @@
     public void testConfigurationObj2String() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -1108,7 +1108,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
@@ -1178,7 +1178,7 @@
     public void testConfigurationPrimitiveNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -1221,7 +1221,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -1266,7 +1266,7 @@
     public void testConfigurationPrimitiveStringNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -1309,7 +1309,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -1354,7 +1354,7 @@
     public void testConfigurationPrimitiveArraysNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
 
@@ -1398,7 +1398,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -1459,7 +1459,7 @@
     public void testConfigurationPrimitiveArraysStringNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -1503,7 +1503,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -1564,7 +1564,7 @@
     public void testConfigurationObjNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -1584,7 +1584,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
@@ -1606,7 +1606,7 @@
     public void testConfigurationObjStringNoValue() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -1626,7 +1626,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPropertyModifier.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPropertyModifier.java
index 596137a..c1c56f4 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPropertyModifier.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPropertyModifier.java
@@ -64,7 +64,7 @@
         // Not exposed here:
         assertNull("Classes -0", ref.getProperty("classes"));
 
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue(check.check());
 
         // Property exposed now.
@@ -95,7 +95,7 @@
         assertEquals("Classes[1] -3", CheckService.class.getName(), str[1].getName());
 
 
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         p = check.getProps();
         str2 = (Class[]) p.get("classes");
         assertEquals("Classes size -4", 2, str2.length);
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestSuperMethodProperties.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestSuperMethodProperties.java
index 4e94aea..c1d4a02 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestSuperMethodProperties.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestSuperMethodProperties.java
@@ -80,7 +80,7 @@
     public void testConfigurationPrimitive() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -123,7 +123,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -168,7 +168,7 @@
     public void testConfigurationPrimitiveString() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         Byte b = (Byte) props.get("b");
@@ -211,7 +211,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (Byte) props.get("b");
@@ -256,7 +256,7 @@
     public void testConfigurationPrimitiveArrays() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -315,7 +315,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -376,7 +376,7 @@
     public void testConfigurationPrimitiveArraysString() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         byte[] b = (byte[]) props.get("bs");
@@ -435,7 +435,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         b = (byte[]) props.get("bs");
@@ -496,7 +496,7 @@
     public void testConfigurationObj() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -517,7 +517,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
@@ -539,7 +539,7 @@
     public void testConfigurationObjString() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties props = check.getProps();
 
         String s = (String) props.get("string");
@@ -560,7 +560,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Test check service availability", ref);
-        check = (CheckService) osgiHelper.getServiceObject(ref);
+        check = (CheckService) osgiHelper.getRawServiceObject(ref);
         props = check.getProps();
 
         s = (String) props.get("string");
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethod.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethod.java
index 916a721..5852f7e 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethod.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethod.java
@@ -77,7 +77,7 @@
     public void testComponentTypeConfiguration() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check FooService availability", ref);
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
         Properties toCheck = fs.fooProps();
 
         Integer intProp = (Integer) toCheck.get("intProp");
@@ -157,7 +157,7 @@
         ServiceReference sr = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), "FooProvider-3");
         assertNotNull("Check the availability of the FS service", sr);
 
-        FooService fs = (FooService) osgiHelper.getServiceObject(sr);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
         Properties toCheck = fs.fooProps();
 
         // Check service properties
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndConfigAdmin.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndConfigAdmin.java
index 60d99d8..c2b1d8e 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndConfigAdmin.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndConfigAdmin.java
@@ -107,7 +107,7 @@
         assertEquals("Check baz equality -2", bazP, "zab");
 
         // Get Service
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Integer updated = (Integer) fs.fooProps().get("updated");
         Dictionary dict = (Dictionary) fs.fooProps().get("lastupdated");
 
@@ -153,7 +153,7 @@
         assertEquals("Check baz equality -2", bazP, "zab");
 
         // Get Service
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Integer updated = (Integer) fs.fooProps().get("updated");
         Dictionary dict = (Dictionary) fs.fooProps().get("lastupdated");
 
@@ -201,7 +201,7 @@
         assertEquals("Check baz equality", bazP, "zab");
 
         // Check field value
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Properties p = fs.fooProps();
         fooP = (String) p.get("foo");
         barP = (Integer) p.get("bar");
@@ -255,7 +255,7 @@
         assertEquals("Check baz equality", bazP, "zab");
 
         // Check field value
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Properties p = fs.fooProps();
         fooP = (String) p.get("foo");
         barP = (Integer) p.get("bar");
@@ -312,7 +312,7 @@
         assertEquals("Check baz equality", bazP, "zab");
 
         // Check field value
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Properties p = fs.fooProps();
         fooP = (String) p.get("foo");
         barP = (Integer) p.get("bar");
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndManagedService.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndManagedService.java
index 9968af5..6c96562 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndManagedService.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedMethodAndManagedService.java
@@ -138,7 +138,7 @@
         conf.put("baz", "zab");
         conf.put("bar", new Integer(2));
         conf.put("foo", "foo");
-        ManagedService ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ManagedService ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
@@ -155,7 +155,7 @@
         assertEquals("Check baz equality -2", bazP, "zab");
 
         // Get Service
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Integer updated = (Integer) fs.fooProps().get("updated");
         Dictionary dict = (Dictionary) fs.fooProps().get("lastupdated");
 
@@ -185,7 +185,7 @@
         conf.put("baz", "zab");
         conf.put("bar", new Integer(2));
         conf.put("foo", "foo");
-        ManagedService ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ManagedService ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
@@ -202,7 +202,7 @@
         assertEquals("Check baz equality -2", bazP, "zab");
 
         // Get Service
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Integer updated = (Integer) fs.fooProps().get("updated");
         Dictionary dict = (Dictionary) fs.fooProps().get("lastupdated");
 
@@ -212,7 +212,7 @@
         conf.put("baz", "zab2");
         conf.put("foo", "oof2");
         conf.put("bar", new Integer(0));
-        ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
@@ -248,7 +248,7 @@
         conf.put("baz", "zab");
         conf.put("foo", "oof");
         conf.put("bar", new Integer(0));
-        ManagedService ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ManagedService ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
@@ -266,7 +266,7 @@
         assertEquals("Check baz equality", bazP, "zab");
 
         // Check field value
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Properties p = fs.fooProps();
         fooP = (String) p.get("foo");
         barP = (Integer) p.get("bar");
@@ -283,7 +283,7 @@
         conf.put("baz", "zab2");
         conf.put("foo", "oof2");
         conf.put("bar", new Integer(0));
-        ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
@@ -319,7 +319,7 @@
         conf.put("baz", "zab");
         conf.put("foo", "oof");
         conf.put("bar", new Integer(0));
-        ManagedService ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ManagedService ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
@@ -337,7 +337,7 @@
         assertEquals("Check baz equality", bazP, "zab");
 
         // Check field value
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Properties p = fs.fooProps();
         fooP = (String) p.get("foo");
         barP = (Integer) p.get("bar");
@@ -354,7 +354,7 @@
         conf.put("baz", "zab2");
         conf.put("foo", "oof2");
         conf.put("bar", new Integer(0));
-        ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndConfigAdmin.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndConfigAdmin.java
index 0e18118..a9e1475 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndConfigAdmin.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndConfigAdmin.java
@@ -107,7 +107,7 @@
         assertEquals("Check baz equality -2", bazP, "zab");
 
         // Get Service
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Integer updated = (Integer) fs.fooProps().get("updated");
 
         assertEquals("Check updated", 1, updated.intValue());
@@ -125,7 +125,7 @@
         assertEquals("Check bar equality -1", barP, null);
         assertEquals("Check baz equality -1", bazP, null);
 
-        ConfigurationAdmin admin = osgiHelper.getServiceObject(ConfigurationAdmin.class);
+        ConfigurationAdmin ad = osgiHelper.getServiceObject(ConfigurationAdmin.class);
         assertNotNull("Check Configuration Admin availability", admin);
 
         Configuration configuration = admin.getConfiguration(instance2.getInstanceName(),
@@ -151,7 +151,7 @@
         assertEquals("Check baz equality -2", bazP, "zab");
 
         // Get Service
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Integer updated = (Integer) fs.fooProps().get("updated");
 
         assertEquals("Check updated", 1, updated.intValue());
@@ -197,7 +197,7 @@
         assertEquals("Check baz equality", bazP, "zab");
 
         // Check field value
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Properties p = fs.fooProps();
         fooP = (String) p.get("foo");
         barP = (Integer) p.get("bar");
@@ -249,7 +249,7 @@
         assertEquals("Check baz equality", bazP, "zab");
 
         // Check field value
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Properties p = fs.fooProps();
         fooP = (String) p.get("foo");
         barP = (Integer) p.get("bar");
@@ -303,7 +303,7 @@
         assertEquals("Check baz equality", bazP, "zab");
 
         // Check field value
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Properties p = fs.fooProps();
         fooP = (String) p.get("foo");
         barP = (Integer) p.get("bar");
diff --git a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndManagedService.java b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndManagedService.java
index 5608bb3..0065c9b 100644
--- a/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndManagedService.java
+++ b/ipojo/runtime/core-it/ipojo-core-configuration-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestUpdatedNoArgMethodAndManagedService.java
@@ -111,7 +111,7 @@
         conf.put("baz", "zab");
         conf.put("bar", new Integer(2));
         conf.put("foo", "foo");
-        ManagedService ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ManagedService ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
@@ -128,7 +128,7 @@
         assertEquals("Check baz equality -2", bazP, "zab");
 
         // Get Service
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Integer updated = (Integer) fs.fooProps().get("updated");
         assertEquals("Check updated", 1, updated.intValue());
     }
@@ -153,7 +153,7 @@
         conf.put("baz", "zab");
         conf.put("bar", new Integer(2));
         conf.put("foo", "foo");
-        ManagedService ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ManagedService ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
@@ -170,7 +170,7 @@
         assertEquals("Check baz equality -2", bazP, "zab");
 
         // Get Service
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Integer updated = (Integer) fs.fooProps().get("updated");
 
         assertEquals("Check updated", 1, updated.intValue());
@@ -178,7 +178,7 @@
         conf.put("baz", "zab2");
         conf.put("foo", "oof2");
         conf.put("bar", new Integer(0));
-        ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
@@ -211,7 +211,7 @@
         conf.put("baz", "zab");
         conf.put("foo", "oof");
         conf.put("bar", new Integer(0));
-        ManagedService ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ManagedService ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
@@ -229,7 +229,7 @@
         assertEquals("Check baz equality", bazP, "zab");
 
         // Check field value
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Properties p = fs.fooProps();
         fooP = (String) p.get("foo");
         barP = (Integer) p.get("bar");
@@ -244,7 +244,7 @@
         conf.put("baz", "zab2");
         conf.put("foo", "oof2");
         conf.put("bar", new Integer(0));
-        ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
@@ -278,7 +278,7 @@
         conf.put("baz", "zab");
         conf.put("foo", "oof");
         conf.put("bar", new Integer(0));
-        ManagedService ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ManagedService ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
@@ -296,7 +296,7 @@
         assertEquals("Check baz equality", bazP, "zab");
 
         // Check field value
-        FooService fs = (FooService) osgiHelper.getServiceObject(fooRef);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(fooRef);
         Properties p = fs.fooProps();
         fooP = (String) p.get("foo");
         barP = (Integer) p.get("bar");
@@ -311,7 +311,7 @@
         conf.put("baz", "zab2");
         conf.put("foo", "oof2");
         conf.put("bar", new Integer(0));
-        ms = (ManagedService) osgiHelper.getServiceObject(msRef);
+        ms = (ManagedService) osgiHelper.getRawServiceObject(msRef);
         try {
             ms.updated(conf);
         } catch (ConfigurationException e) {
diff --git a/ipojo/runtime/core-it/ipojo-core-declaration-test/src/main/java/org/apache/felix/ipojo/runtime/core/test/components/GermanHelloService.java b/ipojo/runtime/core-it/ipojo-core-declaration-test/src/main/java/org/apache/felix/ipojo/runtime/core/test/components/GermanHelloService.java
index fe9db64..712a4c3 100644
--- a/ipojo/runtime/core-it/ipojo-core-declaration-test/src/main/java/org/apache/felix/ipojo/runtime/core/test/components/GermanHelloService.java
+++ b/ipojo/runtime/core-it/ipojo-core-declaration-test/src/main/java/org/apache/felix/ipojo/runtime/core/test/components/GermanHelloService.java
@@ -20,10 +20,10 @@
 package org.apache.felix.ipojo.runtime.core.test.components;
 
 import org.apache.felix.ipojo.annotations.Component;
-import org.apache.felix.ipojo.annotations.Property;
-import org.apache.felix.ipojo.annotations.Provides;
 import org.apache.felix.ipojo.runtime.core.test.services.HelloService;
 
+import javax.xml.parsers.SAXParser;
+
 /**
  * I intentionally left empty the component name plus the @Provides annotation.
  * This is just to trigger the component manipulation
@@ -31,6 +31,8 @@
 @Component
 public class GermanHelloService implements HelloService {
 
+    SAXParser parser = null;
+
     @Override
     public String hello(final String name) {
         return "Hallo " + name;
diff --git a/ipojo/runtime/core-it/ipojo-core-declaration-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/declaration/Common.java b/ipojo/runtime/core-it/ipojo-core-declaration-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/declaration/Common.java
index 198ab5c..775dd07 100644
--- a/ipojo/runtime/core-it/ipojo-core-declaration-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/declaration/Common.java
+++ b/ipojo/runtime/core-it/ipojo-core-declaration-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/declaration/Common.java
@@ -19,12 +19,10 @@
 
 package org.apache.felix.ipojo.runtime.core.test.declaration;
 
-import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.options.CompositeOption;
-import org.ops4j.pax.exam.options.DefaultCompositeOption;
 import org.ow2.chameleon.testing.helpers.BaseTest;
 
-import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import java.util.Arrays;
+import java.util.List;
 
 /**
  * Bootstrap the test from this project
@@ -32,6 +30,16 @@
 public class Common extends BaseTest {
     @Override
     public boolean quiet() {
-        return false;
+        return true;
+    }
+
+
+
+    @Override
+    public List<String> getExtraExports() {
+        // The important thing here is to make sure that this package is in the bundle
+        return Arrays.asList(
+                "org.apache.felix.ipojo.runtime.core.test.components"
+        );
     }
 }
diff --git a/ipojo/runtime/core-it/ipojo-core-declaration-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/declaration/TestDeclarationBuilderService.java b/ipojo/runtime/core-it/ipojo-core-declaration-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/declaration/TestDeclarationBuilderService.java
index ec97f01..35dc853 100644
--- a/ipojo/runtime/core-it/ipojo-core-declaration-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/declaration/TestDeclarationBuilderService.java
+++ b/ipojo/runtime/core-it/ipojo-core-declaration-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/declaration/TestDeclarationBuilderService.java
@@ -48,12 +48,6 @@
     private DeclarationBuilderService builder;
     private DeclarationHandle handle;
 
-    @Override
-    protected List<String> getExtraExports() {
-        // The important thing here is to make sure that this package is in the bundle
-        return Arrays.asList("org.apache.felix.ipojo.runtime.core.test.components");
-    }
-
     @Before
     public void setUp() {
         builder = osgiHelper.getServiceObject(DeclarationBuilderService.class);
@@ -143,6 +137,8 @@
                 .build();
         instance.publish();
 
+        System.out.println(instance.getStatus().getMessage());
+
         String filter = format("(instance.name=%s)", "german-hello");
         osgiHelper.waitForService(HelloService.class, filter, 1000);
         HelloService service = osgiHelper.getServiceObject(HelloService.class, filter);
diff --git a/ipojo/runtime/core-it/ipojo-core-external-handlers-test/src/test/java/org/apache/felix/ipojo/runtime/externalhandlers/test/HandlerTest.java b/ipojo/runtime/core-it/ipojo-core-external-handlers-test/src/test/java/org/apache/felix/ipojo/runtime/externalhandlers/test/HandlerTest.java
index 00ff060..3728187 100644
--- a/ipojo/runtime/core-it/ipojo-core-external-handlers-test/src/test/java/org/apache/felix/ipojo/runtime/externalhandlers/test/HandlerTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-external-handlers-test/src/test/java/org/apache/felix/ipojo/runtime/externalhandlers/test/HandlerTest.java
@@ -22,6 +22,7 @@
 import org.apache.felix.ipojo.HandlerManagerFactory;
 import org.apache.felix.ipojo.architecture.Architecture;
 import org.apache.felix.ipojo.runtime.externalhandlers.services.CheckService;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.osgi.framework.ServiceReference;
@@ -31,6 +32,7 @@
 import java.util.Properties;
 
 import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
@@ -65,7 +67,7 @@
 
         assertNotNull("Check the check service availability", sr);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(sr);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(sr);
         Dictionary<String, Object> p = cs.getProps();
         assertEquals("Assert 'simple' equality", p.get("Simple"), "simple");
         assertEquals("Assert 'a' equality", p.get("Map1"), "a");
@@ -88,7 +90,7 @@
         }
         assertNotNull("Check the check service availability", sr);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(sr);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(sr);
         Dictionary<String, Object> p = cs.getProps();
         assertEquals("Assert 'simple' equality", p.get("Simple"), "Simple");
         assertEquals("Assert 'a' equality", p.get("Map1"), "a");
@@ -109,7 +111,7 @@
         }
         assertNotNull("Check the check service availability", sr);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(sr);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(sr);
         Dictionary<String, Object> p = cs.getProps();
         assertEquals("Assert 'simple' equality", p.get("Simple"), "Simple");
         assertEquals("Size of p", 3, p.size()); // instance name, simple and changes.
@@ -131,13 +133,13 @@
         assertNotNull("Check the check service availability", sr);
 
         ServiceReference sr_arch = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "HandlerTest-1");
-        Architecture arch = (Architecture) osgiHelper.getServiceObject(sr_arch);
+        Architecture arch = (Architecture) osgiHelper.getRawServiceObject(sr_arch);
 
         System.out.println("===");
         Dumps.dumpArchitectures(context);
         assertEquals("Check instance validity - 0", arch.getInstanceDescription().getState(), ComponentInstance.VALID);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(sr);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(sr);
         Dictionary<String, Object> p = cs.getProps();
         Integer changes = (Integer) p.get("changes");
         assertNotNull("Check changes no null", changes);
@@ -174,18 +176,18 @@
         assertNotNull("Check the check service availability", sr);
 
         ServiceReference sr_arch = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "HandlerTest-1");
-        Architecture arch = (Architecture) osgiHelper.getServiceObject(sr_arch);
+        Architecture arch = (Architecture) osgiHelper.getRawServiceObject(sr_arch);
         assertEquals("Check validity", arch.getInstanceDescription().getState(), ComponentInstance.VALID);
 
         // Kill the handler factory
         HandlerManagerFactory f = (HandlerManagerFactory) ipojoHelper.getHandlerFactory("check");
         f.stop();
 
-        sr = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "HandlerTest-1");
-        assertNull("Check the check service unavailability", sr);
+        boolean av = ipojoHelper.isServiceAvailableByName(CheckService.class.getName(), "HandlerTest-1");
+        assertFalse("Check the check service unavailability", av);
 
-        sr_arch = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "HandlerTest-1");
-        assertNull("Check the architecture unavailability", sr_arch);
+        boolean av2 = ipojoHelper.isServiceAvailableByName(Architecture.class.getName(), "HandlerTest-1");
+        assertFalse("Check the architecture unavailability", av2);
 
         // The instance is disposed, restart the handler
         f.start();
@@ -204,7 +206,7 @@
         assertNotNull("Check the check service availability - 2", sr);
 
         sr_arch = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "HandlerTest-1");
-        arch = (Architecture) osgiHelper.getServiceObject(sr_arch);
+        arch = (Architecture) osgiHelper.getRawServiceObject(sr_arch);
         assertEquals("Check validity - 2", arch.getInstanceDescription().getState(), ComponentInstance.VALID);
     }
 
diff --git a/ipojo/runtime/core-it/ipojo-core-external-handlers-test/src/test/java/org/apache/felix/ipojo/runtime/externalhandlers/test/HandlerWithFieldInterceptorTest.java b/ipojo/runtime/core-it/ipojo-core-external-handlers-test/src/test/java/org/apache/felix/ipojo/runtime/externalhandlers/test/HandlerWithFieldInterceptorTest.java
index 1cc360e..cece611 100644
--- a/ipojo/runtime/core-it/ipojo-core-external-handlers-test/src/test/java/org/apache/felix/ipojo/runtime/externalhandlers/test/HandlerWithFieldInterceptorTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-external-handlers-test/src/test/java/org/apache/felix/ipojo/runtime/externalhandlers/test/HandlerWithFieldInterceptorTest.java
@@ -60,7 +60,7 @@
         String name = "HandlerTest-1";
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), name);
         assertNotNull("Check the check service availability", ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
 
         Dictionary<String, Object> p = cs.getProps();
         assertEquals("Assert 'simple' equality", p.get("Simple"), "simple");
@@ -74,7 +74,7 @@
 
         ServiceReference ref2 = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), name);
         assertNotNull("Check the foo service availability", ref2);
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref2);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref2);
 
         fs.foo(); // This trigger the changes.
 
diff --git a/ipojo/runtime/core-it/ipojo-core-factory-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestConfigAdmin.java b/ipojo/runtime/core-it/ipojo-core-factory-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestConfigAdmin.java
index 67980cc..3ba1318 100644
--- a/ipojo/runtime/core-it/ipojo-core-factory-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestConfigAdmin.java
+++ b/ipojo/runtime/core-it/ipojo-core-factory-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestConfigAdmin.java
@@ -62,8 +62,8 @@
         conf.delete();
         grace();
 
-        ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), pid);
-        assertNull("Check instance deletion", ref);
+        boolean av = ipojoHelper.isServiceAvailableByName(FooService.class.getName(), pid);
+        assertFalse("Check instance deletion", av);
     }
 
     /**
@@ -92,8 +92,8 @@
         conf.delete();
         grace();
 
-        ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), pid);
-        assertNull("Check instance deletion", ref);
+        boolean av = ipojoHelper.isServiceAvailableByName(FooService.class.getName(), pid);
+        assertFalse("Check instance deletion", av);
     }
 
     /**
@@ -130,8 +130,8 @@
         conf.delete();
         grace();
 
-        ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), pid);
-        assertNull("Check instance deletion", ref);
+        boolean av = ipojoHelper.isServiceAvailableByName(FooService.class.getName(), pid);
+        assertFalse("Check instance deletion", av);
     }
 
     /**
@@ -167,8 +167,8 @@
         conf.delete();
         grace();
 
-        ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), pid);
-        assertNull("Check instance deletion", ref);
+        boolean av = ipojoHelper.isServiceAvailableByName(FooService.class.getName(), pid);
+        assertFalse("Check instance deletion", av);
     }
 
 }
diff --git a/ipojo/runtime/core-it/ipojo-core-factory-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestObedience.java b/ipojo/runtime/core-it/ipojo-core-factory-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestObedience.java
index 53bebb1..97d5c8c 100644
--- a/ipojo/runtime/core-it/ipojo-core-factory-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestObedience.java
+++ b/ipojo/runtime/core-it/ipojo-core-factory-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestObedience.java
@@ -87,7 +87,7 @@
 
         // Stop the handler
         hf.stop();
-        HandlerManagerFactory hf2 = (HandlerManagerFactory) ipojoHelper.getHandlerFactory("controller");
+        HandlerManagerFactory hf2 = (HandlerManagerFactory) ipojoHelper.getFactoryHelper().getHandlerFactory("controller", 1, false);
         assertNull("Check handler availability -2", hf2);
 
         // Check the factory invalidity
@@ -96,8 +96,8 @@
         assertEquals("Check factory state -2", Factory.INVALID, cf.getState());
 
         // Check the instance disappearance, the instance was disposed.
-        ref_arch = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "SimpleInstance");
-        assertNull("Check Architecture availability -1", ref_arch);
+        assertFalse("Check Architecture availability -1", ipojoHelper
+                .isServiceAvailableByName(Architecture.class.getName(), "SimpleInstance"));
 
         // Restart the handler
         hf.start();
diff --git a/ipojo/runtime/core-it/ipojo-core-factory-version-test/src/test/java/org/apache/felix/ipojo/tests/core/FactoryVersionTest.java b/ipojo/runtime/core-it/ipojo-core-factory-version-test/src/test/java/org/apache/felix/ipojo/tests/core/FactoryVersionTest.java
index fc2a2ef..b11077e 100644
--- a/ipojo/runtime/core-it/ipojo-core-factory-version-test/src/test/java/org/apache/felix/ipojo/tests/core/FactoryVersionTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-factory-version-test/src/test/java/org/apache/felix/ipojo/tests/core/FactoryVersionTest.java
@@ -99,7 +99,7 @@
         // Version 1.0
         ServiceReference refv1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "instance-v1");
         Assert.assertNotNull(refv1);
-        Architecture archv1 = (Architecture) osgiHelper.getServiceObject(refv1);
+        Architecture archv1 = (Architecture) osgiHelper.getRawServiceObject(refv1);
 
         String version = archv1.getInstanceDescription().getComponentDescription().getVersion();
         Assert.assertEquals("1.0", version);
@@ -107,7 +107,7 @@
         // Version 1.1
         ServiceReference refv11 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "instance-v1.1");
         Assert.assertNotNull(refv11);
-        Architecture archv11 = (Architecture) osgiHelper.getServiceObject(refv11);
+        Architecture archv11 = (Architecture) osgiHelper.getRawServiceObject(refv11);
 
         String version11 = archv11.getInstanceDescription().getComponentDescription().getVersion();
         Assert.assertEquals("1.1", version11);
@@ -115,7 +115,7 @@
         // No Version
         ServiceReference refany = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "instance-any");
         Assert.assertNotNull(refany);
-        Architecture archany = (Architecture) osgiHelper.getServiceObject(refany);
+        Architecture archany = (Architecture) osgiHelper.getRawServiceObject(refany);
 
         String any = archany.getInstanceDescription().getComponentDescription().getVersion();
         Assert.assertNotNull(any);
@@ -123,7 +123,7 @@
         // No version set in the factory, so no version.
         ServiceReference refmci = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "MyComponentInstance");
         Assert.assertNotNull(refmci);
-        Architecture archmcy = (Architecture) osgiHelper.getServiceObject(refmci);
+        Architecture archmcy = (Architecture) osgiHelper.getRawServiceObject(refmci);
 
         String mci = archmcy.getInstanceDescription().getComponentDescription().getVersion();
         Assert.assertNull(mci);
diff --git a/ipojo/runtime/core-it/ipojo-core-factory-version-test/src/test/java/org/apache/felix/ipojo/tests/core/VersionConflictTest.java b/ipojo/runtime/core-it/ipojo-core-factory-version-test/src/test/java/org/apache/felix/ipojo/tests/core/VersionConflictTest.java
index 8b37121..9f2fb91 100644
--- a/ipojo/runtime/core-it/ipojo-core-factory-version-test/src/test/java/org/apache/felix/ipojo/tests/core/VersionConflictTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-factory-version-test/src/test/java/org/apache/felix/ipojo/tests/core/VersionConflictTest.java
@@ -202,7 +202,7 @@
 
         ServiceReference refv1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "mycons");
         Assert.assertNotNull(refv1);
-        Architecture arch = (Architecture) osgiHelper.getServiceObject(refv1);
+        Architecture arch = (Architecture) osgiHelper.getRawServiceObject(refv1);
 
         HandlerDescription desc = arch.getInstanceDescription().getHandlerDescription("org.apache.felix.ipojo:requires");
         Assert.assertNotNull(desc);
@@ -215,7 +215,7 @@
         Assert.assertEquals(Dependency.RESOLVED, dep.getState());
 
         Assert.assertEquals(1, dep.getServiceReferences().size());
-        ServiceReference r = (ServiceReference) dep.getServiceReferences().get(0);
+        ServiceReference r = dep.getServiceReferences().get(0);
         Assert.assertEquals("provider", r.getProperty("factory.name"));
         Assert.assertEquals("2.0", r.getProperty("factory.version"));
     }
@@ -256,7 +256,7 @@
 
         ServiceReference refv1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "mycons");
         Assert.assertNotNull(refv1);
-        Architecture arch = (Architecture) osgiHelper.getServiceObject(refv1);
+        Architecture arch = (Architecture) osgiHelper.getRawServiceObject(refv1);
 
         HandlerDescription desc = arch.getInstanceDescription().getHandlerDescription("org.apache.felix.ipojo:requires");
         Assert.assertNotNull(desc);
@@ -269,7 +269,7 @@
         Assert.assertEquals(Dependency.RESOLVED, dep.getState());
 
         Assert.assertEquals(1, dep.getServiceReferences().size());
-        ServiceReference r = (ServiceReference) dep.getServiceReferences().get(0);
+        ServiceReference r = dep.getServiceReferences().get(0);
 
         Assert.assertEquals("provider", r.getProperty("factory.name"));
         Assert.assertEquals("1.0", r.getProperty("factory.version"));
diff --git a/ipojo/runtime/core-it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/IgnoreCaseHandlerSelectionTest.java b/ipojo/runtime/core-it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/IgnoreCaseHandlerSelectionTest.java
index cd1ca16..c7ae7bb 100644
--- a/ipojo/runtime/core-it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/IgnoreCaseHandlerSelectionTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/IgnoreCaseHandlerSelectionTest.java
@@ -129,7 +129,7 @@
     public void testCreationOfIgnoreCase1() {
           ServiceReference refv1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "IgnoreCase-1");
           Assert.assertNotNull(refv1);
-          Architecture arch = (Architecture) osgiHelper.getServiceObject(refv1);
+          Architecture arch = (Architecture) osgiHelper.getRawServiceObject(refv1);
           Assert.assertEquals(ComponentInstance.VALID, arch.getInstanceDescription().getState());
 
           HandlerDescription desc = arch.getInstanceDescription()
@@ -146,7 +146,7 @@
     public void testCreationOfIgnoreCase2() {
           ServiceReference refv1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "IgnoreCase-2");
           Assert.assertNotNull(refv1);
-          Architecture arch = (Architecture) osgiHelper.getServiceObject(refv1);
+          Architecture arch = (Architecture) osgiHelper.getRawServiceObject(refv1);
           Assert.assertEquals(ComponentInstance.VALID, arch.getInstanceDescription().getState());
 
           HandlerDescription desc = arch.getInstanceDescription()
diff --git a/ipojo/runtime/core-it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/Tools.java b/ipojo/runtime/core-it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/Tools.java
index a6be5ec..0e73545 100644
--- a/ipojo/runtime/core-it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/Tools.java
+++ b/ipojo/runtime/core-it/ipojo-core-handler-test/src/test/java/org/apache/felix/ipojo/runtime/core/Tools.java
@@ -42,7 +42,7 @@
 
         if (ref != null) {
             // Get the factory
-            return (Factory) osgi.getServiceObject(ref);
+            return (Factory) osgi.getRawServiceObject(ref);
         } else {
             return null;
         }
diff --git a/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestCallback.java b/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestCallback.java
index 2234ce4..027500a 100644
--- a/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestCallback.java
+++ b/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestCallback.java
@@ -64,7 +64,8 @@
         // Check instance is invalid
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper
+                .getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.INVALID);
         assertEquals("Check pojo count - 1", id_dep.getCreatedObjects().length, 0);
 
@@ -78,7 +79,7 @@
         // Check service providing
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check int property
@@ -103,7 +104,7 @@
         // Check service providing
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check int property
diff --git a/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateCallback.java b/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateCallback.java
index ec27f92..0f86720 100644
--- a/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateCallback.java
+++ b/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateCallback.java
@@ -64,7 +64,8 @@
         // Check instance is invalid
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper
+                .getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.INVALID);
         assertEquals("Check pojo count - 1", id_dep.getCreatedObjects().length, 0);
 
@@ -78,7 +79,7 @@
         // Check service providing
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         assertEquals("Check pojo count - 2", id_dep.getCreatedObjects().length, 1);
@@ -102,7 +103,7 @@
         // Check service providing
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check int property
diff --git a/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateCallbackSeveralFactories.java b/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateCallbackSeveralFactories.java
index 91af3d5..23796c4 100644
--- a/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateCallbackSeveralFactories.java
+++ b/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateCallbackSeveralFactories.java
@@ -67,8 +67,8 @@
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(),
                 instance.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject
-                (arch_ref)).getInstanceDescription();
+        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper
+                .getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.INVALID);
         assertEquals("Check pojo count - 1", id_dep.getCreatedObjects().length, 0);
 
@@ -82,7 +82,7 @@
         // Check service providing
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         assertEquals("Check pojo count - 2", id_dep.getCreatedObjects().length, 1);
@@ -108,7 +108,7 @@
         // Check service providing
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check int property
diff --git a/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateCallbackSingletonFactory.java b/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateCallbackSingletonFactory.java
index 18df394..1c4f9a0 100644
--- a/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateCallbackSingletonFactory.java
+++ b/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateCallbackSingletonFactory.java
@@ -67,7 +67,8 @@
         // Check instance is invalid
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper
+                .getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.INVALID);
         assertEquals("Check pojo count - 1", id_dep.getCreatedObjects().length, 0);
 
@@ -81,7 +82,7 @@
         // Check service providing
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         assertEquals("Check pojo count - 2", id_dep.getCreatedObjects().length, 1);
@@ -105,7 +106,7 @@
         // Check service providing
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check int property
diff --git a/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateLifeCycleController.java b/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateLifeCycleController.java
index 2204c4e..22743e0 100644
--- a/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateLifeCycleController.java
+++ b/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateLifeCycleController.java
@@ -49,7 +49,7 @@
         // The conf is correct, the PS must be provided
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under");
         assertNotNull("Check service availability -1", ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check state 1", cs.check());
         bc.ungetService(ref);
 
@@ -61,9 +61,9 @@
             fail("The reconfiguration is not unacceptable and seems unacceptable : " + props);
         }
 
-        // The instance should now be invalid 
-        ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under");
-        assertNull("Check service availability -2", ref);
+        // The instance should now be invalid
+        assertFalse("Check service availability -2",
+                ipojoHelper.isServiceAvailableByName(CheckService.class.getName(), "under"));
 
         // Reconfigure the instance with a valid configuration
         props.put("conf", "foo"); // Bar is a bad conf
@@ -75,7 +75,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under");
         assertNotNull("Check service availability -3", ref);
-        cs = (CheckService) osgiHelper.getServiceObject(ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check state 2", cs.check());
         bc.ungetService(ref);
         under.dispose();
@@ -91,8 +91,8 @@
         assertEquals("check under state", under.getState(), ComponentInstance.INVALID);
 
         // The conf is incorrect, the PS must not be provided
-        ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under");
-        assertNull("Check service availability -1", ref);
+        assertFalse("Check service availability -1",
+                ipojoHelper.isServiceAvailableByName(CheckService.class.getName(), "under"));
 
         // Reconfigure the instance with a correct configuration
         props.put("conf", "foo");
@@ -102,9 +102,9 @@
             fail("The reconfiguration is not unacceptable and seems unacceptable : " + props);
         }
 
-        ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under");
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under");
         assertNotNull("Check service availability -2", ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check state ", cs.check());
         bc.ungetService(ref);
         under.dispose();
diff --git a/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestParentCallback.java b/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestParentCallback.java
index bd2d5a4..c819e60 100644
--- a/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestParentCallback.java
+++ b/ipojo/runtime/core-it/ipojo-core-lifecycle-callback-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestParentCallback.java
@@ -64,7 +64,8 @@
         // Check instance is invalid
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper
+                .getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.INVALID);
 
         // Start fooprovider
@@ -77,7 +78,6 @@
         // Check service providing
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
 
         // Check int property
         assertEquals("Check pojo count - 2", id_dep.getCreatedObjects().length, 1);
@@ -96,7 +96,7 @@
         // Check service providing
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Clean up
diff --git a/ipojo/runtime/core-it/ipojo-core-lifecycle-controller-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestConfigurableLifeCycleController.java b/ipojo/runtime/core-it/ipojo-core-lifecycle-controller-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestConfigurableLifeCycleController.java
index 96f02c7..06f4aa4 100644
--- a/ipojo/runtime/core-it/ipojo-core-lifecycle-controller-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestConfigurableLifeCycleController.java
+++ b/ipojo/runtime/core-it/ipojo-core-lifecycle-controller-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestConfigurableLifeCycleController.java
@@ -54,7 +54,7 @@
         // The conf is correct, the PS must be provided
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
         assertNotNull("Check service availability -1", ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check state 1", cs.check());
         bc.ungetService(ref);
 
@@ -67,8 +67,8 @@
         }
 
         // The instance should now be invalid
-        ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
-        assertNull("Check service availability -2", ref);
+        assertFalse("Check service availability -2",
+                ipojoHelper.isServiceAvailableByName(CheckService.class.getName(), "under1"));
 
         // Reconfigure the instance with a valid configuration
         props.put("state", "true");
@@ -80,7 +80,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
         assertNotNull("Check service availability -3", ref);
-        cs = (CheckService) osgiHelper.getServiceObject(ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check state 2", cs.check());
         bc.ungetService(ref);
 
@@ -95,8 +95,8 @@
         under = factory.createComponentInstance(props);
 
         // The instance should now be invalid
-        ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
-        assertNull("Check service availability -2", ref);
+        assertFalse("Check service availability -2",
+                ipojoHelper.isServiceAvailableByName(CheckService.class.getName(), "under1"));
 
         // Reconfigure the instance
         props.put("state", "true"); // Bar is a bad conf
@@ -112,9 +112,9 @@
 //        	System.out.println(a.getInstanceDescription().getDescription());
 //        }
 
-        ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
         assertNotNull("Check service availability -1", ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check state 1", cs.check());
         bc.ungetService(ref);
 
@@ -128,8 +128,8 @@
         }
 
         // The instance should now be invalid
-        ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
-        assertNull("Check service availability -2", ref);
+        assertFalse("Check service availability -2",
+                ipojoHelper.isServiceAvailableByName(CheckService.class.getName(), "under1"));
 
         // Reconfigure the instance with a valid configuration
         props.put("state", "true");
@@ -141,7 +141,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
         assertNotNull("Check service availability -3", ref);
-        cs = (CheckService) osgiHelper.getServiceObject(ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check state 2", cs.check());
         bc.ungetService(ref);
 
diff --git a/ipojo/runtime/core-it/ipojo-core-lifecycle-controller-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateLifeCycleController.java b/ipojo/runtime/core-it/ipojo-core-lifecycle-controller-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateLifeCycleController.java
index 860da07..911838d 100644
--- a/ipojo/runtime/core-it/ipojo-core-lifecycle-controller-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateLifeCycleController.java
+++ b/ipojo/runtime/core-it/ipojo-core-lifecycle-controller-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestImmediateLifeCycleController.java
@@ -49,7 +49,7 @@
         // The conf is correct, the PS must be provided
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
         assertNotNull("Check service availability -1", ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check state 1", cs.check());
         bc.ungetService(ref);
 
@@ -63,8 +63,8 @@
         }
 
         // The instance should now be invalid 
-        ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
-        assertNull("Check service availability -2", ref);
+        assertFalse("Check service availability -2",
+                ipojoHelper.isServiceAvailableByName(CheckService.class.getName(), "under1"));
 
         // Reconfigure the instance with a valid configuration
         props.put("conf", "foo"); // Bar is a bad conf
@@ -76,7 +76,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
         assertNotNull("Check service availability -3", ref);
-        cs = (CheckService) osgiHelper.getServiceObject(ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check state 2", cs.check());
         bc.ungetService(ref);
 
@@ -93,8 +93,8 @@
         assertEquals("check under state", under.getState(), ComponentInstance.INVALID);
 
         // The conf is incorrect, the PS must not be provided
-        ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under2");
-        assertNull("Check service availability -1", ref);
+        assertFalse("Check service availability -2",
+                ipojoHelper.isServiceAvailableByName(CheckService.class.getName(), "under2"));
 
         // Reconfigure the instance with a correct configuration
         props.put("conf", "foo");
@@ -104,9 +104,9 @@
             fail("The reconfiguration is not unacceptable and seems unacceptable : " + props);
         }
 
-        ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under2");
+        ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under2");
         assertNotNull("Check service availability -2", ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check state ", cs.check());
         bc.ungetService(ref);
 
diff --git a/ipojo/runtime/core-it/ipojo-core-lifecycle-controller-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestLifeCycleController.java b/ipojo/runtime/core-it/ipojo-core-lifecycle-controller-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestLifeCycleController.java
index 8d580ad..a4c35fd 100644
--- a/ipojo/runtime/core-it/ipojo-core-lifecycle-controller-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestLifeCycleController.java
+++ b/ipojo/runtime/core-it/ipojo-core-lifecycle-controller-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestLifeCycleController.java
@@ -54,7 +54,7 @@
         // The conf is correct, the PS must be provided
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
         assertNotNull("Check service availability -1", ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check state 1", cs.check());
         bc.ungetService(ref);
 
@@ -67,8 +67,8 @@
         }
 
         // The instance should now be invalid 
-        ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
-        assertNull("Check service availability -2", ref);
+        assertFalse("Check service availability -2",
+                ipojoHelper.isServiceAvailableByName(CheckService.class.getName(), "under1"));
 
         // Reconfigure the instance with a valid configuration
         props.put("conf", "foo"); // Bar is a bad conf
@@ -80,7 +80,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under1");
         assertNotNull("Check service availability -3", ref);
-        cs = (CheckService) osgiHelper.getServiceObject(ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check state 2", cs.check());
         bc.ungetService(ref);
 
@@ -104,13 +104,12 @@
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under2");
         assertNotNull("Check service availability -1", ref);
 
-        System.out.println("CS received : " + osgiHelper.getServiceObject(ref));
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        System.out.println("CS received : " + osgiHelper.getRawServiceObject(ref));
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertNotNull("Assert CS not null", cs);
         try {
             assertFalse("Check state (false)", cs.check());
         } catch (Throwable e) {
-            e.printStackTrace();
             fail(e.getMessage());
         }
 
@@ -128,7 +127,7 @@
 
         ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), "under2");
         assertNotNull("Check service availability -3", ref);
-        cs = (CheckService) osgiHelper.getServiceObject(ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check state ", cs.check());
         bc.ungetService(ref);
 
diff --git a/ipojo/runtime/core-it/ipojo-core-logger-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManifestLoggerInfo.java b/ipojo/runtime/core-it/ipojo-core-logger-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManifestLoggerInfo.java
index 657f7c9..c105559 100644
--- a/ipojo/runtime/core-it/ipojo-core-logger-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManifestLoggerInfo.java
+++ b/ipojo/runtime/core-it/ipojo-core-logger-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestManifestLoggerInfo.java
@@ -97,7 +97,6 @@
         ServiceReference r = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(),
                 "org.apache.felix.ipojo.runtime.core.components.MyComponent-0");
         Assert.assertNotNull(r);
-        System.out.println(((Architecture) osgiHelper.getServiceObject(r)).getInstanceDescription().getDescription());
 
         ServiceReference[] refs = bc.getAllServiceReferences(null, null);
         for (ServiceReference ref : refs) {
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-interceptor-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestBindingInterceptors.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-interceptor-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestBindingInterceptors.java
index 36b3f68..853c419 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-interceptor-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestBindingInterceptors.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-interceptor-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestBindingInterceptors.java
@@ -58,7 +58,7 @@
         ServiceReference ref = osgiHelper.waitForService(CheckService.class.getName(),
                 "(instance.name=" + instance.getInstanceName() + ")",
                 1000, true);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
 
         assertThat(check.check());
 
@@ -89,7 +89,7 @@
         ServiceReference ref = osgiHelper.waitForService(CheckService.class.getName(),
                 "(instance.name=" + instance.getInstanceName() + ")",
                 1000, true);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
 
         assertThat(check.check());
 
@@ -147,7 +147,7 @@
         ServiceReference ref = osgiHelper.waitForService(CheckService.class.getName(),
                 "(instance.name=" + instance.getInstanceName() + ")",
                 1000, true);
-        CheckService check = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService check = (CheckService) osgiHelper.getRawServiceObject(ref);
 
         assertThat(check.check());
 
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-interceptor-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestInterceptorsOnSeveralDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-interceptor-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestInterceptorsOnSeveralDependencies.java
index 282bf31..a99c89c 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-interceptor-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestInterceptorsOnSeveralDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-interceptor-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestInterceptorsOnSeveralDependencies.java
@@ -67,8 +67,8 @@
         final ServiceReference ref2 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(),
                 instance2.getInstanceName());
 
-        CheckService cs1 = (CheckService) osgiHelper.getServiceObject(ref1);
-        CheckService cs2 = (CheckService) osgiHelper.getServiceObject(ref2);
+        CheckService cs1 = (CheckService) osgiHelper.getRawServiceObject(ref1);
+        CheckService cs2 = (CheckService) osgiHelper.getRawServiceObject(ref2);
 
         @SuppressWarnings("unchecked") Map<String, ?> props1 = (Map<String, ?>) cs1.getProps().get("props");
         @SuppressWarnings("unchecked") Map<String, ?> props2 = (Map<String, ?>) cs2.getProps().get("props");
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestDelayedOptionalDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestDelayedOptionalDependencies.java
index a0e3891..5ee0d9d 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestDelayedOptionalDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestDelayedOptionalDependencies.java
@@ -111,12 +111,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
 
         // Check properties
@@ -136,11 +136,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -169,12 +169,12 @@
         instance2.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue());
@@ -193,11 +193,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -226,12 +226,12 @@
         instance3.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -246,11 +246,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -276,12 +276,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -296,11 +296,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -326,12 +326,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -350,11 +350,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -384,12 +384,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -408,11 +408,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -442,12 +442,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -466,11 +466,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestDelayedOptionalMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestDelayedOptionalMultipleDependencies.java
index ebb206b..bef1f03 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestDelayedOptionalMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestDelayedOptionalMultipleDependencies.java
@@ -93,12 +93,12 @@
         instance1.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue());
@@ -114,10 +114,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, it still one provider.
@@ -133,10 +133,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False, no more provider.
@@ -162,12 +162,12 @@
         instance2.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue());
@@ -183,10 +183,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -202,10 +202,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -231,12 +231,12 @@
         instance3.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue());
@@ -252,10 +252,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue());
@@ -271,10 +271,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -300,12 +300,12 @@
         instance4.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue());
@@ -321,10 +321,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue());
@@ -340,10 +340,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodDelayedOptionalDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodDelayedOptionalDependencies.java
index 05f2713..32ba068 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodDelayedOptionalDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodDelayedOptionalDependencies.java
@@ -95,12 +95,12 @@
         instance3.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -117,11 +117,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -147,12 +147,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -167,11 +167,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -197,12 +197,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -221,11 +221,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -255,12 +255,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -279,11 +279,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -313,12 +313,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -337,11 +337,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodDelayedOptionalMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodDelayedOptionalMultipleDependencies.java
index 591aeec..9c0dcb4 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodDelayedOptionalMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodDelayedOptionalMultipleDependencies.java
@@ -79,12 +79,12 @@
         instance3.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue());
@@ -100,10 +100,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue());
@@ -119,10 +119,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", (Boolean) props.get("result")); // False : no provider
@@ -147,12 +147,12 @@
         instance4.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue());
@@ -168,10 +168,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue());
@@ -187,10 +187,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodOptionalDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodOptionalDependencies.java
index a1c590c..339fd56 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodOptionalDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodOptionalDependencies.java
@@ -90,12 +90,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 
         Properties props = cs.getProps();
 
@@ -112,11 +112,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -131,10 +131,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -3", ((Boolean) props.get("result")).booleanValue());
@@ -156,12 +156,12 @@
     @Test public void testRef() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue()); // False is returned (nullable)
@@ -176,11 +176,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -195,10 +195,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -3", ((Boolean) props.get("result")).booleanValue());
@@ -220,12 +220,12 @@
     @Test public void testBoth() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue()); // False is returned (nullable)
@@ -240,11 +240,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -259,10 +259,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -3", ((Boolean) props.get("result")).booleanValue());
@@ -284,12 +284,12 @@
     @Test public void testMap() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue()); // False is returned (nullable)
@@ -308,11 +308,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -331,10 +331,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -3", ((Boolean) props.get("result")).booleanValue());
@@ -360,12 +360,12 @@
     @Test public void testDict() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue()); // False is returned (nullable)
@@ -384,11 +384,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -407,10 +407,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -3", ((Boolean) props.get("result")).booleanValue());
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodOptionalMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodOptionalMultipleDependencies.java
index fcc7587..6cea26e 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodOptionalMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestMethodOptionalMultipleDependencies.java
@@ -79,12 +79,12 @@
     @Test public void testObject() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -100,10 +100,10 @@
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -119,10 +119,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -138,10 +138,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -157,10 +157,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -183,12 +183,12 @@
     @Test public void testRef() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -204,10 +204,10 @@
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -223,10 +223,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -242,10 +242,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -261,10 +261,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestOptionalDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestOptionalDependencies.java
index 25a4dd4..37b3e82 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestOptionalDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestOptionalDependencies.java
@@ -97,12 +97,12 @@
 	@Test public void testSimple() {
 		ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 		
 		ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		Properties props = cs.getProps();
 		
 		//Check properties
@@ -120,11 +120,11 @@
 		
 		fooProvider.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
 		assertNotNull("Check CheckService availability", cs_ref);
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		
 		//Check properties
@@ -142,7 +142,7 @@
 		
 		fooProvider.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
 		id = null;
@@ -154,12 +154,12 @@
 	@Test public void testVoid() {
 		ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 		
 		ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation - 1", ((Boolean)props.get("result")).booleanValue()); // False is returned (nullable)
@@ -176,11 +176,11 @@
 		
 		fooProvider.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
 		assertNotNull("Check CheckService availability", cs_ref);
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation -2", ((Boolean)props.get("result")).booleanValue());
@@ -197,10 +197,10 @@
 		
 		fooProvider.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation -3", ((Boolean)props.get("result")).booleanValue());
@@ -224,12 +224,12 @@
 	@Test public void testObject() {
 		ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 		
 		ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue()); // False is returned (nullable)
@@ -242,11 +242,11 @@
 		
 		fooProvider.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
 		assertNotNull("Check CheckService availability", cs_ref);
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation -2", ((Boolean)props.get("result")).booleanValue());
@@ -259,10 +259,10 @@
 		
 		fooProvider.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation -3", ((Boolean)props.get("result")).booleanValue()); // Nullable object.
@@ -282,12 +282,12 @@
 	@Test public void testRef() {
 		ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 		
 		ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue()); // False is returned (nullable)
@@ -300,11 +300,11 @@
 		
 		fooProvider.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
 		assertNotNull("Check CheckService availability", cs_ref);
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation -2", ((Boolean)props.get("result")).booleanValue());
@@ -317,10 +317,10 @@
 		
 		fooProvider.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation -3", ((Boolean)props.get("result")).booleanValue());
@@ -340,12 +340,12 @@
 	@Test public void testBoth() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
         
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue()); // False is returned (nullable)
@@ -358,11 +358,11 @@
         
         fooProvider.start();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
         
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean)props.get("result")).booleanValue());
@@ -377,10 +377,10 @@
         
         fooProvider.stop();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
         
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -3", ((Boolean)props.get("result")).booleanValue());
@@ -402,12 +402,12 @@
 	@Test public void testMap() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
         
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue()); // False is returned (nullable)
@@ -424,11 +424,11 @@
         
         fooProvider.start();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
         
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean)props.get("result")).booleanValue());
@@ -447,10 +447,10 @@
         
         fooProvider.stop();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
         
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -3", ((Boolean)props.get("result")).booleanValue());
@@ -476,12 +476,12 @@
 	   @Test public void testDict() {
 	        ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
 	        assertNotNull("Check architecture availability", arch_ref);
-	        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+	        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 	        assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 	        
 	        ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
 	        assertNotNull("Check CheckService availability", cs_ref);
-	        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+	        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 	        Properties props = cs.getProps();
 	        //Check properties
 	        assertFalse("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue()); // False is returned (nullable)
@@ -498,11 +498,11 @@
 	        
 	        fooProvider.start();
 	        
-	        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+	        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 	        assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 	        
 	        assertNotNull("Check CheckService availability", cs_ref);
-	        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+	        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 	        props = cs.getProps();
 	        //Check properties
 	        assertTrue("check CheckService invocation -2", ((Boolean)props.get("result")).booleanValue());
@@ -521,10 +521,10 @@
 	        
 	        fooProvider.stop();
 	        
-	        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+	        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 	        assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 	        
-	        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+	        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 	        props = cs.getProps();
 	        //Check properties
 	        assertFalse("check CheckService invocation -3", ((Boolean)props.get("result")).booleanValue());
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestOptionalMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestOptionalMultipleDependencies.java
index f93b390..2a91d56 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestOptionalMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestOptionalMultipleDependencies.java
@@ -87,12 +87,12 @@
 	@Test public void testSimple() {
 		ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 		
 		ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation - 0", ((Boolean)props.get("result")).booleanValue()); // False : no provider
@@ -108,10 +108,10 @@
 		
 		fooProvider1.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 1", ((Boolean)props.get("result")).booleanValue()); // True, a provider is here
@@ -126,10 +126,10 @@
 		
 		fooProvider2.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -144,10 +144,10 @@
 
 		fooProvider1.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, it still one provider.
@@ -162,10 +162,10 @@
 
 		fooProvider2.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False, no more provider.
@@ -187,12 +187,12 @@
 	@Test public void testVoid() {
 		ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 		
 		ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -207,10 +207,10 @@
 
 		fooProvider1.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -225,10 +225,10 @@
 
 		fooProvider2.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -243,10 +243,10 @@
 
 		fooProvider1.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -261,10 +261,10 @@
 
 		fooProvider2.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -286,12 +286,12 @@
 	@Test public void testObject() {
 		ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 		
 		ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -306,10 +306,10 @@
 
 		fooProvider1.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -324,10 +324,10 @@
 
 		fooProvider2.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -342,10 +342,10 @@
 
 		fooProvider1.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -360,10 +360,10 @@
 
 		fooProvider2.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -385,12 +385,12 @@
 	@Test public void testRef() {
 		ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 		
 		ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -405,10 +405,10 @@
 
 		fooProvider1.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -423,10 +423,10 @@
 
 		fooProvider2.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -441,10 +441,10 @@
 
 		fooProvider1.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -459,10 +459,10 @@
 
 		fooProvider2.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestOptionalNoNullableDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestOptionalNoNullableDependencies.java
index b56bb33..85067c7 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestOptionalNoNullableDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestOptionalNoNullableDependencies.java
@@ -101,12 +101,12 @@
     @Test public void testSimple() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
 
         //Check properties
@@ -123,11 +123,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
 
         //Check properties
@@ -147,7 +147,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
         id = null;
@@ -159,12 +159,12 @@
     @Test public void testVoid() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertNull("check CheckService invocation - 1", props.get("result")); // Null, no provider
@@ -178,11 +178,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -199,10 +199,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertNull("check CheckService invocation -3", props.get("result"));
@@ -223,12 +223,12 @@
     @Test public void testObject() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertNull("check CheckService invocation -1", props.get("result")); // Null, no provider
@@ -241,11 +241,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -258,10 +258,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertNull("check CheckService invocation -3", props.get("result")); // No provider.
@@ -281,12 +281,12 @@
     @Test public void testRef() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertNull("check CheckService invocation -1", props.get("result")); //Null, no provider
@@ -299,11 +299,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -316,10 +316,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertNull("check CheckService invocation -3", props.get("result")); // Null, no provider
@@ -339,12 +339,12 @@
     @Test public void testBoth() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertNull("check CheckService invocation -1", props.get("result")); // Null, no provider
@@ -357,11 +357,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -376,10 +376,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertNull("check CheckService invocation -3", props.get("result")); // Null, no provider
@@ -401,12 +401,12 @@
     @Test public void testDict() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertNull("check CheckService invocation -1", props.get("result")); // Null, no provider
@@ -423,11 +423,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -446,10 +446,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertNull("check CheckService invocation -3", props.get("result")); // Null, no provider
@@ -475,12 +475,12 @@
     @Test public void testMap() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertNull("check CheckService invocation -1", props.get("result")); // Null, no provider
@@ -497,11 +497,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -520,10 +520,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertNull("check CheckService invocation -3", props.get("result")); // Null, no provider
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestProxiedDelayedOptionalDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestProxiedDelayedOptionalDependencies.java
index 1e90aa1..b94129b 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestProxiedDelayedOptionalDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestProxiedDelayedOptionalDependencies.java
@@ -111,12 +111,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
 
         // Check properties
@@ -136,11 +136,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -169,12 +169,12 @@
         instance2.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue());
@@ -193,11 +193,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -226,12 +226,12 @@
         instance3.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -246,11 +246,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -276,12 +276,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -296,11 +296,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         // Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -326,12 +326,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -350,11 +350,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -384,12 +384,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -408,11 +408,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -442,12 +442,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         // Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -466,11 +466,11 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestProxiedDelayedOptionalMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestProxiedDelayedOptionalMultipleDependencies.java
index c584c7e..0354a62 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestProxiedDelayedOptionalMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestProxiedDelayedOptionalMultipleDependencies.java
@@ -92,12 +92,12 @@
         instance1.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue());
@@ -113,10 +113,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, it still one provider.
@@ -132,10 +132,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False, no more provider.
@@ -160,12 +160,12 @@
         instance2.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue());
@@ -181,10 +181,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -200,10 +200,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -228,12 +228,12 @@
         instance3.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue());
@@ -249,10 +249,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue());
@@ -268,10 +268,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -296,12 +296,12 @@
         instance4.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue());
@@ -317,10 +317,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue());
@@ -336,10 +336,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestProxiedOptionalDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestProxiedOptionalDependencies.java
index 99dbf8a..b656ded 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestProxiedOptionalDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-optional-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/optional/TestProxiedOptionalDependencies.java
@@ -100,12 +100,12 @@
     @Test public void testSimple() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
 
         //Check properties
@@ -123,11 +123,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
 
         //Check properties
@@ -145,7 +145,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
         id = null;
@@ -157,12 +157,12 @@
     @Test public void testVoid() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // False is returned (nullable)
@@ -179,11 +179,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -200,10 +200,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -3", ((Boolean) props.get("result")).booleanValue());
@@ -227,12 +227,12 @@
     @Test public void testObject() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue()); // False is returned (nullable)
@@ -245,11 +245,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -262,10 +262,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -3", ((Boolean) props.get("result")).booleanValue()); // Nullable object.
@@ -285,12 +285,12 @@
     @Test public void testRef() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue()); // False is returned (nullable)
@@ -303,11 +303,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -320,10 +320,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -3", ((Boolean) props.get("result")).booleanValue());
@@ -343,12 +343,12 @@
     @Test public void testBoth() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue()); // False is returned (nullable)
@@ -361,11 +361,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -380,10 +380,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -3", ((Boolean) props.get("result")).booleanValue());
@@ -405,12 +405,12 @@
     @Test public void testMap() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue()); // False is returned (nullable)
@@ -427,11 +427,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -450,10 +450,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -3", ((Boolean) props.get("result")).booleanValue());
@@ -479,12 +479,12 @@
     @Test public void testDict() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue()); // False is returned (nullable)
@@ -501,11 +501,11 @@
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -2", ((Boolean) props.get("result")).booleanValue());
@@ -524,10 +524,10 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation -3", ((Boolean) props.get("result")).booleanValue());
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-policies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/comparator/TestComparator.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-policies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/comparator/TestComparator.java
index d9541d4..d393c48 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-policies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/comparator/TestComparator.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-policies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/comparator/TestComparator.java
@@ -61,7 +61,7 @@
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), dynInstance.getInstanceName());
         assertNotNull("CS availability", ref);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties result = cs.getProps();
         int fsGrade = (Integer) result.get("fs");
         int fs2Grade = (Integer) result.get("fs2");
@@ -111,7 +111,7 @@
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), dpInstance.getInstanceName());
         assertNotNull("CS availability", ref);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
         Properties result = cs.getProps();
         int fsGrade = (Integer) result.get("fs");
         int fs2Grade = (Integer) result.get("fs2");
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedCollectionMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedCollectionMultipleDependencies.java
index dc1eaaf..1e87c0f 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedCollectionMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedCollectionMultipleDependencies.java
@@ -78,17 +78,17 @@
     @Test public void testSimple() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -103,10 +103,10 @@
         assertEquals("Check FS invocation (double) - 1", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.start();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -122,10 +122,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -140,7 +140,7 @@
         assertEquals("Check FS invocation (double) - 3", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.stop();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -152,12 +152,12 @@
     @Test public void testOptional() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -173,10 +173,10 @@
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -192,10 +192,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -211,10 +211,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, it still one provider.
@@ -230,10 +230,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False, no more provider.
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedDelayedMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedDelayedMultipleDependencies.java
index 7e3db23..ab46719 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedDelayedMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedDelayedMultipleDependencies.java
@@ -114,12 +114,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -135,10 +135,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -154,7 +154,7 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -170,12 +170,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -191,10 +191,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -210,7 +210,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -225,15 +225,15 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -249,10 +249,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -268,7 +268,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -282,12 +282,12 @@
         instance4.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -303,10 +303,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -322,7 +322,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -336,12 +336,12 @@
         instance5.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -362,10 +362,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -385,7 +385,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -399,12 +399,12 @@
         instance6.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -425,10 +425,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -448,7 +448,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -462,12 +462,12 @@
         instance7.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -488,10 +488,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -511,7 +511,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
 
         id = null;
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedDelayedSimpleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedDelayedSimpleDependencies.java
index f63f350..e35130d 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedDelayedSimpleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedDelayedSimpleDependencies.java
@@ -111,24 +111,24 @@
         instance1.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
         fooProvider.stop();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
         fooProvider.start();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
         fooProvider.stop();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
         id = null;
         cs = null;
@@ -141,12 +141,12 @@
         instance2.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -161,7 +161,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -176,13 +176,13 @@
         instance3.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -197,7 +197,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -212,14 +212,14 @@
         instance4.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -234,7 +234,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -249,14 +249,14 @@
         instance5.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -276,7 +276,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -291,14 +291,14 @@
         instance6.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -318,7 +318,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -333,14 +333,14 @@
         instance7.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -360,7 +360,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedListMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedListMultipleDependencies.java
index 507aacb..60876d7 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedListMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedListMultipleDependencies.java
@@ -78,17 +78,17 @@
     @Test public void testSimple() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -103,10 +103,10 @@
         assertEquals("Check FS invocation (double) - 1", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.start();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -122,10 +122,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -140,7 +140,7 @@
         assertEquals("Check FS invocation (double) - 3", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.stop();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -152,12 +152,12 @@
     @Test public void testOptional() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -173,10 +173,10 @@
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -192,10 +192,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -211,10 +211,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, it still one provider.
@@ -230,10 +230,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False, no more provider.
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedSetMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedSetMultipleDependencies.java
index 2833870..2e67bad 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedSetMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedSetMultipleDependencies.java
@@ -78,17 +78,17 @@
     @Test public void testSimple() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -103,10 +103,10 @@
         assertEquals("Check FS invocation (double) - 1", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.start();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -122,10 +122,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -140,7 +140,7 @@
         assertEquals("Check FS invocation (double) - 3", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.stop();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -152,12 +152,12 @@
     @Test public void testOptional() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -173,10 +173,10 @@
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -192,10 +192,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -211,10 +211,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, it still one provider.
@@ -230,10 +230,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False, no more provider.
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedSimpleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedSimpleDependencies.java
index a320c04..5559a91 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedSimpleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxiedSimpleDependencies.java
@@ -106,37 +106,37 @@
     @Test public void testSimple() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
         
         fooProvider.start();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
         
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
         
         fooProvider.stop();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
         
         fooProvider.start();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
         
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
         
         fooProvider.stop();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
         
         id = null;
@@ -148,17 +148,17 @@
     @Test public void testVoid() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
         
         fooProvider.start();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
         
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        Object o = osgiHelper.getServiceObject(cs_ref);
+        Object o = osgiHelper.getRawServiceObject(cs_ref);
         CheckService cs = (CheckService) o;
         Properties props = cs.getProps();
         //Check properties
@@ -174,7 +174,7 @@
         
         fooProvider.stop();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
         
         id = null;
@@ -186,17 +186,17 @@
     @Test public void testObject() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
         
         fooProvider.start();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
         
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue());
@@ -211,7 +211,7 @@
         
         fooProvider.stop();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
         
         id = null;
@@ -223,17 +223,17 @@
     @Test public void testRef() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
         
         fooProvider.start();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
         
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue());
@@ -248,7 +248,7 @@
         
         fooProvider.stop();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
         
         id = null;
@@ -260,17 +260,17 @@
     @Test public void testBoth() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
         
         fooProvider.start();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
         
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue());
@@ -285,7 +285,7 @@
         
         fooProvider.stop();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
         
         id = null;
@@ -297,17 +297,17 @@
     @Test public void testDouble() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
         
         fooProvider.start();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
         
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertNotNull("Check cs", cs);
         cs.check();
         Properties props = cs.getProps();
@@ -324,7 +324,7 @@
         
         fooProvider.stop();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
         
         id = null;
@@ -336,17 +336,17 @@
     @Test public void testMap() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
         
         fooProvider.start();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
         
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue());
@@ -365,7 +365,7 @@
         
         fooProvider.stop();
         
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
         
         id = null;
@@ -377,17 +377,17 @@
        @Test public void testDict() {
             ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance8.getInstanceName());
             assertNotNull("Check architecture availability", arch_ref);
-            InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+            InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
             assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
             
             fooProvider.start();
             
-            id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+            id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
             assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
             
             ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance8.getInstanceName());
             assertNotNull("Check CheckService availability", cs_ref);
-            CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+            CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
             Properties props = cs.getProps();
             //Check properties
             assertTrue("check CheckService invocation -1", ((Boolean)props.get("result")).booleanValue());
@@ -406,7 +406,7 @@
             
             fooProvider.stop();
             
-            id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+            id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
             assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
             
             id = null;
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxyTest.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxyTest.java
index 229a37f..a19eae5 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxyTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-proxies/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/proxies/TestProxyTest.java
@@ -52,7 +52,7 @@
 
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull(ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
 
         Properties props = cs.getProps();
         FooService helper = (FooService) props.get("helper.fs");
@@ -75,7 +75,7 @@
 
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull(ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
 
         Properties props = cs.getProps();
         FooService helper = (FooService) props.get("helper.fs");
@@ -103,7 +103,7 @@
 
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull(ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
 
         Properties props = cs.getProps();
         FooService helper = (FooService) props.get("helper.fs");
@@ -127,7 +127,7 @@
 
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull(ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
 
         Properties props = cs.getProps();
         FooService helper = (FooService) props.get("helper.fs");
@@ -156,7 +156,7 @@
 
         ServiceReference ref = osgiHelper.getServiceReference(CheckService.class.getName(), "(service.pid=Helper)");
         assertNotNull(ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
 
         Properties props = cs.getProps();
         FooService helper = (FooService) props.get("helper.fs");
@@ -180,7 +180,7 @@
 
         ServiceReference ref = osgiHelper.getServiceReference(CheckService.class.getName(), "(service.pid=Helper)");
         assertNotNull(ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
 
         try {
             cs.getProps();
@@ -213,7 +213,7 @@
 
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull(ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
 
         Properties props = cs.getProps();
         FooService helper = (FooService) props.get("helper.fs");
@@ -246,7 +246,7 @@
 
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull(ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref);
 
         Properties props = cs.getProps();
         FooService helper = (FooService) props.get("helper.fs");
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestCollectionMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestCollectionMultipleDependencies.java
index 8d305fc..bded88c 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestCollectionMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestCollectionMultipleDependencies.java
@@ -77,17 +77,17 @@
     @Test public void testSimple() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -102,10 +102,10 @@
         assertEquals("Check FS invocation (double) - 1", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.start();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -121,10 +121,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -139,19 +139,19 @@
         assertEquals("Check FS invocation (double) - 3", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.stop();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
     }
 
     @Test public void testOptional() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -167,10 +167,10 @@
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -186,10 +186,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -205,10 +205,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, it still one provider.
@@ -224,10 +224,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False, no more provider.
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedMultipleDependencies.java
index 3328f7f..a252ba7 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedMultipleDependencies.java
@@ -113,12 +113,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -134,10 +134,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -153,7 +153,7 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.INVALID);
 
         instance1.stop();
@@ -164,12 +164,12 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -185,10 +185,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -204,7 +204,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.INVALID);
 
         instance2.stop();
@@ -215,15 +215,15 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -239,10 +239,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -258,7 +258,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         instance3.stop();
@@ -268,12 +268,12 @@
         instance4.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -289,10 +289,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -308,7 +308,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
 
         instance4.stop();
@@ -318,12 +318,12 @@
         instance5.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -344,10 +344,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -367,7 +367,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -381,12 +381,12 @@
         instance6.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -407,10 +407,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -430,7 +430,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -444,12 +444,12 @@
         instance7.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -470,10 +470,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -493,7 +493,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
 
         id = null;
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedSimpleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedSimpleDependencies.java
index 09b80c3..f869e8d 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedSimpleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDelayedSimpleDependencies.java
@@ -110,24 +110,24 @@
         instance1.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
         fooProvider.stop();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
         fooProvider.start();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
         fooProvider.stop();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
         id = null;
         cs = null;
@@ -140,12 +140,12 @@
         instance2.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -160,7 +160,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -175,13 +175,13 @@
         instance3.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -196,7 +196,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -211,14 +211,14 @@
         instance4.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -233,7 +233,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -248,14 +248,14 @@
         instance5.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -275,7 +275,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -290,14 +290,14 @@
         instance6.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -317,7 +317,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -332,14 +332,14 @@
         instance7.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -359,7 +359,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDependencyArchitecture.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDependencyArchitecture.java
index 0d90240..4e0e636 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDependencyArchitecture.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestDependencyArchitecture.java
@@ -127,7 +127,7 @@
     public void testSimpleDependency() {
         ServiceReference arch_dep = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_dep);
-        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.INVALID);
 
         // Check dependency handler invalidity
@@ -146,10 +146,10 @@
 
         ServiceReference arch_ps = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps);
-        PrimitiveInstanceDescription id_ps = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+        PrimitiveInstanceDescription id_ps = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_ps.getState() == ComponentInstance.VALID);
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertTrue("Check dependency handler validity", dhd.isValid());
@@ -157,30 +157,30 @@
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+        //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
         ProvidedServiceHandlerDescription psh = getPSDesc(id_ps);
         assertEquals("Check POJO creation", id_ps.getCreatedObjects().length, 1);
 
         fooProvider1.stop();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.INVALID);
         dhd = getDependencyDesc(id_dep);
         assertFalse("Check dependency handler invalidity", dhd.isValid());
 
         fooProvider1.start();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
         arch_ps = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps);
-        //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+        //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_ps.getState() == ComponentInstance.VALID);
         psh = getPSDesc(id_ps);
         assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
@@ -190,19 +190,19 @@
 
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+        //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
         psh = getPSDesc(id_ps);
 
 
         fooProvider1.stop();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.INVALID);
         dhd = getDependencyDesc(id_dep);
         assertFalse("Check dependency handler invalidity", dhd.isValid());
@@ -217,7 +217,7 @@
     public void testProxiedSimpleDependency() {
         ServiceReference arch_dep = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_dep);
-        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.INVALID);
 
         // Check dependency handler invalidity
@@ -236,10 +236,10 @@
 
         ServiceReference arch_ps = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps);
-        PrimitiveInstanceDescription id_ps = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+        PrimitiveInstanceDescription id_ps = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_ps.getState() == ComponentInstance.VALID);
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertTrue("Check dependency handler validity", dhd.isValid());
@@ -247,30 +247,30 @@
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+        //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
         ProvidedServiceHandlerDescription psh = getPSDesc(id_ps);
         assertEquals("Check POJO creation", id_ps.getCreatedObjects().length, 1);
 
         fooProvider1.stop();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.INVALID);
         dhd = getDependencyDesc(id_dep);
         assertFalse("Check dependency handler invalidity", dhd.isValid());
 
         fooProvider1.start();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
         arch_ps = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps);
-        //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+        //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_ps.getState() == ComponentInstance.VALID);
         psh = getPSDesc(id_ps);
         assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
@@ -280,18 +280,18 @@
 
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+        //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
         psh = getPSDesc(id_ps);
 
         fooProvider1.stop();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.INVALID);
         dhd = getDependencyDesc(id_dep);
         assertFalse("Check dependency handler invalidity", dhd.isValid());
@@ -306,7 +306,7 @@
     public void testOptionalDependency() {
         ServiceReference arch_dep = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_dep);
-        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.VALID);
 
         // Check dependency handler invalidity
@@ -324,10 +324,10 @@
 
         ServiceReference arch_ps = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps);
-        PrimitiveInstanceDescription id_ps = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+        PrimitiveInstanceDescription id_ps = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_ps.getState() == ComponentInstance.VALID);
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertTrue("Check dependency handler validity", dhd.isValid());
@@ -335,30 +335,30 @@
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+        //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
         ProvidedServiceHandlerDescription psh = getPSDesc(id_ps);
         assertEquals("Check POJO creation", id_ps.getCreatedObjects().length, 1);
 
         fooProvider1.stop();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertTrue("Check dependency handler invalidity", dhd.isValid());
 
         fooProvider1.start();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
         arch_ps = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps);
-        //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+        //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_ps.getState() == ComponentInstance.VALID);
         psh = getPSDesc(id_ps);
         assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
@@ -368,18 +368,18 @@
 
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps = ((Architecture) osgiHelper.getServiceObject(arch_ps)).getInstanceDescription();
+        //id_ps = ((Architecture) osgiHelper.getRawServiceObject(arch_ps)).getInstanceDescription();
         psh = getPSDesc(id_ps);
 
         fooProvider1.stop();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertTrue("Check dependency handler invalidity", dhd.isValid());
@@ -394,7 +394,7 @@
     public void testMultipleDependency() {
         ServiceReference arch_dep = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_dep);
-        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.INVALID);
 
         // Check dependency handler invalidity
@@ -420,10 +420,10 @@
 
         ServiceReference arch_ps1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps1);
-        PrimitiveInstanceDescription id_ps1 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        PrimitiveInstanceDescription id_ps1 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id_ps1.getState() == ComponentInstance.VALID);
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertTrue("Check dependency handler validity", dhd.isValid());
@@ -432,13 +432,13 @@
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
         ProvidedServiceHandlerDescription psh = getPSDesc(id_ps1);
         assertEquals("Check POJO creation", id_ps1.getCreatedObjects().length, 1);
 
@@ -449,12 +449,12 @@
         ServiceReference arch_ps2 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps1);
         assertNotNull("Check architecture 2 availability", arch_ps2);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
-        PrimitiveInstanceDescription id_ps2 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps2)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
+        PrimitiveInstanceDescription id_ps2 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps2)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_ps1.getState() == ComponentInstance.VALID);
         assertTrue("Check instance 2 invalidity - 1", id_ps2.getState() == ComponentInstance.VALID);
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertTrue("Check dependency handler validity", dhd.isValid());
@@ -463,14 +463,14 @@
 
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
-        //id_ps2 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps2 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
         ProvidedServiceHandlerDescription psh1 = getPSDesc(id_ps1);
         ProvidedServiceHandlerDescription psh2 = getPSDesc(id_ps2);
         assertEquals("Check POJO creation", id_ps1.getCreatedObjects().length, 1);
@@ -481,10 +481,10 @@
 
         arch_ps1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps1);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id_ps1.getState() == ComponentInstance.VALID);
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertTrue("Check dependency handler validity", dhd.isValid());
@@ -493,31 +493,31 @@
 
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
         psh = getPSDesc(id_ps1);
         assertEquals("Check POJO creation", id_ps1.getCreatedObjects().length, 1);
         assertEquals("Check used ref - 5 ", dhd.getDependencies()[0].getUsedServices().size(), 1);
 
         fooProvider1.stop();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertFalse("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertFalse("Check dependency handler invalidity", dhd.isValid());
 
         fooProvider2.start();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
         arch_ps2 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps1);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
 
         assertTrue("Check instance invalidity - 1", id_ps2.getState() == ComponentInstance.VALID);
 
@@ -530,19 +530,19 @@
 
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
         psh = getPSDesc(id_ps2);
         assertEquals("Check used ref - 7 ", dhd.getDependencies()[0].getUsedServices().size(), 1);
 
         fooProvider2.stop();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertFalse("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertFalse("Check dependency handler invalidity", dhd.isValid());
@@ -557,7 +557,7 @@
     public void testMultipleOptionalDependency() {
         ServiceReference arch_dep = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_dep);
-        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        PrimitiveInstanceDescription id_dep = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_dep.getState() == ComponentInstance.VALID);
 
         // Check dependency handler invalidity
@@ -574,10 +574,10 @@
 
         ServiceReference arch_ps1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps1);
-        PrimitiveInstanceDescription id_ps1 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        PrimitiveInstanceDescription id_ps1 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_ps1.getState() == ComponentInstance.VALID);
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertTrue("Check dependency handler validity", dhd.isValid());
@@ -585,13 +585,13 @@
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
         ProvidedServiceHandlerDescription psh = getPSDesc(id_ps1);
         assertEquals("Check POJO creation", id_ps1.getCreatedObjects().length, 1);
 
@@ -602,12 +602,12 @@
         ServiceReference arch_ps2 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps1);
         assertNotNull("Check architecture 2 availability", arch_ps2);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
-        PrimitiveInstanceDescription id_ps2 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getServiceObject(arch_ps2)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
+        PrimitiveInstanceDescription id_ps2 = (PrimitiveInstanceDescription) ((Architecture) osgiHelper.getRawServiceObject(arch_ps2)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_ps1.getState() == ComponentInstance.VALID);
         assertTrue("Check instance 2 invalidity - 1", id_ps2.getState() == ComponentInstance.VALID);
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertTrue("Check dependency handler validity", dhd.isValid());
@@ -615,14 +615,14 @@
 
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
-        //id_ps2 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps2 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
         ProvidedServiceHandlerDescription psh1 = getPSDesc(id_ps1);
         ProvidedServiceHandlerDescription psh2 = getPSDesc(id_ps2);
         assertEquals("Check POJO creation", id_ps1.getCreatedObjects().length, 1);
@@ -632,10 +632,10 @@
 
         arch_ps1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps1);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_ps1.getState() == ComponentInstance.VALID);
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertTrue("Check dependency handler validity", dhd.isValid());
@@ -643,30 +643,30 @@
 
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
         psh = getPSDesc(id_ps1);
         assertEquals("Check POJO creation", id_ps1.getCreatedObjects().length, 1);
 
         fooProvider1.stop();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertTrue("Check dependency handler invalidity", dhd.isValid());
 
         fooProvider2.start();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
         arch_ps2 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), fooProvider2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ps2);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id_ps2.getState() == ComponentInstance.VALID);
         psh = getPSDesc(id_ps2);
         assertTrue("Check instance validity", id_dep.getState() == ComponentInstance.VALID);
@@ -676,18 +676,18 @@
 
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         // Check object graph 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         dhd = getDependencyDesc(id_dep);
-        //id_ps1 = ((Architecture) osgiHelper.getServiceObject(arch_ps1)).getInstanceDescription();
+        //id_ps1 = ((Architecture) osgiHelper.getRawServiceObject(arch_ps1)).getInstanceDescription();
         psh = getPSDesc(id_ps2);
 
         fooProvider2.stop();
 
-        //id_dep = ((Architecture) osgiHelper.getServiceObject(arch_dep)).getInstanceDescription();
+        //id_dep = ((Architecture) osgiHelper.getRawServiceObject(arch_dep)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id_dep.getState() == ComponentInstance.VALID);
         dhd = getDependencyDesc(id_dep);
         assertTrue("Check dependency handler invalidity", dhd.isValid());
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestListMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestListMultipleDependencies.java
index 9a121fc..c396422 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestListMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestListMultipleDependencies.java
@@ -77,17 +77,17 @@
     @Test public void testSimple() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -102,10 +102,10 @@
         assertEquals("Check FS invocation (double) - 1", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.start();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -121,10 +121,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -139,7 +139,7 @@
         assertEquals("Check FS invocation (double) - 3", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.stop();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -151,12 +151,12 @@
     @Test public void testOptional() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -172,10 +172,10 @@
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -191,10 +191,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -210,10 +210,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, it still one provider.
@@ -229,10 +229,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False, no more provider.
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodDelayedMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodDelayedMultipleDependencies.java
index 220f6ea..f88f78c 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodDelayedMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodDelayedMultipleDependencies.java
@@ -100,15 +100,15 @@
 
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -124,10 +124,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -143,7 +143,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -157,12 +157,12 @@
         instance4.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -178,10 +178,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -197,7 +197,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -211,12 +211,12 @@
         instance5.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -236,10 +236,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -259,7 +259,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -273,12 +273,12 @@
         instance6.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -298,10 +298,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -321,7 +321,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -335,12 +335,12 @@
         instance7.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -360,10 +360,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -383,7 +383,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.INVALID);
 
         id = null;
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodDelayedSimpleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodDelayedSimpleDependencies.java
index 051fbf9..7986ac1 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodDelayedSimpleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodDelayedSimpleDependencies.java
@@ -94,13 +94,13 @@
         instance3.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -115,7 +115,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -130,14 +130,14 @@
         instance4.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -152,7 +152,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -167,14 +167,14 @@
         instance5.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -189,7 +189,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -204,14 +204,14 @@
         instance6.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -230,7 +230,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -245,14 +245,14 @@
         instance7.start();
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -271,7 +271,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodMultipleDependencies.java
index 3d9e44f..1573a1c 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodMultipleDependencies.java
@@ -95,17 +95,17 @@
     @Test public void testObject() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -121,10 +121,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -140,10 +140,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -159,7 +159,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -171,17 +171,17 @@
     @Test public void testRef() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -197,10 +197,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -216,10 +216,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -235,7 +235,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -247,17 +247,17 @@
     @Test public void testBoth() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -277,10 +277,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -300,10 +300,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -323,7 +323,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -335,17 +335,17 @@
     @Test public void testMap() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -365,10 +365,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -388,10 +388,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -411,7 +411,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -423,17 +423,17 @@
     @Test public void testDict() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -453,10 +453,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -476,10 +476,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -499,7 +499,7 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         id = null;
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodSimpleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodSimpleDependencies.java
index b9375a1..30a9dc6 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodSimpleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMethodSimpleDependencies.java
@@ -92,17 +92,17 @@
     @Test public void testObject() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -117,7 +117,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -129,17 +129,17 @@
     @Test public void testRef() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -154,7 +154,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -166,17 +166,17 @@
     @Test public void testBoth() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -191,7 +191,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -203,17 +203,17 @@
     @Test public void testMap() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -232,7 +232,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -244,17 +244,17 @@
     @Test public void testDict() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -273,7 +273,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestModifyDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestModifyDependencies.java
index c788123..ef5c093 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestModifyDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestModifyDependencies.java
@@ -96,17 +96,17 @@
     @Test public void testVoid() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        Object o = osgiHelper.getServiceObject(cs_ref);
+        Object o = osgiHelper.getRawServiceObject(cs_ref);
         CheckService cs = (CheckService) o;
         Properties props = cs.getProps();
         //Check properties
@@ -123,7 +123,7 @@
 
 
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooProvider.getInstanceName());
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
 
         fs.foo(); // Update
 
@@ -141,7 +141,7 @@
         assertEquals("check modify -1.1", ((Integer) props.get("modified")).intValue(), 3); // 1 (first foo) + 1 (our foo) + 1 (check foo)
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -156,17 +156,17 @@
     @Test public void testObject() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -181,7 +181,7 @@
         assertEquals("check modify -1 (" + ((Integer) props.get("modified")).intValue() + ")", ((Integer) props.get("modified")).intValue(), 1);
 
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooProvider.getInstanceName());
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
 
         fs.foo(); // Update
 
@@ -192,7 +192,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -206,17 +206,17 @@
     @Test public void testRef() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -231,7 +231,7 @@
         assertEquals("check modify -1 (" + ((Integer) props.get("modified")).intValue() + ")", ((Integer) props.get("modified")).intValue(), 1);
 
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooProvider.getInstanceName());
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
 
         fs.foo(); // Update
 
@@ -241,7 +241,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -255,17 +255,17 @@
     @Test public void testBoth() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -280,7 +280,7 @@
         assertEquals("check modify -1 (" + ((Integer) props.get("modified")).intValue() + ")", ((Integer) props.get("modified")).intValue(), 1);
 
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooProvider.getInstanceName());
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
 
         fs.foo(); // Update
 
@@ -290,7 +290,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -305,17 +305,17 @@
     @Test public void testMap() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -334,7 +334,7 @@
         assertEquals("check modify -1 (" + ((Integer) props.get("modified")).intValue() + ")", ((Integer) props.get("modified")).intValue(), 1);
 
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooProvider.getInstanceName());
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
 
         fs.foo(); // Update
 
@@ -344,7 +344,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -358,17 +358,17 @@
     @Test public void testDict() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance8.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance8.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -387,7 +387,7 @@
         assertEquals("check modify -1 (" + ((Integer) props.get("modified")).intValue() + ")", ((Integer) props.get("modified")).intValue(), 1);
 
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooProvider.getInstanceName());
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
 
         fs.foo(); // Update
 
@@ -397,7 +397,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMultipleDependencies.java
index aa8ce1c..d0bdd21 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestMultipleDependencies.java
@@ -86,17 +86,17 @@
 	@Test public void testSimple() {
 		ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 		
 		fooProvider1.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
 		ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 1", ((Boolean)props.get("result")).booleanValue()); // True, a provider is here
@@ -111,10 +111,10 @@
 		assertEquals("Check FS invocation (double) - 1", ((Double)props.get("double")).doubleValue(), 1.0, 0);
 		
 		fooProvider2.start();
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 2", ((Boolean)props.get("result")).booleanValue()); // True, two providers are here
@@ -130,10 +130,10 @@
 		
 		fooProvider1.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 3", ((Boolean)props.get("result")).booleanValue()); // True, two providers are here
@@ -148,7 +148,7 @@
 		assertEquals("Check FS invocation (double) - 3", ((Double)props.get("double")).doubleValue(), 1.0, 0);
 		
 		fooProvider2.stop();
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 		
 		id = null;
@@ -160,17 +160,17 @@
 	@Test public void testVoid() {
 		ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 		
 		fooProvider1.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
 		ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 1", ((Boolean)props.get("result")).booleanValue()); // True, a provider is here
@@ -186,10 +186,10 @@
 		
 		fooProvider2.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 2", ((Boolean)props.get("result")).booleanValue()); // True, two providers are here
@@ -205,10 +205,10 @@
 		
 		fooProvider1.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 3", ((Boolean)props.get("result")).booleanValue()); // True, two providers are here
@@ -224,7 +224,7 @@
 		
 		fooProvider2.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 		
 		id = null;
@@ -236,17 +236,17 @@
 	@Test public void testObject() {
 		ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 		
 		fooProvider1.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
 		ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 1", ((Boolean)props.get("result")).booleanValue()); // True, a provider is here
@@ -262,10 +262,10 @@
 		
 		fooProvider2.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 2", ((Boolean)props.get("result")).booleanValue()); // True, two providers are here
@@ -281,10 +281,10 @@
 		
 		fooProvider1.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 3", ((Boolean)props.get("result")).booleanValue()); // True, two providers are here
@@ -300,7 +300,7 @@
 		
 		fooProvider2.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 		
 		id = null;
@@ -312,17 +312,17 @@
 	@Test public void testRef() {
 		ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
 		assertNotNull("Check architecture availability", arch_ref);
-		InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 		
 		fooProvider1.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 		
 		ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
 		assertNotNull("Check CheckService availability", cs_ref);
-		CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		Properties props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 1", ((Boolean)props.get("result")).booleanValue()); // True, a provider is here
@@ -338,10 +338,10 @@
 		
 		fooProvider2.start();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 2", ((Boolean)props.get("result")).booleanValue()); // True, two providers are here
@@ -357,10 +357,10 @@
 		
 		fooProvider1.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 		
-		cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+		cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
 		props = cs.getProps();
 		//Check properties
 		assertTrue("check CheckService invocation - 3", ((Boolean)props.get("result")).booleanValue()); // True, two providers are here
@@ -376,7 +376,7 @@
 		
 		fooProvider2.stop();
 		
-		id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+		id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
 		assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 		
 		id = null;
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestSetMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestSetMultipleDependencies.java
index e6be472..195065d 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestSetMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestSetMultipleDependencies.java
@@ -77,17 +77,17 @@
     @Test public void testSimple() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -102,10 +102,10 @@
         assertEquals("Check FS invocation (double) - 1", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.start();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -121,10 +121,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -139,7 +139,7 @@
         assertEquals("Check FS invocation (double) - 3", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.stop();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -151,12 +151,12 @@
     @Test public void testOptional() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -172,10 +172,10 @@
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -191,10 +191,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -210,10 +210,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, it still one provider.
@@ -229,10 +229,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False, no more provider.
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestSimpleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestSimpleDependencies.java
index 8abd059..b783fa6 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestSimpleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestSimpleDependencies.java
@@ -110,37 +110,37 @@
     @Test public void testSimple() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertTrue("check CheckService invocation", cs.check());
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -152,17 +152,17 @@
     @Test public void testVoid() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        Object o = osgiHelper.getServiceObject(cs_ref);
+        Object o = osgiHelper.getRawServiceObject(cs_ref);
         CheckService cs = (CheckService) o;
         Properties props = cs.getProps();
         //Check properties
@@ -178,7 +178,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -190,17 +190,17 @@
     @Test public void testObject() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance3.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance3.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -215,7 +215,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -227,17 +227,17 @@
     @Test public void testRef() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance4.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance4.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -252,7 +252,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -264,17 +264,17 @@
     @Test public void testBoth() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance5.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance5.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -289,7 +289,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -301,17 +301,17 @@
     @Test public void testDouble() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance6.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance6.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         assertNotNull("Check cs", cs);
         cs.check();
         Properties props = cs.getProps();
@@ -328,7 +328,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -340,17 +340,17 @@
     @Test public void testMap() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance7.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance7.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -369,7 +369,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -381,17 +381,17 @@
     @Test public void testDict() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance8.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance8.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation -1", ((Boolean) props.get("result")).booleanValue());
@@ -410,7 +410,7 @@
 
         fooProvider.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 2", id.getState() == ComponentInstance.INVALID);
 
         id = null;
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestVectorMultipleDependencies.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestVectorMultipleDependencies.java
index 16746d5..fadcaa8 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestVectorMultipleDependencies.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/dependencies/TestVectorMultipleDependencies.java
@@ -77,17 +77,17 @@
     @Test public void testSimple() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance1.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance invalidity - 1", id.getState() == ComponentInstance.INVALID);
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance1.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -102,10 +102,10 @@
         assertEquals("Check FS invocation (double) - 1", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.start();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -121,10 +121,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -139,7 +139,7 @@
         assertEquals("Check FS invocation (double) - 3", ((Double) props.get("double")).doubleValue(), 1.0, 0);
 
         fooProvider2.stop();
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.INVALID);
 
         id = null;
@@ -151,12 +151,12 @@
     @Test public void testOptional() {
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), instance2.getInstanceName());
         assertNotNull("Check architecture availability", arch_ref);
-        InstanceDescription id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        InstanceDescription id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 1", id.getState() == ComponentInstance.VALID);
 
         ServiceReference cs_ref = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), instance2.getInstanceName());
         assertNotNull("Check CheckService availability", cs_ref);
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         Properties props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 0", ((Boolean) props.get("result")).booleanValue()); // False : no provider
@@ -172,10 +172,10 @@
 
         fooProvider1.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 2", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 1", ((Boolean) props.get("result")).booleanValue()); // True, a provider is here
@@ -191,10 +191,10 @@
 
         fooProvider2.start();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 3", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 2", ((Boolean) props.get("result")).booleanValue()); // True, two providers are here
@@ -210,10 +210,10 @@
 
         fooProvider1.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 4", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertTrue("check CheckService invocation - 3", ((Boolean) props.get("result")).booleanValue()); // True, it still one provider.
@@ -229,10 +229,10 @@
 
         fooProvider2.stop();
 
-        id = ((Architecture) osgiHelper.getServiceObject(arch_ref)).getInstanceDescription();
+        id = ((Architecture) osgiHelper.getRawServiceObject(arch_ref)).getInstanceDescription();
         assertTrue("Check instance validity - 5", id.getState() == ComponentInstance.VALID);
 
-        cs = (CheckService) osgiHelper.getServiceObject(cs_ref);
+        cs = (CheckService) osgiHelper.getRawServiceObject(cs_ref);
         props = cs.getProps();
         //Check properties
         assertFalse("check CheckService invocation - 4", ((Boolean) props.get("result")).booleanValue()); // False, no more provider.
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/DefaultImplementationTest.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/DefaultImplementationTest.java
index 20ed842..c63a44f 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/DefaultImplementationTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/DefaultImplementationTest.java
@@ -41,14 +41,14 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the provider.
         provider.stop();
         ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability - 2", ref_cs);
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         boolean res = false;
         try {
             res = cs.check();
@@ -76,7 +76,7 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the provider.
@@ -86,7 +86,7 @@
         long begin = System.currentTimeMillis();
         DelayedProvider dp = new DelayedProvider(provider, 200);
         dp.start();
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 2", cs.check());
         long end = System.currentTimeMillis();
 
@@ -94,7 +94,7 @@
 
         ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability - 3", ref_cs);
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 3", cs.check());
 
         provider.stop();
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/DelayTest.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/DelayTest.java
index c0f65d3..32d0e27 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/DelayTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/DelayTest.java
@@ -44,7 +44,7 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the provider.
@@ -54,7 +54,7 @@
         long begin = System.currentTimeMillis();
         DelayedProvider dp = new DelayedProvider(provider, 200);
         dp.start();
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 2", cs.check());
         long end = System.currentTimeMillis();
 
@@ -62,7 +62,7 @@
 
         ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability - 3", ref_cs);
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 3", cs.check());
 
         provider.stop();
@@ -86,7 +86,7 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the provider.
@@ -95,7 +95,7 @@
         assertNotNull("Check cs availability - 2", ref_cs);
         DelayedProvider dp = new DelayedProvider(provider, 400);
         dp.start();
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         try {
             cs.check();
         } catch (RuntimeException e) {
@@ -127,7 +127,7 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the providers.
@@ -140,7 +140,7 @@
         DelayedProvider dp2 = new DelayedProvider(provider2, 100);
         dp.start();
         dp2.start();
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 2", cs.check());
         long end = System.currentTimeMillis();
         System.out.println("delay = " + (end - begin));
@@ -151,7 +151,7 @@
 
         ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability - 3", ref_cs);
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 3", cs.check());
 
         provider1.stop();
@@ -177,7 +177,7 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the providers.
@@ -190,7 +190,7 @@
         DelayedProvider dp2 = new DelayedProvider(provider2, 100);
         dp.start();
         dp2.start();
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 2", cs.check());
         long end = System.currentTimeMillis();
         System.out.println("delay = " + (end - begin));
@@ -201,7 +201,7 @@
 
         ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability - 3", ref_cs);
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 3", cs.check());
 
         provider1.stop();
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/EmptyTest.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/EmptyTest.java
index 4f06f1a..d9f8e5b 100755
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/EmptyTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/EmptyTest.java
@@ -45,7 +45,7 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the provider.
@@ -54,7 +54,7 @@
         assertNotNull("Check cs availability - 2", ref_cs);
         DelayedProvider dp = new DelayedProvider(provider, 400);
         dp.start();
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         boolean res = false;
         try {
             res = cs.check();
@@ -84,7 +84,7 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the provider.
@@ -93,7 +93,7 @@
         assertNotNull("Check cs availability - 2", ref_cs);
         DelayedProvider dp = new DelayedProvider(provider, 400);
         dp.start();
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         boolean res = false;
         try {
             res = cs.check();
@@ -124,7 +124,7 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the providers.
@@ -137,7 +137,7 @@
         DelayedProvider dp2 = new DelayedProvider(provider2, 100);
         dp.start();
         dp2.start();
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 2", cs.check());
         long end = System.currentTimeMillis();
         System.out.println("delay = " + (end - begin));
@@ -151,7 +151,7 @@
 
         ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability - 3", ref_cs);
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
 
         assertTrue("Check invocation - 3", cs.check());
 
@@ -176,7 +176,7 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the providers.
@@ -189,7 +189,7 @@
         DelayedProvider dp2 = new DelayedProvider(provider2, 100);
         dp.start();
         dp2.start();
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 2", cs.check());
         long end = System.currentTimeMillis();
         System.out.println("delay = " + (end - begin));
@@ -203,7 +203,7 @@
 
         ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability - 3", ref_cs);
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
 
         assertTrue("Check invocation - 3", cs.check());
 
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/NullTest.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/NullTest.java
index c7cdc7f..a4c97ee 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/NullTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/NullTest.java
@@ -42,7 +42,7 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the provider.
@@ -52,7 +52,7 @@
         long begin = System.currentTimeMillis();
         DelayedProvider dp = new DelayedProvider(provider, 200);
         dp.start();
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 2", cs.check());
         long end = System.currentTimeMillis();
 
@@ -60,7 +60,7 @@
 
         ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability - 3", ref_cs);
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 3", cs.check());
 
         provider.stop();
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/NullableTest.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/NullableTest.java
index c8d8ba9..a6194e2 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/NullableTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/NullableTest.java
@@ -45,14 +45,14 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the provider.
         provider.stop();
         ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability - 2", ref_cs);
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         boolean res = false;
         try {
             res = cs.check();
@@ -81,7 +81,7 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the provider.
@@ -91,7 +91,7 @@
         long begin = System.currentTimeMillis();
         DelayedProvider dp = new DelayedProvider(provider, 200);
         dp.start();
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 2", cs.check());
         long end = System.currentTimeMillis();
 
@@ -99,7 +99,7 @@
 
         ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability - 3", ref_cs);
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 3", cs.check());
 
         provider.stop();
diff --git a/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/TimeoutTest.java b/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/TimeoutTest.java
index 2332424..12069ab 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/TimeoutTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-dependency-timeout-test/src/test/java/org/apache/felix/ipojo/runtime/test/dependencies/timeout/TimeoutTest.java
@@ -42,7 +42,7 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the provider.
@@ -53,7 +53,7 @@
         long begin = System.currentTimeMillis();
         DelayedProvider dp = new DelayedProvider(provider, 200);
         dp.start();
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
 
         assertTrue("Check invocation - 2", cs.check());
         long end = System.currentTimeMillis();
@@ -62,7 +62,7 @@
 
         ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability - 3", ref_cs);
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation - 3", cs.check());
 
         provider.stop();
@@ -85,7 +85,7 @@
         ServiceReference ref_cs = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), un);
         assertNotNull("Check cs availability", ref_cs);
 
-        CheckService cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        CheckService cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         assertTrue("Check invocation", cs.check());
 
         // Stop the provider.
@@ -94,7 +94,7 @@
         assertNotNull("Check cs availability - 2", ref_cs);
         DelayedProvider dp = new DelayedProvider(provider, 400);
         dp.start();
-        cs = (CheckService) osgiHelper.getServiceObject(ref_cs);
+        cs = (CheckService) osgiHelper.getRawServiceObject(ref_cs);
         try {
             cs.check();
         } catch (RuntimeException e) {
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestClass.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestClass.java
index e6e3f08..bf59cfb 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestClass.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestClass.java
@@ -46,7 +46,7 @@
         ServiceReference ref1 = ipojoHelper.getServiceReferenceByName("org.apache.felix.ipojo.runtime.core.components.inherited.ProcessParentImplementation", "ci");
         assertNotNull("Check itself", ref1);
 
-        ProcessParentImplementation itself = (ProcessParentImplementation) osgiHelper.getServiceObject(ref1);
+        ProcessParentImplementation itself = (ProcessParentImplementation) osgiHelper.getRawServiceObject(ref1);
 
         itself.processChild();
     }
@@ -58,7 +58,7 @@
         ServiceReference ref1 = ipojoHelper.getServiceReferenceByName("org.apache.felix.ipojo.runtime.core.components.inherited.ProcessParentImplementation", "ci");
         assertNotNull("Check parent", ref1);
 
-        ProcessParentImplementation itself = (ProcessParentImplementation) osgiHelper.getServiceObject(ref1);
+        ProcessParentImplementation itself = (ProcessParentImplementation) osgiHelper.getRawServiceObject(ref1);
 
         itself.processChild();
 
@@ -71,7 +71,7 @@
         ServiceReference ref1 = ipojoHelper.getServiceReferenceByName("org.apache.felix.ipojo.runtime.core.components.inherited.ProcessParentImplementation", "ci");
         assertNotNull("Check parent-parent", ref1);
 
-        ProcessParentImplementation itself = (ProcessParentImplementation) osgiHelper.getServiceObject(ref1);
+        ProcessParentImplementation itself = (ProcessParentImplementation) osgiHelper.getRawServiceObject(ref1);
 
         itself.processChild();
     }
@@ -83,7 +83,7 @@
         ServiceReference ref1 = ipojoHelper.getServiceReferenceByName("org.apache.felix.ipojo.runtime.core.components.inherited.ProcessParentImplementation", "ci");
         assertNotNull("Check parent-parent", ref1);
 
-        ProcessParentImplementation itself = (ProcessParentImplementation) osgiHelper.getServiceObject(ref1);
+        ProcessParentImplementation itself = (ProcessParentImplementation) osgiHelper.getRawServiceObject(ref1);
 
         itself.processChild();
 
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDynamicProps.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDynamicProps.java
index 10c2ba8..b51d6c9 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDynamicProps.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDynamicProps.java
@@ -91,7 +91,7 @@
         }
 
         // Invoke
-        FooService fs = (FooService) osgiHelper.getServiceObject(sr);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
         assertTrue("invoke fs", fs.foo());
 
         // Re-check the property (change)
@@ -153,7 +153,7 @@
         }
 
         // Invoke
-        FooService fs = (FooService) osgiHelper.getServiceObject(sr);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
         assertTrue("invoke fs", fs.foo());
 
         // Re-check the property (change)
@@ -215,7 +215,7 @@
         }
 
         // Invoke
-        FooService fs = (FooService) osgiHelper.getServiceObject(sr);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
         assertTrue("invoke fs", fs.foo());
 
         // Re-check the property (change)
@@ -266,7 +266,7 @@
         }
 
         // Invoke
-        FooService fs = (FooService) osgiHelper.getServiceObject(sr);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
         assertTrue("invoke fs", fs.foo());
 
         // Re-check the property (change)
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDynamicPropsReconfiguration.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDynamicPropsReconfiguration.java
index 8324480..f37abd8 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDynamicPropsReconfiguration.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestDynamicPropsReconfiguration.java
@@ -90,7 +90,7 @@
 
         // Reconfiguration
         ServiceReference fact_ref = ipojoHelper.getServiceReferenceByName(Factory.class.getName(), "PS-FooProviderType-Dyn2");
-        Factory fact = (Factory) osgiHelper.getServiceObject(fact_ref);
+        Factory fact = (Factory) osgiHelper.getRawServiceObject(fact_ref);
         Properties p3 = new Properties();
         p3.put("instance.name", "FooProvider-3");
         p3.put("int", 1);
@@ -133,7 +133,7 @@
         }
 
         // Invoke
-        FooService fs = (FooService) osgiHelper.getServiceObject(sr);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
         assertTrue("invoke fs", fs.foo());
 
         // Re-check the property (change)
@@ -157,7 +157,7 @@
 
         //	Reconfiguration
         fact_ref = ipojoHelper.getServiceReferenceByName(Factory.class.getName(), "PS-FooProviderType-Dyn2");
-        fact = (Factory) osgiHelper.getServiceObject(fact_ref);
+        fact = (Factory) osgiHelper.getRawServiceObject(fact_ref);
         p3 = new Properties();
         p3.put("instance.name", "FooProvider-3");
         p3.put("int", 1);
@@ -232,7 +232,7 @@
 
         // Reconfiguration
         ServiceReference fact_ref = ipojoHelper.getServiceReferenceByName(Factory.class.getName(), "PS-FooProviderType-Dyn2");
-        Factory fact = (Factory) osgiHelper.getServiceObject(fact_ref);
+        Factory fact = (Factory) osgiHelper.getRawServiceObject(fact_ref);
         Properties p3 = new Properties();
         p3.put("instance.name", "FooProvider-3");
         p3.put("int", "1");
@@ -275,7 +275,7 @@
         }
 
         // Invoke
-        FooService fs = (FooService) osgiHelper.getServiceObject(sr);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
         assertTrue("invoke fs", fs.foo());
 
         // Re-check the property (change)
@@ -299,7 +299,7 @@
 
         //	Reconfiguration
         fact_ref = ipojoHelper.getServiceReferenceByName(Factory.class.getName(), "PS-FooProviderType-Dyn2");
-        fact = (Factory) osgiHelper.getServiceObject(fact_ref);
+        fact = (Factory) osgiHelper.getRawServiceObject(fact_ref);
         p3 = new Properties();
         p3.put("instance.name", "FooProvider-3");
         p3.put("int", "1");
@@ -415,7 +415,7 @@
         }
 
         // Invoke
-        FooService fs = (FooService) osgiHelper.getServiceObject(sr);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
         assertTrue("invoke fs", fs.foo());
 
         // Re-check the property (change)
@@ -552,7 +552,7 @@
         }
 
         // Invoke
-        FooService fs = (FooService) osgiHelper.getServiceObject(sr);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
         assertTrue("invoke fs", fs.foo());
 
         // Re-check the property (change)
@@ -642,7 +642,7 @@
 
         // Reconfiguration
         ServiceReference fact_ref = ipojoHelper.getServiceReferenceByName(Factory.class.getName(), "PS-FooProviderType-Dyn2");
-        Factory fact = (Factory) osgiHelper.getServiceObject(fact_ref);
+        Factory fact = (Factory) osgiHelper.getRawServiceObject(fact_ref);
         Properties p3 = new Properties();
         p3.put("instance.name", "FooProvider-4");
         p3.put("int", new Integer(1));
@@ -685,7 +685,7 @@
         }
 
         // Invoke
-        FooService fs = (FooService) osgiHelper.getServiceObject(sr);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
         assertTrue("invoke fs", fs.foo());
 
         // Re-check the property (change)
@@ -709,7 +709,7 @@
 
         //	Reconfiguration
         fact_ref = ipojoHelper.getServiceReferenceByName(Factory.class.getName(), "PS-FooProviderType-Dyn2");
-        fact = (Factory) osgiHelper.getServiceObject(fact_ref);
+        fact = (Factory) osgiHelper.getRawServiceObject(fact_ref);
         p3 = new Properties();
         p3.put("instance.name", "FooProvider-3");
         p3.put("int", new Integer(1));
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestExposition.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestExposition.java
index 13629a8..27c36ae 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestExposition.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestExposition.java
@@ -60,26 +60,23 @@
     public void testSimpleExposition() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooProviderSimple.getInstanceName());
         assertNotNull("Check the availability of the FS from " + fooProviderSimple.getInstanceName(), ref);
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check fs invocation", fs.foo());
-        fs = null;
         fooProviderSimple.stop();
-        ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooProviderSimple.getInstanceName());
-        assertNull("Check the absence of the FS from " + fooProviderSimple.getInstanceName(), ref);
-
+        assertFalse("Check the absence of the FS from " + fooProviderSimple.getInstanceName(),
+                ipojoHelper.isServiceAvailableByName(FooService.class.getName(), fooProviderSimple.getInstanceName()));
     }
 
     @Test
     public void testItfExposition() {
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooProviderItf.getInstanceName());
         assertNotNull("Check the availability of the FS from " + fooProviderItf.getInstanceName(), ref);
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
         assertTrue("Check fs invocation", fs.foo());
-        fs = null;
         fooProviderItf.stop();
 
-        ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooProviderItf.getInstanceName());
-        assertNull("Check the absence of the FS from " + fooProviderItf.getInstanceName(), ref);
+        assertFalse("Check the absence of the FS from " + fooProviderSimple.getInstanceName(),
+                ipojoHelper.isServiceAvailableByName(FooService.class.getName(), fooProviderItf.getInstanceName()));
     }
 
     @Test
@@ -91,20 +88,18 @@
 
         assertSame("Check service reference equality", refFoo, refBar);
 
-        FooService fs = (FooService) osgiHelper.getServiceObject(refFoo);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(refFoo);
         assertTrue("Check fs invocation", fs.foo());
-        fs = null;
 
-        BarService bs = (BarService) osgiHelper.getServiceObject(refBar);
+        BarService bs = (BarService) osgiHelper.getRawServiceObject(refBar);
         assertTrue("Check bs invocation", bs.bar());
-        bs = null;
 
         fooBarProvider.stop();
 
-        refFoo = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooBarProvider.getInstanceName());
-        refBar = ipojoHelper.getServiceReferenceByName(BarService.class.getName(), fooBarProvider.getInstanceName());
-        assertNull("Check the absence of the FS from " + fooBarProvider.getInstanceName(), refFoo);
-        assertNull("Check the absence of the BS from " + fooBarProvider.getInstanceName(), refBar);
+        assertFalse("Check the absence of the FS from " + fooBarProvider.getInstanceName(),
+                ipojoHelper.isServiceAvailableByName(FooService.class.getName(), fooBarProvider.getInstanceName()));
+        assertFalse("Check the absence of the BS from " + fooBarProvider.getInstanceName(),
+                ipojoHelper.isServiceAvailableByName(BarService.class.getName(), fooBarProvider.getInstanceName()));
     }
 
     @Test
@@ -116,20 +111,18 @@
 
         assertSame("Check service reference equality", refFoo, refBar);
 
-        FooService fs = (FooService) osgiHelper.getServiceObject(refFoo);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(refFoo);
         assertTrue("Check fs invocation", fs.foo());
-        fs = null;
 
-        BarService bs = (BarService) osgiHelper.getServiceObject(refBar);
+        BarService bs = (BarService) osgiHelper.getRawServiceObject(refBar);
         assertTrue("Check bs invocation", bs.bar());
-        bs = null;
 
         fooBarProvider2.stop();
 
-        refFoo = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooBarProvider2.getInstanceName());
-        refBar = ipojoHelper.getServiceReferenceByName(BarService.class.getName(), fooBarProvider2.getInstanceName());
-        assertNull("Check the absence of the FS from " + fooBarProvider.getInstanceName(), refFoo);
-        assertNull("Check the absence of the BS from " + fooBarProvider.getInstanceName(), refBar);
+        assertFalse("Check the absence of the FS from " + fooBarProvider2.getInstanceName(),
+                ipojoHelper.isServiceAvailableByName(FooService.class.getName(), fooBarProvider2.getInstanceName()));
+        assertFalse("Check the absence of the BS from " + fooBarProvider2.getInstanceName(),
+                ipojoHelper.isServiceAvailableByName(BarService.class.getName(), fooBarProvider2.getInstanceName()));
     }
 
     @Test
@@ -141,13 +134,11 @@
 
         assertNotSame("Check service reference inequality", refFoo, refBar);
 
-        FooService fs = (FooService) osgiHelper.getServiceObject(refFoo);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(refFoo);
         assertTrue("Check fs invocation", fs.foo());
-        fs = null;
 
-        BarService bs = (BarService) osgiHelper.getServiceObject(refBar);
+        BarService bs = (BarService) osgiHelper.getRawServiceObject(refBar);
         assertTrue("Check bs invocation", bs.bar());
-        bs = null;
 
         // Check properties
         String baz1 = (String) refFoo.getProperty("baz");
@@ -158,10 +149,10 @@
 
         fooBarProvider3.stop();
 
-        refFoo = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooBarProvider3.getInstanceName());
-        refBar = ipojoHelper.getServiceReferenceByName(BarService.class.getName(), fooBarProvider3.getInstanceName());
-        assertNull("Check the absence of the FS from " + fooBarProvider.getInstanceName(), refFoo);
-        assertNull("Check the absence of the BS from " + fooBarProvider.getInstanceName(), refBar);
+        assertFalse("Check the absence of the FS from " + fooBarProvider3.getInstanceName(),
+                ipojoHelper.isServiceAvailableByName(FooService.class.getName(), fooBarProvider3.getInstanceName()));
+        assertFalse("Check the absence of the BS from " + fooBarProvider3.getInstanceName(),
+                ipojoHelper.isServiceAvailableByName(BarService.class.getName(), fooBarProvider3.getInstanceName()));
     }
 
 
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestNullCheck.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestNullCheck.java
index 630fa73..ac6c2d3 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestNullCheck.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestNullCheck.java
@@ -57,7 +57,7 @@
         assertNotNull(ref.getProperty("prop2"));
 
         // Test foo invocation
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
         assertTrue("FooService invocation failed", fs.foo());
 
         ref = osgiHelper.getServiceReference(FooService.class.getName(), "(" + "instance.name" + "=" + compName + ")");
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestOSGiProperties.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestOSGiProperties.java
index 2f93a51..17e819f 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestOSGiProperties.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestOSGiProperties.java
@@ -68,7 +68,7 @@
 
 
         // Test foo invocation
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
         assertTrue("FooService invocation failed", fs.foo());
 
         ipojoHelper.dispose();
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPropertiesInAnonymousClass.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPropertiesInAnonymousClass.java
index 918d33e..98f9a64 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPropertiesInAnonymousClass.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestPropertiesInAnonymousClass.java
@@ -68,7 +68,7 @@
         }
 
         // Invoke
-        FooService fs = (FooService) osgiHelper.getServiceObject(sr);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
         assertTrue("invoke fs", fs.foo());
 
         sr = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), "FooProviderAno-1");
@@ -131,7 +131,7 @@
         }
 
         // Invoke
-        FooService fs = (FooService) osgiHelper.getServiceObject(sr);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
         assertTrue("invoke fs", fs.getBoolean());
 
         sr = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), "FooProviderAno-1");
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestProvidedServiceArchitecture.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestProvidedServiceArchitecture.java
index ee9aaf6..34ee6ae 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestProvidedServiceArchitecture.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestProvidedServiceArchitecture.java
@@ -50,7 +50,7 @@
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), compName);
         assertNotNull("Architecture not available", arch_ref);
 
-        Architecture arch = (Architecture) osgiHelper.getServiceObject(arch_ref);
+        Architecture arch = (Architecture) osgiHelper.getRawServiceObject(arch_ref);
         InstanceDescription id = arch.getInstanceDescription();
 
         assertEquals("Check component instance name (" + id.getName() + ")", id.getName(), compName);
@@ -102,7 +102,7 @@
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), compName);
         assertNotNull("Architecture not available", arch_ref);
 
-        Architecture arch = (Architecture) osgiHelper.getServiceObject(arch_ref);
+        Architecture arch = (Architecture) osgiHelper.getRawServiceObject(arch_ref);
         InstanceDescription id = arch.getInstanceDescription();
 
         assertEquals("Check component instance name (" + id.getName() + ")", id.getName(), compName);
@@ -149,7 +149,7 @@
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), compName);
         assertNotNull("Architecture not available", arch_ref);
 
-        Architecture arch = (Architecture) osgiHelper.getServiceObject(arch_ref);
+        Architecture arch = (Architecture) osgiHelper.getRawServiceObject(arch_ref);
         InstanceDescription id = arch.getInstanceDescription();
 
         assertEquals("Check component instance name (" + id.getName() + ")", id.getName(), compName);
@@ -193,7 +193,7 @@
         ServiceReference arch_ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), compName);
         assertNotNull("Architecture not available", arch_ref);
 
-        Architecture arch = (Architecture) osgiHelper.getServiceObject(arch_ref);
+        Architecture arch = (Architecture) osgiHelper.getRawServiceObject(arch_ref);
         InstanceDescription id = arch.getInstanceDescription();
 
         assertEquals("Check component instance name (" + id.getName() + ")", id.getName(), compName);
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestSimplePS.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestSimplePS.java
index 1ca77bd..485bacb 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestSimplePS.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestSimplePS.java
@@ -54,7 +54,7 @@
         assertNotNull("FS not available", ref);
 
         // Test foo invocation
-        FooService fs = (FooService) osgiHelper.getServiceObject(ref);
+        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
         assertTrue("FooService invocation failed", fs.foo());
 
         ipojoHelper.dispose();
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestStaticPropsReconfiguration.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestStaticPropsReconfiguration.java
index daf9010..bfe2f37 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestStaticPropsReconfiguration.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestStaticPropsReconfiguration.java
@@ -91,7 +91,7 @@
         reconf.put("string", new String("toto"));
         reconf.put("strAProp", new String[]{"foo", "baz"});
         reconf.put("intAProp", new int[]{3, 2, 1});
-        Factory fact = (Factory) osgiHelper.getServiceObject(fact_ref);
+        Factory fact = (Factory) osgiHelper.getRawServiceObject(fact_ref);
         try {
             fact.reconfigure(reconf);
         } catch (Exception e) {
@@ -168,7 +168,7 @@
         reconf.put("string", "toto");
         reconf.put("strAProp", new String[]{"foo", "baz"});
         reconf.put("intAProp", new int[]{3, 2, 1});
-        Factory fact = (Factory) osgiHelper.getServiceObject(fact_ref);
+        Factory fact = (Factory) osgiHelper.getRawServiceObject(fact_ref);
         try {
             fact.reconfigure(reconf);
         } catch (Exception e) {
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/inheritence/InheritanceTest.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/inheritence/InheritanceTest.java
index d2524a9..abf99be 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/inheritence/InheritanceTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/inheritence/InheritanceTest.java
@@ -141,7 +141,7 @@
         ServiceReference ref = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "d");
         Assert.assertNotNull(ref);
 
-        Architecture arch = (Architecture) osgiHelper.getServiceObject(ref);
+        Architecture arch = (Architecture) osgiHelper.getRawServiceObject(ref);
 
         System.out.println(arch.getInstanceDescription().getDescription());
 
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/strategies/CustomStrategy2Test.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/strategies/CustomStrategy2Test.java
index a18b748..15f1516 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/strategies/CustomStrategy2Test.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/strategies/CustomStrategy2Test.java
@@ -87,7 +87,7 @@
         ServiceReference refcons1 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons1.getInstanceName());
         assertNotNull("Cons1 Service available", refcons1);
 
-        CheckService cs_cons1 = (CheckService) osgiHelper.getServiceObject(refcons1);
+        CheckService cs_cons1 = (CheckService) osgiHelper.getRawServiceObject(refcons1);
         Properties props = cs_cons1.getProps();
         Long id = (Long) props.get("id");
         FooService fscons1 = (FooService) props.get("object");
@@ -100,7 +100,7 @@
         ServiceReference refcons2 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons2.getInstanceName());
         assertNotNull("Cons2 Service available", refcons2);
 
-        CheckService cs_cons2 = (CheckService) osgiHelper.getServiceObject(refcons2);
+        CheckService cs_cons2 = (CheckService) osgiHelper.getRawServiceObject(refcons2);
         Properties props2 = cs_cons2.getProps();
         Long id2 = (Long) props2.get("id");
         FooService fscons2 = (FooService) props2.get("object");
@@ -127,13 +127,13 @@
         // The two consumers are started and use their own objects.
         ServiceReference refcons1 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons1.getInstanceName());
         assertNotNull("Cons1 Service available", refcons1);
-        CheckService cs_cons1 = (CheckService) osgiHelper.getServiceObject(refcons1);
+        CheckService cs_cons1 = (CheckService) osgiHelper.getRawServiceObject(refcons1);
         Properties props = cs_cons1.getProps();
         FooService fscons1 = (FooService) props.get("object");
 
         ServiceReference refcons2 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons2.getInstanceName());
         assertNotNull("Cons2 Service available", refcons2);
-        CheckService cs_cons2 = (CheckService) osgiHelper.getServiceObject(refcons2);
+        CheckService cs_cons2 = (CheckService) osgiHelper.getRawServiceObject(refcons2);
         Properties props2 = cs_cons2.getProps();
         FooService fscons2 = (FooService) props2.get("object");
 
@@ -159,13 +159,13 @@
         // Check objects
         refcons1 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons1.getInstanceName());
         assertNotNull("Cons1 Service available", refcons1);
-        cs_cons1 = (CheckService) osgiHelper.getServiceObject(refcons1);
+        cs_cons1 = (CheckService) osgiHelper.getRawServiceObject(refcons1);
         props = cs_cons1.getProps();
         Object fscons3 = (FooService) props.get("object");
 
         refcons2 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons2.getInstanceName());
         assertNotNull("Cons2 Service available", refcons2);
-        cs_cons2 = (CheckService) osgiHelper.getServiceObject(refcons2);
+        cs_cons2 = (CheckService) osgiHelper.getRawServiceObject(refcons2);
         props2 = cs_cons2.getProps();
         Object fscons4 = (FooService) props2.get("object");
 
@@ -193,7 +193,7 @@
         ServiceReference refcons1 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons1.getInstanceName());
         assertNotNull("Cons1 Service available", refcons1);
 
-        CheckService cs_cons1 = (CheckService) osgiHelper.getServiceObject(refcons1);
+        CheckService cs_cons1 = (CheckService) osgiHelper.getRawServiceObject(refcons1);
         Properties props = cs_cons1.getProps();
         Long id = (Long) props.get("id");
         FooService fscons1 = (FooService) props.get("object");
@@ -206,7 +206,7 @@
         ServiceReference refcons2 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons3.getInstanceName());
         assertNotNull("Cons2 Service available", refcons2);
 
-        CheckService cs_cons2 = (CheckService) osgiHelper.getServiceObject(refcons2);
+        CheckService cs_cons2 = (CheckService) osgiHelper.getRawServiceObject(refcons2);
         Properties props2 = cs_cons2.getProps();
         Long id2 = (Long) props2.get("id");
         FooService fscons2 = (FooService) props2.get("object");
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/strategies/CustomStrategyTest.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/strategies/CustomStrategyTest.java
index ea82fef..72f2652 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/strategies/CustomStrategyTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/strategies/CustomStrategyTest.java
@@ -87,7 +87,7 @@
         ServiceReference refcons1 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons1.getInstanceName());
         assertNotNull("Cons1 Service available", refcons1);
 
-        CheckService cs_cons1 = (CheckService) osgiHelper.getServiceObject(refcons1);
+        CheckService cs_cons1 = (CheckService) osgiHelper.getRawServiceObject(refcons1);
         Properties props = cs_cons1.getProps();
         Long id = (Long) props.get("id");
         FooService fscons1 = (FooService) props.get("object");
@@ -100,7 +100,7 @@
         ServiceReference refcons2 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons2.getInstanceName());
         assertNotNull("Cons2 Service available", refcons2);
 
-        CheckService cs_cons2 = (CheckService) osgiHelper.getServiceObject(refcons2);
+        CheckService cs_cons2 = (CheckService) osgiHelper.getRawServiceObject(refcons2);
         Properties props2 = cs_cons2.getProps();
         Long id2 = (Long) props2.get("id");
         FooService fscons2 = (FooService) props2.get("object");
@@ -127,13 +127,13 @@
         // The two consumers are started and use their own objects.
         ServiceReference refcons1 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons1.getInstanceName());
         assertNotNull("Cons1 Service available", refcons1);
-        CheckService cs_cons1 = (CheckService) osgiHelper.getServiceObject(refcons1);
+        CheckService cs_cons1 = (CheckService) osgiHelper.getRawServiceObject(refcons1);
         Properties props = cs_cons1.getProps();
         FooService fscons1 = (FooService) props.get("object");
 
         ServiceReference refcons2 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons2.getInstanceName());
         assertNotNull("Cons2 Service available", refcons2);
-        CheckService cs_cons2 = (CheckService) osgiHelper.getServiceObject(refcons2);
+        CheckService cs_cons2 = (CheckService) osgiHelper.getRawServiceObject(refcons2);
         Properties props2 = cs_cons2.getProps();
         FooService fscons2 = (FooService) props2.get("object");
 
@@ -159,13 +159,13 @@
         // Check objects
         refcons1 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons1.getInstanceName());
         assertNotNull("Cons1 Service available", refcons1);
-        cs_cons1 = (CheckService) osgiHelper.getServiceObject(refcons1);
+        cs_cons1 = (CheckService) osgiHelper.getRawServiceObject(refcons1);
         props = cs_cons1.getProps();
         Object fscons3 = (FooService) props.get("object");
 
         refcons2 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons2.getInstanceName());
         assertNotNull("Cons2 Service available", refcons2);
-        cs_cons2 = (CheckService) osgiHelper.getServiceObject(refcons2);
+        cs_cons2 = (CheckService) osgiHelper.getRawServiceObject(refcons2);
         props2 = cs_cons2.getProps();
         Object fscons4 = (FooService) props2.get("object");
 
@@ -194,7 +194,7 @@
         ServiceReference refcons1 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons1.getInstanceName());
         assertNotNull("Cons1 Service available", refcons1);
 
-        CheckService cs_cons1 = (CheckService) osgiHelper.getServiceObject(refcons1);
+        CheckService cs_cons1 = (CheckService) osgiHelper.getRawServiceObject(refcons1);
         Properties props = cs_cons1.getProps();
         Long id = (Long) props.get("id");
         FooService fscons1 = (FooService) props.get("object");
@@ -207,7 +207,7 @@
         ServiceReference refcons2 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons3.getInstanceName());
         assertNotNull("Cons2 Service available", refcons2);
 
-        CheckService cs_cons2 = (CheckService) osgiHelper.getServiceObject(refcons2);
+        CheckService cs_cons2 = (CheckService) osgiHelper.getRawServiceObject(refcons2);
         Properties props2 = cs_cons2.getProps();
         Long id2 = (Long) props2.get("id");
         FooService fscons2 = (FooService) props2.get("object");
diff --git a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/strategies/PerInstanceStrategyTest.java b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/strategies/PerInstanceStrategyTest.java
index 71fef2f..91bb2f3 100644
--- a/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/strategies/PerInstanceStrategyTest.java
+++ b/ipojo/runtime/core-it/ipojo-core-service-providing-test/src/test/java/org/apache/felix/ipojo/runtime/core/strategies/PerInstanceStrategyTest.java
@@ -86,7 +86,7 @@
         ServiceReference refcons1 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons1.getInstanceName());
         assertNotNull("Cons1 Service available", refcons1);
 
-        CheckService cs_cons1 = (CheckService) osgiHelper.getServiceObject(refcons1);
+        CheckService cs_cons1 = (CheckService) osgiHelper.getRawServiceObject(refcons1);
         Properties props = cs_cons1.getProps();
         Long id = (Long) props.get("id");
         FooService fscons1 = (FooService) props.get("object");
@@ -99,7 +99,7 @@
         ServiceReference refcons2 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons2.getInstanceName());
         assertNotNull("Cons2 Service available", refcons2);
 
-        CheckService cs_cons2 = (CheckService) osgiHelper.getServiceObject(refcons2);
+        CheckService cs_cons2 = (CheckService) osgiHelper.getRawServiceObject(refcons2);
         Properties props2 = cs_cons2.getProps();
         Long id2 = (Long) props2.get("id");
         FooService fscons2 = (FooService) props2.get("object");
@@ -126,13 +126,13 @@
         // The two consumers are started and use their own objects.
         ServiceReference refcons1 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons1.getInstanceName());
         assertNotNull("Cons1 Service available", refcons1);
-        CheckService cs_cons1 = (CheckService) osgiHelper.getServiceObject(refcons1);
+        CheckService cs_cons1 = (CheckService) osgiHelper.getRawServiceObject(refcons1);
         Properties props = cs_cons1.getProps();
         FooService fscons1 = (FooService) props.get("object");
 
         ServiceReference refcons2 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons2.getInstanceName());
         assertNotNull("Cons2 Service available", refcons2);
-        CheckService cs_cons2 = (CheckService) osgiHelper.getServiceObject(refcons2);
+        CheckService cs_cons2 = (CheckService) osgiHelper.getRawServiceObject(refcons2);
         Properties props2 = cs_cons2.getProps();
         FooService fscons2 = (FooService) props2.get("object");
 
@@ -158,13 +158,13 @@
         // Check objects
         refcons1 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons1.getInstanceName());
         assertNotNull("Cons1 Service available", refcons1);
-        cs_cons1 = (CheckService) osgiHelper.getServiceObject(refcons1);
+        cs_cons1 = (CheckService) osgiHelper.getRawServiceObject(refcons1);
         props = cs_cons1.getProps();
         Object fscons3 = (FooService) props.get("object");
 
         refcons2 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons2.getInstanceName());
         assertNotNull("Cons2 Service available", refcons2);
-        cs_cons2 = (CheckService) osgiHelper.getServiceObject(refcons2);
+        cs_cons2 = (CheckService) osgiHelper.getRawServiceObject(refcons2);
         props2 = cs_cons2.getProps();
         Object fscons4 = (FooService) props2.get("object");
 
@@ -192,7 +192,7 @@
         ServiceReference refcons1 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons1.getInstanceName());
         assertNotNull("Cons1 Service available", refcons1);
 
-        CheckService cs_cons1 = (CheckService) osgiHelper.getServiceObject(refcons1);
+        CheckService cs_cons1 = (CheckService) osgiHelper.getRawServiceObject(refcons1);
         Properties props = cs_cons1.getProps();
         Long id = (Long) props.get("id");
         FooService fscons1 = (FooService) props.get("object");
@@ -205,7 +205,7 @@
         ServiceReference refcons2 = ipojoHelper.getServiceReferenceByName(CheckService.class.getName(), cons3.getInstanceName());
         assertNotNull("Cons2 Service available", refcons2);
 
-        CheckService cs_cons2 = (CheckService) osgiHelper.getServiceObject(refcons2);
+        CheckService cs_cons2 = (CheckService) osgiHelper.getRawServiceObject(refcons2);
         Properties props2 = cs_cons2.getProps();
         Long id2 = (Long) props2.get("id");
         FooService fscons2 = (FooService) props2.get("object");
diff --git a/ipojo/runtime/core-it/pom.xml b/ipojo/runtime/core-it/pom.xml
index 7895072..32340e2 100644
--- a/ipojo/runtime/core-it/pom.xml
+++ b/ipojo/runtime/core-it/pom.xml
@@ -39,8 +39,8 @@
         <url.version>1.5.1</url.version>
 
         <felix.version>4.2.0</felix.version>
-        <equinox.version>3.9.0.v20130529-1710</equinox.version>
-        <knoperflerfish.version>6.0.2</knoperflerfish.version>
+        <equinox.version>3.9.1.v20130814-1242</equinox.version>
+        <knoperflerfish.version>7.0.1</knoperflerfish.version>
 
         <manipulator.version>1.11.1</manipulator.version>
     </properties>
@@ -260,7 +260,7 @@
         <dependency>
             <groupId>org.ow2.chameleon.testing</groupId>
             <artifactId>osgi-helpers</artifactId>
-            <version>0.6.1</version>
+            <version>0.6.2</version>
             <exclusions>
                 <exclusion>
                     <groupId>org.osgi</groupId>
