@Override public void setMetadata(List<Source> metadata) { delegate.setMetadata(metadata); }
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) { 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; }
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; } }
StreamSource src = new StreamSource(wsdlLocation.openStream(), wsdlLocation.toExternalForm()); mt.add(src); endpoint.setMetadata(mt); } catch (IOException e) {
endpoint.setMetadata(metadata); List<String> docId = new ArrayList<String>(); for(Source source : metadata) {
endpoint.setMetadata(metadata); List<String> docId = new ArrayList<String>(); for(Source source : metadata) {
endpoint.setMetadata(metadata); List<String> docId = new ArrayList<String>(); for(Source source : metadata) {
properties.put(Endpoint.WSDL_SERVICE, serviceName); wsEndpoint.setMetadata(metadata); wsEndpoint.setProperties(properties);
properties.put(Endpoint.WSDL_SERVICE, serviceName); wsEndpoint.setMetadata(metadata); wsEndpoint.setProperties(properties);
/** * {@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; } }