From 1c4eafb06a5ee86a0590de1ea60416ef2a601a00 Mon Sep 17 00:00:00 2001 From: Lucio Lelii Date: Thu, 9 Oct 2008 14:24:14 +0000 Subject: [PATCH] git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/information-system/gCubeIS/Registry@4426 82a268e6-3cf1-43bd-a215-b396298e98cf --- etc/profile.xml | 7 ++++--- .../registry/impl/state/ProfileResource.java | 13 +++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/etc/profile.xml b/etc/profile.xml index 16e8dcd..b3e0d85 100644 --- a/etc/profile.xml +++ b/etc/profile.xml @@ -10,7 +10,7 @@
IS-Registry-service - 1.0.0 + 1.1.0 @@ -21,9 +21,10 @@ InformationSystem IS-Registry + 1.0.0 IS-Registry-stubs - 1.0.0 + 1.0.2 false @@ -42,7 +43,7 @@
IS-Registry-stubs - 1.0.0 + 1.0.2 diff --git a/src/org/gcube/informationsystem/registry/impl/state/ProfileResource.java b/src/org/gcube/informationsystem/registry/impl/state/ProfileResource.java index 655173d..1bef351 100644 --- a/src/org/gcube/informationsystem/registry/impl/state/ProfileResource.java +++ b/src/org/gcube/informationsystem/registry/impl/state/ProfileResource.java @@ -21,6 +21,7 @@ import org.gcube.common.core.resources.GCUBEService; import org.gcube.common.core.state.GCUBEWSResource; import org.gcube.common.core.utils.logging.GCUBELog; import org.gcube.informationsystem.registry.impl.RegistryFactory; +import org.gcube.informationsystem.registry.impl.contexts.ProfileContext; import org.gcube.informationsystem.registry.impl.contexts.ServiceContext; import org.globus.wsrf.ResourceException; import org.globus.wsrf.Topic; @@ -74,15 +75,15 @@ public class ProfileResource extends GCUBEWSResource { try { resource.store(writer); + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); - + StringReader reader = new StringReader(writer.toString().substring(writer.toString().indexOf("?>")+2, writer.toString().length())); - InputSource source = new InputSource(); - source.setEncoding("UTF-8"); - source.setCharacterStream(reader); - System.out.println("-----------"+source.getCharacterStream()); + + InputSource source = new InputSource(reader); + dom =builder.parse(source); } catch (Exception e1) { throw new ResourceException(e1); @@ -157,7 +158,7 @@ public class ProfileResource extends GCUBEWSResource { * @return the Resource QName */ private QName generateQName() { - return QName.valueOf(this.getID().toString()); + return new QName(ProfileContext.getContext().getNamespace(), NotificationProfileRP.toString()+this.getID().getValue()); } public GCUBEResource getGCubeResource() {