@Test public void testGetAbsoluteAddress() { HttpServiceManager manager = new HttpServiceManager(); manager.initFromConfig(null); String address1 = manager.getAbsoluteAddress(null, "/myservice"); assertEquals("http: String address2 = manager.getAbsoluteAddress("/mycontext", "/myservice"); assertEquals("http: }
public String getAbsoluteAddress(String contextRoot, String endpointAddress) { if (endpointAddress.startsWith("http")) { return endpointAddress; } String effContextRoot = contextRoot == null ? cxfServletAlias : contextRoot; return this.httpBase + effContextRoot + endpointAddress; }
HttpServiceManager { public String getAbsoluteAddress(String contextRoot, String endpointAddress) { if (endpointAddress.startsWith("http")) { return endpointAddress; } String effContextRoot = contextRoot == null ? cxfServletAlias : contextRoot; return this.httpBase + effContextRoot + endpointAddress; } }
HttpServiceManager { public String getAbsoluteAddress(String contextRoot, String endpointAddress) { if (endpointAddress.startsWith("http")) { return endpointAddress; } String effContextRoot = contextRoot == null ? cxfServletAlias : contextRoot; return this.httpBase + effContextRoot + endpointAddress; }  }
HttpServiceManager { public String getAbsoluteAddress(String contextRoot, String endpointAddress) { if (endpointAddress.startsWith("http")) { return endpointAddress; } String effContextRoot = contextRoot == null ? cxfServletAlias : contextRoot; return this.httpBase + effContextRoot + endpointAddress; }  @Activate void activate(ComponentContext compContext); void initFromConfig(Dictionary<String, Object> config); Bus registerServlet(Bus bus, String contextRoot, BundleContext callingContext, Long sid); String getDefaultAddress(Class<?> type); String getAbsoluteAddress(String contextRoot, String endpointAddress); void setContext(BundleContext context); @Reference void setHttpService(HttpService httpService); }
HttpServiceManager { public String getAbsoluteAddress(String contextRoot, String endpointAddress) { if (endpointAddress.startsWith("http")) { return endpointAddress; } String effContextRoot = contextRoot == null ? cxfServletAlias : contextRoot; return this.httpBase + effContextRoot + endpointAddress; }  @Activate void activate(ComponentContext compContext); void initFromConfig(Dictionary<String, Object> config); Bus registerServlet(Bus bus, String contextRoot, BundleContext callingContext, Long sid); String getDefaultAddress(Class<?> type); String getAbsoluteAddress(String contextRoot, String endpointAddress); void setContext(BundleContext context); @Reference void setHttpService(HttpService httpService); static final String KEY_HTTP_BASE; static final String KEY_CXF_SERVLET_ALIAS; static final String DEFAULT_CXF_SERVLET_ALIAS; }