Updating IS-Registry test-suite

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/information-system/gCubeIS/Registry@23452 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Manuele Simi 2010-06-29 19:10:55 +00:00
parent 1b946cfb8d
commit a4629d4064
1 changed files with 5 additions and 5 deletions

View File

@ -6,8 +6,7 @@ import java.io.StringWriter;
import org.apache.axis.message.addressing.Address;
import org.apache.axis.message.addressing.EndpointReferenceType;
import org.gcube.common.core.contexts.GCUBERemotePortTypeContext;
import org.gcube.common.core.contexts.GHNContext;
import org.gcube.common.core.resources.GCUBEService;
import org.gcube.common.core.resources.GCUBEResource;
import org.gcube.common.core.scope.GCUBEScope;
import org.gcube.common.core.security.GCUBESecurityManagerImpl;
import org.gcube.informationsystem.registry.stubs.RegistryFactoryPortType;
@ -22,7 +21,8 @@ public static void main (String[]args ) throws Exception {
GCUBESecurityManagerImpl managerSec = new GCUBESecurityManagerImpl() { public boolean isSecurityEnabled() {return true;}};
FileReader fis = new FileReader (args[1]);
GCUBEService resource =GHNContext.getImplementation(GCUBEService.class);
// load the resource
GCUBEResource resource = RegistryRegistrationTest.getResource(args[3], new FileReader(args[1]));
EndpointReferenceType factoryEPR = new EndpointReferenceType();
resource.load(fis);
@ -37,13 +37,13 @@ public static void main (String[]args ) throws Exception {
registryFactoryPortType =GCUBERemotePortTypeContext.getProxy(registryFactoryPortType,GCUBEScope.getScope(args[3]),managerSec);
registryFactoryPortType =GCUBERemotePortTypeContext.getProxy(registryFactoryPortType,GCUBEScope.getScope(args[2]),managerSec);
try {
StringWriter writer =new StringWriter();
resource.store(writer);
message.setXmlProfile(writer.toString());
message.setUniqueID(resource.getID());
message.setType(GCUBEService.TYPE);
message.setType(args[3]);
registryFactoryPortType.updateResource(message);
System.out.println("Profile has been updated");