Search in sources :

Example 16 with Endpoint

use of org.jboss.wsf.spi.deployment.Endpoint in project wildfly by wildfly.

the class EndpointPublisherImpl method destroy.

@Override
public void destroy(Context context) throws Exception {
    List<Endpoint> eps = context.getEndpoints();
    if (eps == null || eps.isEmpty()) {
        return;
    }
    Deployment dep = eps.get(0).getService().getDeployment();
    try {
        stopWebApp(dep);
    } finally {
        undeploy(dep);
    }
}
Also used : Endpoint(org.jboss.wsf.spi.deployment.Endpoint) Deployment(org.jboss.wsf.spi.deployment.Deployment)

Example 17 with Endpoint

use of org.jboss.wsf.spi.deployment.Endpoint in project wildfly by wildfly.

the class WebMetaDataCreator method createServlets.

/**
     * Creates servlets part of web.xml descriptor.
     * <p/>
     * <pre>
     * &lt;servlet&gt;
     *   &lt;servlet-name&gt;EJBEndpointShortName&lt;/servlet-name&gt;
     *   &lt;servlet-class&gt;EJBEndpointTargetBeanName&lt;/servlet-class&gt;
     * &lt;/servlet&gt;
     * </pre>
     *
     * @param dep        webservice deployment
     * @param jbossWebMD jboss web meta data
     */
private void createServlets(final Deployment dep, final JBossWebMetaData jbossWebMD) {
    WSLogger.ROOT_LOGGER.trace("Creating servlets");
    final JBossServletsMetaData servlets = WebMetaDataHelper.getServlets(jbossWebMD);
    for (final Endpoint endpoint : dep.getService().getEndpoints()) {
        final String endpointName = endpoint.getShortName();
        final String endpointClassName = endpoint.getTargetBeanName();
        WSLogger.ROOT_LOGGER.tracef("Servlet name: %s, class: %s", endpointName, endpointClassName);
        WebMetaDataHelper.newServlet(endpointName, endpointClassName, servlets);
    }
}
Also used : JBossServletsMetaData(org.jboss.metadata.web.jboss.JBossServletsMetaData) HttpEndpoint(org.jboss.wsf.spi.deployment.HttpEndpoint) Endpoint(org.jboss.wsf.spi.deployment.Endpoint)

Example 18 with Endpoint

use of org.jboss.wsf.spi.deployment.Endpoint in project wildfly by wildfly.

the class WebMetaDataCreator method createServletMappings.

/**
     * Creates servlet-mapping part of web.xml descriptor.
     * <p/>
     * <pre>
     * &lt;servlet-mapping&gt;
     *   &lt;servlet-name&gt;EJBEndpointShortName&lt;/servlet-name&gt;
     *   &lt;url-pattern&gt;EJBEndpointURLPattern&lt;/url-pattern&gt;
     * &lt;/servlet-mapping&gt;
     * </pre>
     *
     * @param dep        webservice deployment
     * @param jbossWebMD jboss web meta data
     */
private void createServletMappings(final Deployment dep, final JBossWebMetaData jbossWebMD) {
    WSLogger.ROOT_LOGGER.trace("Creating servlet mappings");
    final List<ServletMappingMetaData> servletMappings = WebMetaDataHelper.getServletMappings(jbossWebMD);
    for (final Endpoint ep : dep.getService().getEndpoints()) {
        if (ep instanceof HttpEndpoint) {
            final String endpointName = ep.getShortName();
            final List<String> urlPatterns = WebMetaDataHelper.getUrlPatterns(((HttpEndpoint) ep).getURLPattern());
            WSLogger.ROOT_LOGGER.tracef("Servlet name: %s, URL patterns: %s", endpointName, urlPatterns);
            WebMetaDataHelper.newServletMapping(endpointName, urlPatterns, servletMappings);
        }
    }
}
Also used : ServletMappingMetaData(org.jboss.metadata.web.spec.ServletMappingMetaData) HttpEndpoint(org.jboss.wsf.spi.deployment.HttpEndpoint) Endpoint(org.jboss.wsf.spi.deployment.Endpoint) HttpEndpoint(org.jboss.wsf.spi.deployment.HttpEndpoint)

Example 19 with Endpoint

use of org.jboss.wsf.spi.deployment.Endpoint in project wildfly by wildfly.

the class WebMetaDataCreator method getAuthMethod.

/**
     * Returns deployment authentication method.
     *
     * @param dep webservice deployment
     * @return deployment authentication method
     */
private String getAuthMethod(final Deployment dep) {
    for (final Endpoint ejbEndpoint : dep.getService().getEndpoints()) {
        final String beanAuthMethod = ejb3SecurityAccessor.getAuthMethod(ejbEndpoint);
        final boolean hasBeanAuthMethod = beanAuthMethod != null;
        if (hasBeanAuthMethod) {
            // login-config/auth-method
            return beanAuthMethod;
        }
    }
    return null;
}
Also used : HttpEndpoint(org.jboss.wsf.spi.deployment.HttpEndpoint) Endpoint(org.jboss.wsf.spi.deployment.Endpoint)

Aggregations

Endpoint (org.jboss.wsf.spi.deployment.Endpoint)19 ServiceName (org.jboss.msc.service.ServiceName)6 HttpEndpoint (org.jboss.wsf.spi.deployment.HttpEndpoint)5 DeploymentUnit (org.jboss.as.server.deployment.DeploymentUnit)3 EJBEndpoint (org.jboss.as.webservices.metadata.model.EJBEndpoint)3 Deployment (org.jboss.wsf.spi.deployment.Deployment)3 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 WSEndpointConfigMapping (org.jboss.as.webservices.deployers.WSEndpointConfigMapping)2 ModelNode (org.jboss.dmr.ModelNode)2 ManagedEndpoint (org.jboss.ws.common.management.ManagedEndpoint)2 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 Vector (java.util.Vector)1 OperationFailedException (org.jboss.as.controller.OperationFailedException)1 PathAddress (org.jboss.as.controller.PathAddress)1 ApplicationSecurityDomainService (org.jboss.as.ejb3.subsystem.ApplicationSecurityDomainService)1 DeploymentResourceSupport (org.jboss.as.server.deployment.DeploymentResourceSupport)1 POJOEndpoint (org.jboss.as.webservices.metadata.model.POJOEndpoint)1 WSEndpointDeploymentUnit (org.jboss.as.webservices.publish.WSEndpointDeploymentUnit)1 ParamValueMetaData (org.jboss.metadata.javaee.spec.ParamValueMetaData)1