private void uploadResourcesToConfigRegistry() throws Exception { ResourceAdminServiceClient resourceAdminServiceStub = new ResourceAdminServiceClient( context.getContextUrls().getBackEndUrl(), getSessionCookie()); resourceAdminServiceStub.deleteResource("/_system/config/sequence"); resourceAdminServiceStub.addCollection( "/_system/config/", "sequence", "", "Contains test sequence files"); resourceAdminServiceStub.addResource( "/_system/config/sequence/out_sequence.xml", "application/vnd.wso2.sequence", "application/vnd.wso2.sequence files", new DataHandler( new URL( "file:///" + getESBResourceLocation() + "/proxyconfig/proxy/utils/out_sequence.xml"))); Thread.sleep(2000); resourceAdminServiceStub.addResource( "/_system/config/sequence/fault_sequence.xml", "application/vnd.wso2.sequence", "application/vnd.wso2.sequence files", new DataHandler( new URL( "file:///" + getESBResourceLocation() + "/proxyconfig/proxy/utils/fault_sequence.xml"))); Thread.sleep(1000); }
@BeforeClass(alwaysRun = true) public void setEnvironment() throws Exception { super.init(); ResourceAdminServiceClient resourceAdmin = new ResourceAdminServiceClient(contextUrls.getBackEndUrl(), sessionCookie); resourceAdmin.addCollection( "/_system/config/", "securityTransform", "collection", "policy files"); resourceAdmin.addResource( "/_system/config/securityTransform/scenario2-policy.xml", "application/xml", "dss", new DataHandler(new URL("file:///" + policyPath + "scenario2-policy.xml"))); updateESBConfiguration( SecureEndpointSetter.setEndpoint( "/artifacts/ESB/proxyconfig/proxy/secureProxy/security_transformation_proxy_for_policy2_backEnd.xml")); }