Endpoint endpoint = createEndpoint(this.beanFactory.getBean(beanName)); if (this.endpointProperties != null) { endpoint.setProperties(this.endpointProperties);
Endpoint endpoint = createEndpoint(this.beanFactory.getBean(beanName)); if (this.endpointProperties != null) { endpoint.setProperties(this.endpointProperties);
@Override public void setProperties(Map<String, Object> properties) { delegate.setProperties(properties); }
private void createAndPublishUTPort() { Endpoint ep = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, new GreeterImpl()); Map<String, Object> properties = new HashMap<String, Object>(); properties.put("security.callback-handler", "com.talend.examples.secure_greeter.PasswordCallback"); properties.put("security.signature.properties", "/ws-secpol-wsdl/service.properties"); properties.put( Endpoint.WSDL_PORT, new QName("http://talend.com/examples/secure-greeter", "UTGreeterPort") ); ep.setProperties(properties); ep.publish("http://localhost:9000/SecureUTGreeter"); }
protected Server() throws Exception { System.out.println("Starting Server"); Endpoint ep = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, new DoubleItPortTypeImpl()); Map<String, Object> properties = new HashMap<String, Object>(); properties.put("security.callback-handler", "service.ServiceKeystorePasswordCallback"); properties.put("security.signature.properties", "serviceKeystore.properties"); properties.put( Endpoint.WSDL_PORT, new QName("http://www.example.org/contract/DoubleIt", "DoubleItPort") ); ep.setProperties(properties); ep.publish("http://localhost:9000/doubleit/services/doubleit"); }
private void createAndPublishSAMLPort() { Endpoint ep = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, new GreeterImpl()); Map<String, Object> properties = new HashMap<String, Object>(); properties.put("security.callback-handler", "com.talend.examples.secure_greeter.PasswordCallback"); properties.put("security.encryption.properties", "/ws-secpol-wsdl/client.properties"); properties.put("security.signature.properties", "/ws-secpol-wsdl/service.properties"); properties.put("ws-security.saml2.validator", "demo.secure_greeter.server.ServerSamlValidator"); properties.put( Endpoint.WSDL_PORT, new QName("http://talend.com/examples/secure-greeter", "SAMLGreeterPort") ); ep.setProperties(properties); ep.publish("http://localhost:9000/SecureSAMLGreeter"); }
public Endpoint toEndpoint() throws IOException, IllegalAccessException, InstantiationException { Endpoint ep = Endpoint.create(getImplementorInstance()); List<Source> metadata = new ArrayList<>(); Map<String, Object> properties = new HashMap<>(); if (!isBlank(port)) { properties.put(WSDL_PORT, new QName(namespace, port)); } if (!isBlank(port)) { properties.put(WSDL_SERVICE, new QName(namespace, service)); } if (!isBlank(wsdl)) { URL wsdlURL = WSEndpointManagerImpl.class.getClassLoader().getResource(wsdl); if (wsdlURL == null) { throw new FileNotFoundException("WSDL: " + wsdl); } Source src = new StreamSource(wsdlURL.openStream()); src.setSystemId(wsdlURL.toExternalForm()); metadata.add(src); } if (isBlank(publishedEndpointUrl)) { publishedEndpointUrl = String.format("%s%s%s", Framework.getProperty(NUXEO_URL), WSEndpointManager.WS_SERVLET, address); } properties.put("publishedEndpointUrl", publishedEndpointUrl); ep.setMetadata(metadata); ep.setProperties(properties); return ep; }
public Endpoint publish(String address, Object o, Class<?> ... extraClasses) { Endpoint endpoint = Endpoint.create(SOAPBinding.SOAP12HTTP_BINDING, o); if (extraClasses != null && extraClasses.length > 0) { Map<String, Object> props = new HashMap<>(); props.put("jaxb.additionalContextClasses", extraClasses); endpoint.setProperties(props); } URL wsdlLocation = WSNWSDLLocator.getWSDLUrl(); if (wsdlLocation != null) { try { if (endpoint.getProperties() == null) { endpoint.setProperties(new HashMap<String, Object>()); } endpoint.getProperties().put("javax.xml.ws.wsdl.description", wsdlLocation.toExternalForm()); List<Source> mt = new ArrayList<>(); StreamSource src = new StreamSource(wsdlLocation.openStream(), wsdlLocation.toExternalForm()); mt.add(src); endpoint.setMetadata(mt); } catch (IOException e) { //ignore, no wsdl really needed } } endpoint.publish(address); return endpoint; } }
public Endpoint publish(String address, Object o, Class<?> ... extraClasses) { if (extraClasses != null && extraClasses.length > 0) { throw new UnsupportedOperationException("Pure JAX-WS does not support the extraClasses"); } Endpoint endpoint = Endpoint.create(o); URL wsdlLocation = WSNWSDLLocator.getWSDLUrl(); if (wsdlLocation != null) { try { if (endpoint.getProperties() == null) { endpoint.setProperties(new HashMap<String, Object>()); } endpoint.getProperties().put("javax.xml.ws.wsdl.description", wsdlLocation.toExternalForm()); List<Source> mt = new ArrayList<>(); StreamSource src = new StreamSource(wsdlLocation.openStream(), wsdlLocation.toExternalForm()); mt.add(src); endpoint.setMetadata(mt); } catch (IOException e) { //ignore, no wsdl really needed } } endpoint.publish(address); return endpoint; }
Map<String, Object> props = new HashMap<>(); props.put("jaxws.provider.interpretNullAsOneway", "true"); udpEndpoint.setProperties(props); if ("true".equals(preferIPv6AddressesValue) && "false".equals(preferIPv4StackValue)) { try {
LOGGER.log(Level.INFO, "Setting Endpoint Properties={0}", props); endpoint.setProperties(props);
Map<String, Object> props = new HashMap<>(); props.put("jaxws.provider.interpretNullAsOneway", "true"); udpEndpoint.setProperties(props); if ("true".equals(preferIPv6AddressesValue) && "false".equals(preferIPv4StackValue)) { try {
protected void run() { Object implementor = new HWDOMSourcePayloadXMLBindingProvider(); Endpoint ep = Endpoint.create(implementor); Map<String, Object> map = new HashMap<>(); map.put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE); ep.setProperties(map); ep.publish(ADDRESS); }
protected void run() { Object implementor = new GreeterImplNoWsdl(); String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort"; Endpoint ep = Endpoint.create(implementor); Map<String, Object> props = new HashMap<>(); props.put(WSDLGetUtils.WSDL_CREATE_IMPORTS, Boolean.TRUE); ep.setProperties(props); ep.publish(address); }
protected void run() { System.setProperty("org.apache.cxf.bus.factory", "org.apache.cxf.bus.CXFBusFactory"); Object implementor = new PutLastTradedPriceImpl(); String address = "http://localhost:" + PORT + "/SOAPDocLitBareService/SoapPort"; ep = Endpoint.create(implementor); Map<String, Object> props = new HashMap<>(2); props.put(Endpoint.WSDL_SERVICE, new QName("http://apache.org/hello_world_doc_lit_bare", "SOAPService")); props.put(Endpoint.WSDL_PORT, new QName("http://apache.org/hello_world_doc_lit_bare", "SoapPort")); ep.setProperties(props); ep.publish(address); implementor = new BareSoapServiceImpl(); address = "http://localhost:" + PORT + "/SOAPDocLitBareService/SoapPort1"; ep = Endpoint.create(implementor); ep.publish(address); }
protected void run() { Object implementor = new HWSoapMessageDocProvider(); Endpoint ep = Endpoint.create(implementor); Map<String, Object> map = new HashMap<>(); map.put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE); ep.setProperties(map); ((EndpointImpl)ep).getInInterceptors().add(new LoggingInInterceptor()); ((EndpointImpl)ep).getOutInterceptors().add(new LoggingOutInterceptor()); ep.publish(ADDRESS); }
protected void run() { String address; Object implementor = new ServicePortTypeImpl(); address = "http://localhost:" + PORT + "/schemavalidation"; Endpoint ep = Endpoint.create(implementor); Map<String, Object> map = new HashMap<>(); map.put(Message.SCHEMA_VALIDATION_ENABLED, Boolean.TRUE); ep.setProperties(map); ((EndpointImpl)ep).setWsdlLocation("wsdl_systest_jaxws/schemaValidation.wsdl"); ((EndpointImpl)ep).setServiceName(new QName( "http://cxf.apache.org/jaxws/schemavalidation", "service")); ((EndpointImpl)ep).getInInterceptors().add(new LoggingInInterceptor()); ((EndpointImpl)ep).getOutInterceptors().add(new LoggingOutInterceptor()); ep.publish(address); }
protected void run() { setBus(BusFactory.getDefaultBus()); Object implementor = new GreeterImpl(); String address = "http://localhost:" + TestUtil.getPortNumber(DispatchClientServerTest.class) + "/SOAPDispatchService/SoapDispatchPort"; ep = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, implementor); Map<String, Object> properties = new HashMap<>(); Map<String, String> nsMap = new HashMap<>(); nsMap.put("gmns", "http://apache.org/hello_world_soap_http/types"); properties.put("soap.env.ns.map", nsMap); properties.put("disable.outputstream.optimization", "true"); ep.setProperties(properties); ep.publish(address); BusFactory.setDefaultBus(null); BusFactory.setThreadDefaultBus(null); } @Override
/** * {@inheritDoc} */ public synchronized Endpoint publish(ServiceDomain domain, final SOAPBindingModel config, final String bindingId, final InboundHandler handler, WebServiceFeature... features) { JAXWSEndpoint wsEndpoint = null; try { initialize(config); List<Source> metadata = new ArrayList<Source>(); StreamSource source = WSDLUtil.getStream(config.getWsdl()); metadata.add(source); Map<String, Object> properties = new HashMap<String, Object>(); properties.put(javax.xml.ws.Endpoint.WSDL_SERVICE, config.getPort().getServiceQName()); properties.put(javax.xml.ws.Endpoint.WSDL_PORT, config.getPort().getPortQName()); properties.put(MessageContext.WSDL_DESCRIPTION, getWsdlLocation()); String publishUrl = HTTP_SCHEME + "://" + config.getSocketAddr().getHost() + ":" + config.getSocketAddr().getPort() + "/" + getContextPath(); wsEndpoint = new JAXWSEndpoint(bindingId, handler, features); wsEndpoint.getEndpoint().setMetadata(metadata); wsEndpoint.getEndpoint().setProperties(properties); wsEndpoint.publish(publishUrl); } catch (MalformedURLException e) { throw new WebServicePublishException(e); } catch (WSDLException e) { throw new WebServicePublishException(e); } return wsEndpoint; } }
/** * {@inheritDoc} */ public synchronized Endpoint publish(ServiceDomain domain, final SOAPBindingModel config, final String bindingId, final InboundHandler handler, WebServiceFeature... features) { JAXWSEndpoint wsEndpoint = null; try { initialize(config); List<Source> metadata = new ArrayList<Source>(); StreamSource source = WSDLUtil.getStream(config.getWsdl()); metadata.add(source); Map<String, Object> properties = new HashMap<String, Object>(); properties.put(javax.xml.ws.Endpoint.WSDL_SERVICE, config.getPort().getServiceQName()); properties.put(javax.xml.ws.Endpoint.WSDL_PORT, config.getPort().getPortQName()); properties.put(MessageContext.WSDL_DESCRIPTION, getWsdlLocation()); String publishUrl = HTTP_SCHEME + "://" + config.getSocketAddr().getHost() + ":" + config.getSocketAddr().getPort() + "/" + getContextPath(); wsEndpoint = new JAXWSEndpoint(bindingId, handler, features); wsEndpoint.getEndpoint().setMetadata(metadata); wsEndpoint.getEndpoint().setProperties(properties); wsEndpoint.publish(publishUrl); } catch (MalformedURLException e) { throw new WebServicePublishException(e); } catch (WSDLException e) { throw new WebServicePublishException(e); } return wsEndpoint; } }