/** * @return the list of fearures <b>already</b> activated for this endpoint. */ public List<Feature> getActiveFeatures() { return wrappedEndpoint.getActiveFeatures(); }
private JavascriptOptionsFeature getOptions(Endpoint endpoint) { if (endpoint != null) { for (Feature feature : endpoint.getActiveFeatures()) { if (feature instanceof JavascriptOptionsFeature) { return (JavascriptOptionsFeature) feature; } } } return new JavascriptOptionsFeature(); // save work and return a default set of options. }
@ManagedAttribute(description = "if the endpoint has swagger doc or not", currencyTimeLimit = 60) public boolean isSwagger() { if (!isWADL()) { return false; } List<Feature> features = server.getEndpoint().getActiveFeatures(); if (features != null) { for (Feature feature : features) { if (feature.getClass().getName().endsWith("SwaggerFeature")) { return true; } } } return false; }
@ManagedAttribute(description = "if the endpoint has swagger doc or not", currencyTimeLimit = 60) public boolean isSwagger() { if (!isWADL()) { return false; } List<Feature> features = server.getEndpoint().getActiveFeatures(); if (features != null) { for (Feature feature : features) { if (feature.getClass().getName().endsWith("SwaggerFeature")) { return true; } } } return false; }
private WSAddressingFeature getWSAddressingFeature(Message message) { if (message.getExchange() != null && message.getExchange().getEndpoint() != null) { Endpoint endpoint = message.getExchange().getEndpoint(); if (endpoint.getActiveFeatures() != null) { for (Feature feature : endpoint.getActiveFeatures()) { if (feature instanceof WSAddressingFeature) { return (WSAddressingFeature)feature; } } } } return null; } /**
private WSAddressingFeature getWSAddressingFeature(Message message) { if (message.getExchange() != null && message.getExchange().getEndpoint() != null) { Endpoint endpoint = message.getExchange().getEndpoint(); if (endpoint.getActiveFeatures() != null) { for (Feature feature : endpoint.getActiveFeatures()) { if (feature instanceof WSAddressingFeature) { return (WSAddressingFeature)feature; } } } } return null; } /**
private static void checkAddressingEnabled(org.apache.cxf.endpoint.Endpoint e) { for (Feature feature : e.getActiveFeatures()) { if (feature instanceof WSAddressingFeature) { //TODO: remove this DecoupledFaultHandler once CXF is upgraded, see JBWS-3516 e.getInInterceptors().add(new DecoupledFaultHandler()); e.getOutInterceptors().add(new AddressingInterceptor()); e.getOutFaultInterceptors().add(new AddressingInterceptor()); break; } } }
private static void checkAddressingEnabled(org.apache.cxf.endpoint.Endpoint e) { for (Feature feature : e.getActiveFeatures()) { if (feature instanceof WSAddressingFeature) { //TODO: remove this DecoupledFaultHandler once CXF is upgraded, see JBWS-3516 e.getInInterceptors().add(new DecoupledFaultHandler()); e.getOutInterceptors().add(new AddressingInterceptor()); e.getOutFaultInterceptors().add(new AddressingInterceptor()); break; } } }
client.getEndpoint().getActiveFeatures().add(policyFeature); policyFeature.initialize(client, bus);
client.getEndpoint().getActiveFeatures().add(feature); feature.initialize(client, client.getBus());
client.getEndpoint().getActiveFeatures().add(policyFeature); policyFeature.initialize(client, bus);
public void startServer(Server server) { org.apache.cxf.endpoint.Endpoint endpoint = server.getEndpoint(); updateMap(startNotificationMap, endpoint.getEndpointInfo().getAddress()); String portName = endpoint.getEndpointInfo().getName().getLocalPart(); if ("SoapPort".equals(portName)) { List<Feature> active = endpoint.getActiveFeatures(); assertNotNull(active); assertEquals(1, active.size()); assertTrue(active.get(0) instanceof WSAddressingFeature); assertSame(active.get(0), AbstractFeature.getActive(active, WSAddressingFeature.class)); } else { List<Feature> active = endpoint.getActiveFeatures(); assertNotNull(active); assertEquals(0, active.size()); assertNull(AbstractFeature.getActive(active, WSAddressingFeature.class)); } } public void stopServer(Server server) {
} else { serviceFactory.setEndpointName(ei.getName()); if (ep.getActiveFeatures() == null) { ((EndpointImpl)ep).initializeActiveFeatures(getFeatures());
} else { serviceFactory.setEndpointName(ei.getName()); if (ep.getActiveFeatures() == null) { ((EndpointImpl)ep).initializeActiveFeatures(getFeatures());