public static void setupEndpoint(final Endpoint endpoint) { if (!(endpoint instanceof EndpointImpl)) { throw new IllegalArgumentException("Only CXF JAX-WS endpoints supported. "); } final EndpointImpl ep = (EndpointImpl) endpoint; final List<Feature> features = new ArrayList<Feature>(); features.add(new RequestCallbackFeature()); if (logging) { features.add(new LoggingFeature()); } if (serviceActivityMonitoring) { features.add(getEventFeature()); } if (ep.getFeatures() != null) { features.addAll(ep.getFeatures()); } ep.setFeatures(features); ep.getProperties().put(NULL_MEANS_ONEWAY, Boolean.TRUE); }
protected void run() { EndpointImpl endpointImpl = (EndpointImpl)Endpoint.publish(ADDRESS, new MTOMServer()); endpointImpl.getProperties().put(Message.CONTENT_TRANSFER_ENCODING, "base64"); } public static void main(String[] args) {
endpoint.getProperties().put(NULL_MEANS_ONEWAY, Boolean.TRUE); if (cbInterfaceName != null) { endpoint.setEndpointName(serverFactory.getEndpointName());
public static Endpoint setupCommandServiceEndpoint( String address, CommandWebService webServiceImpl ) { EndpointImpl ep = (EndpointImpl) Endpoint.create(webServiceImpl); ep.setAddress(address); ep.getProperties().put(SecurityConstants.CALLBACK_HANDLER, new TestServerPasswordCallback()); ep.publish(); return ep; }
String securityDomain = (String) endpointImpl.getProperties().get(JaspiServerAuthenticator.JASPI_SECURITY_DOMAIN); if (securityDomain == null)
policyFeature.setPolicies(policies); Map<String, Object> properties = serviceEndpoint.getProperties(); if (null == properties) { properties = new HashMap<String, Object>();
policyFeature.setPolicies(policies); Map<String, Object> properties = serviceEndpoint.getProperties(); if (null == properties) { properties = new HashMap<String, Object>();
protected void run() { Object implementor = new TestMtomImpl(); String address = "http://localhost:" + PORT + "/mime-test"; String addressProvider = "http://localhost:" + PORT + "/mime-test-provider"; try { jaxep = (EndpointImpl) javax.xml.ws.Endpoint.publish(address, implementor); Endpoint ep = jaxep.getServer().getEndpoint(); ep.getInInterceptors().add(new TestMultipartMessageInterceptor()); ep.getOutInterceptors().add(new TestAttachmentOutInterceptor()); jaxep.getInInterceptors().add(new LoggingInInterceptor()); jaxep.getOutInterceptors().add(new LoggingOutInterceptor()); SOAPBinding jaxWsSoapBinding = (SOAPBinding) jaxep.getBinding(); jaxWsSoapBinding.setMTOMEnabled(true); EndpointImpl endpoint = (EndpointImpl)javax.xml.ws.Endpoint.publish(addressProvider, new TestMtomProviderImpl()); endpoint.getProperties().put("schema-validation-enabled", "true"); endpoint.getInInterceptors().add(new LoggingInInterceptor()); endpoint.getOutInterceptors().add(new LoggingOutInterceptor()); } catch (Exception e) { Thread.currentThread().interrupt(); } } public void tearDown() {
cxfendpoint.getProperties().putAll( endpointBuilder.getProperties());