@Override public Map<String, Object> getProperties() { return delegate.getProperties(); }
public void setRobustInOnlyMode(boolean in) { endpoint.getProperties().put(Message.ROBUST_ONEWAY, in); }
/** Destroys an JAXWS endpoint on the HTTP server */ public void destroy(HttpContext context, Endpoint endpoint) { Map<String, Object> epProps = endpoint.getProperties(); File tmpWar = (File)epProps.get("jbossws-endpoint-war-url"); if (tmpWar == null) throw new IllegalStateException("Cannot find endpoint war property"); try { URL tmpURL = tmpWar.toURL(); getMbeanServer().invoke(new ObjectName(MAIN_DEPLOYER), "undeploy", new Object[] { tmpURL }, new String[] { "java.net.URL" }); tmpWar.delete(); } catch (RuntimeException rte) { throw rte; } catch (Exception ex) { throw new WebServiceException(ex); } }
/** Destroys an JAXWS endpoint on the HTTP server */ public void destroy(HttpContext context, Endpoint endpoint) { Map<String, Object> epProps = endpoint.getProperties(); File tmpWar = (File)epProps.get("jbossws-endpoint-war-url"); if (tmpWar == null) throw new IllegalStateException("Cannot find endpoint war property"); try { URL tmpURL = tmpWar.toURL(); getMbeanServer().invoke(new ObjectName(MAIN_DEPLOYER), "undeploy", new Object[] { tmpURL }, new String[] { "java.net.URL" }); tmpWar.delete(); } catch (RuntimeException rte) { throw rte; } catch (Exception ex) { throw new WebServiceException(ex); } }
/** Destroys an JAXWS endpoint on the HTTP server */ public void destroy(HttpContext context, Endpoint endpoint) { Map<String, Object> epProps = endpoint.getProperties(); File tmpWar = (File)epProps.get("jbossws-endpoint-war-url"); if (tmpWar == null) throw new IllegalStateException("Cannot find endpoint war property"); try { URL tmpURL = tmpWar.toURL(); getMbeanServer().invoke(new ObjectName(MAIN_DEPLOYER), "undeploy", new Object[] { tmpURL }, new String[] { "java.net.URL" }); tmpWar.delete(); } catch (RuntimeException rte) { throw rte; } catch (Exception ex) { throw new WebServiceException(ex); } }
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; } }
@SuppressWarnings("rawtypes") public void initialize(MessagePolicy requestPolicy, MessagePolicy responsePolicy, CallbackHandler handler, Map options) throws AuthException { super.initialize(requestPolicy, responsePolicy, handler, options); final javax.xml.ws.Endpoint endpoint = (javax.xml.ws.Endpoint)options.get(javax.xml.ws.Endpoint.class); InterceptorProvider ip = null; if (endpoint == null && options.get(Bus.class) != null) { final Bus bus = (Bus)options.get(Bus.class); bus.setProperty(SecurityConstants.VALIDATE_TOKEN, false); ip = (InterceptorProvider)bus; } if (endpoint != null) { endpoint.getProperties().put(SecurityConstants.VALIDATE_TOKEN, false); ip = (InterceptorProvider)endpoint; } if (ip != null) { JaspiSubjectCreatingInitInterceptor jaspiInterceptor = new JaspiSubjectCreatingInitInterceptor(securityDomainName); ip.getInInterceptors().add(jaspiInterceptor); } }
private void doPublish(String url, Object obj) { Endpoint ep = Endpoint.create(obj); ep.getProperties().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback()); ep.getProperties().put(SecurityConstants.ENCRYPT_PROPERTIES, "restricted/bob.properties"); if (streaming) { ep.getProperties().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true"); } ep.publish(url); }
private void doPublish(String url, Object obj) { Endpoint ep = Endpoint.create(obj); ep.getProperties().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback()); ep.getProperties().put(SecurityConstants.ENCRYPT_PROPERTIES, "bob.properties"); if (streaming) { ep.getProperties().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true"); } ep.publish(url); }
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());
private void configureEndpoint(EndpointConfig config, Endpoint endpoint) { Map<String, Object> props = endpoint.getProperties(); // Basic config if(config.getWsdlService() != null) { props.put(Endpoint.WSDL_SERVICE, config.getWsdlService()); } if(config.getWsdlPort() != null) { props.put(Endpoint.WSDL_PORT, config.getWsdlPort()); } // setup schema validation props.put(Message.SCHEMA_VALIDATION_ENABLED, SchemaValidation.SchemaValidationType.valueOf(schemaValidation.toUpperCase())); for (EndpointCustomizer customizer : endpointCustomizers) { customizer.configureEndpoint(endpoint); } }
private void doPublish(String url, Object obj) { Endpoint ep = Endpoint.create(obj); ep.getProperties().put(SecurityConstants.CALLBACK_HANDLER + ".sct", new KeystorePasswordCallback()); ep.getProperties().put(SecurityConstants.ENCRYPT_PROPERTIES + ".sct", "bob.properties"); if (url.contains("X10_I")) { ep.getProperties().put(SecurityConstants.SIGNATURE_PROPERTIES + ".sct", "bob.properties"); ep.getProperties().put(SecurityConstants.ENCRYPT_PROPERTIES + ".sct", "alice.properties"); } else if (url.contains("MutualCert")) { ep.getProperties().put(SecurityConstants.ENCRYPT_PROPERTIES + ".sct", "bob.properties"); ep.getProperties().put(SecurityConstants.SIGNATURE_PROPERTIES + ".sct", "alice.properties"); ep.getProperties().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback()); } else if (url.contains("UserNameOverTransport")) { ep.getProperties().put(SecurityConstants.CALLBACK_HANDLER + ".sct", new UTPasswordCallback()); } ep.publish(url); }
private void doPublish(String url, Object obj) { Endpoint ep = Endpoint.create(obj); ep.getProperties().put(SecurityConstants.ENABLE_STREAMING_SECURITY, "true"); ep.getProperties().put(SecurityConstants.CALLBACK_HANDLER + ".sct", new KeystorePasswordCallback()); ep.getProperties().put(SecurityConstants.ENCRYPT_PROPERTIES + ".sct", "bob.properties"); if (url.contains("X10_I")) { ep.getProperties().put(SecurityConstants.SIGNATURE_PROPERTIES + ".sct", "bob.properties"); ep.getProperties().put(SecurityConstants.ENCRYPT_PROPERTIES + ".sct", "alice.properties"); } else if (url.contains("MutualCert")) { ep.getProperties().put(SecurityConstants.ENCRYPT_PROPERTIES + ".sct", "bob.properties"); ep.getProperties().put(SecurityConstants.SIGNATURE_PROPERTIES + ".sct", "alice.properties"); ep.getProperties().put(SecurityConstants.CALLBACK_HANDLER, new KeystorePasswordCallback()); } else if (url.contains("UserNameOverTransport")) { ep.getProperties().put(SecurityConstants.CALLBACK_HANDLER + ".sct", new UTPasswordCallback()); } ep.publish(url); }
Map<String, Object> epProps = endpoint.getProperties(); epProps.put("jbossws-endpoint-war-url", tmpWar);
Map<String, Object> epProps = endpoint.getProperties(); epProps.put("jbossws-endpoint-war-url", tmpWar);
Map<String, Object> epProps = endpoint.getProperties(); epProps.put("jbossws-endpoint-war-url", tmpWar);
protected void run() { // endpoint not interpreting null as oneway NullProviderService servant1 = new NullProviderService(); Endpoint ep1 = Endpoint.publish(ADDRESS1, servant1); assertNotNull("endpoint published", ep1); ep1.getProperties().put("jaxws.provider.interpretNullAsOneway", Boolean.FALSE); // endpoint interpreting null as oneway NullProviderService servant2 = new NullProviderService(); Endpoint ep2 = Endpoint.publish(ADDRESS2, servant2); assertNotNull("endpoint published", ep2); ep2.getProperties().put("jaxws.provider.interpretNullAsOneway", "false"); // endpoint interpreting null as oneway NullProviderService servant3 = new NullProviderService(); Endpoint ep3 = Endpoint.publish(ADDRESS3, servant3); assertNotNull("endpoint published", ep3); }