public static String getRelativeUrl() {
BundleContext context = CarbonUIUtil.getBundleContext();
ServiceReference reference =
context.getServiceReference(RegistryService.class.getName());
RegistryService registryService = (RegistryService) context.getService(reference);
String url = null;
try {
Registry systemRegistry = registryService.getConfigSystemRegistry();
Resource resource = systemRegistry.get(RegistryResources.CONNECTION_PROPS);
String servicePath = resource.getProperty("service-path");
String contextRoot = resource.getProperty("context-root");
contextRoot = contextRoot.equals("/") ? "" : contextRoot;
url = contextRoot + servicePath + "/WSDL2CodeService";