Search in sources :

Example 6 with WebServiceEndpoint

use of com.sun.enterprise.deployment.WebServiceEndpoint in project Payara by payara.

the class AuthMessagePolicy method getMessageSecurityBinding.

public static MessageSecurityBindingDescriptor getMessageSecurityBinding(String layer, Map<String, ?> properties) {
    if (properties == null) {
        return null;
    }
    MessageSecurityBindingDescriptor binding = null;
    WebServiceEndpoint e = (WebServiceEndpoint) properties.get("SERVICE_ENDPOINT");
    if (e != null) {
        binding = e.getMessageSecurityBinding();
    } else {
        ServiceReferenceDescriptor s = (ServiceReferenceDescriptor) properties.get("SERVICE_REF");
        if (s != null) {
            WebServicesDelegate delegate = Globals.get(WebServicesDelegate.class);
            if (delegate != null) {
                binding = delegate.getBinding(s, properties);
            }
        }
    }
    if (binding != null) {
        String bindingLayer = binding.getAttributeValue(MessageSecurityBindingDescriptor.AUTH_LAYER);
        if (bindingLayer == null || layer.equals(bindingLayer)) {
            return binding;
        }
    }
    return null;
}
Also used : MessageSecurityBindingDescriptor(com.sun.enterprise.deployment.runtime.common.MessageSecurityBindingDescriptor) WebServiceEndpoint(com.sun.enterprise.deployment.WebServiceEndpoint) ServiceReferenceDescriptor(com.sun.enterprise.deployment.ServiceReferenceDescriptor)

Example 7 with WebServiceEndpoint

use of com.sun.enterprise.deployment.WebServiceEndpoint in project Payara by payara.

the class ComponentValidator method accept.

/**
 * Visits a service reference for the last J2EE component visited
 *
 * @param serviceRef the service reference
 */
@Override
protected void accept(ServiceReferenceDescriptor serviceRef) {
    Set portsInfo = serviceRef.getPortsInfo();
    for (Iterator iter = portsInfo.iterator(); iter.hasNext(); ) {
        ServiceRefPortInfo next = (ServiceRefPortInfo) iter.next();
        if (next.hasPortComponentLinkName() && !next.isLinkedToPortComponent()) {
            WebServiceEndpoint portComponentLink = next.resolveLinkName();
            if (portComponentLink == null) {
                String linkName = next.getPortComponentLinkName();
                DOLUtils.getDefaultLogger().log(Level.WARNING, DOLUtils.INVALID_DESC_MAPPING, new Object[] { "port-component", linkName });
            }
        }
    }
}
Also used : HashSet(java.util.HashSet) Set(java.util.Set) WebServiceEndpoint(com.sun.enterprise.deployment.WebServiceEndpoint) Iterator(java.util.Iterator) ServiceRefPortInfo(com.sun.enterprise.deployment.ServiceRefPortInfo)

Example 8 with WebServiceEndpoint

use of com.sun.enterprise.deployment.WebServiceEndpoint in project Payara by payara.

the class EjbContext method getHandlerChainContainers.

public HandlerChainContainer[] getHandlerChainContainers(boolean serviceSideHandlerChain, Class declaringClass) {
    if (serviceSideHandlerChain) {
        EjbDescriptor[] ejbs = getDescriptor().getEjbBundleDescriptor().getEjbByClassName(declaringClass.getName());
        List<WebServiceEndpoint> result = new ArrayList<WebServiceEndpoint>();
        for (EjbDescriptor ejb : ejbs) {
            result.addAll(getDescriptor().getEjbBundleDescriptor().getWebServices().getEndpointsImplementedBy(ejb));
        }
        return (result.toArray(new HandlerChainContainer[result.size()]));
    } else {
        List<ServiceReferenceDescriptor> result = new ArrayList<ServiceReferenceDescriptor>();
        result.addAll(getDescriptor().getEjbBundleDescriptor().getEjbServiceReferenceDescriptors());
        return (result.toArray(new HandlerChainContainer[result.size()]));
    }
}
Also used : HandlerChainContainer(com.sun.enterprise.deployment.types.HandlerChainContainer) WebServiceEndpoint(com.sun.enterprise.deployment.WebServiceEndpoint) ArrayList(java.util.ArrayList) ServiceReferenceDescriptor(com.sun.enterprise.deployment.ServiceReferenceDescriptor) EjbDescriptor(com.sun.enterprise.deployment.EjbDescriptor)

Example 9 with WebServiceEndpoint

use of com.sun.enterprise.deployment.WebServiceEndpoint in project Payara by payara.

the class PipeHelper method getHandlerContext.

@Override
protected HandlerContext getHandlerContext(Map map) {
    String realmName = null;
    WebServiceEndpoint wSE = (WebServiceEndpoint) map.get(PipeConstants.SERVICE_ENDPOINT);
    if (wSE != null) {
        Application app = wSE.getBundleDescriptor().getApplication();
        if (app != null) {
            realmName = app.getRealm();
        }
        if (realmName == null) {
            realmName = wSE.getRealm();
        }
    }
    final String fRealmName = realmName;
    return new HandlerContext() {

        @Override
        public String getRealmName() {
            return fRealmName;
        }
    };
}
Also used : WebServiceEndpoint(com.sun.enterprise.deployment.WebServiceEndpoint) HandlerContext(com.sun.enterprise.security.jmac.config.HandlerContext) Application(com.sun.enterprise.deployment.Application)

Example 10 with WebServiceEndpoint

use of com.sun.enterprise.deployment.WebServiceEndpoint in project Payara by payara.

the class PipeHelper method getAppCtxt.

private static String getAppCtxt(Map map) {
    String rvalue;
    WebServiceEndpoint wse = (WebServiceEndpoint) map.get(PipeConstants.SERVICE_ENDPOINT);
    // endpoint
    if (wse != null) {
        rvalue = getServerName(wse) + " " + getEndpointURI(wse);
    // client reference
    } else {
        ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor) map.get(PipeConstants.SERVICE_REF);
        rvalue = getClientModuleID(srd) + " " + getRefName(srd, map);
    }
    return rvalue;
}
Also used : WebServiceEndpoint(com.sun.enterprise.deployment.WebServiceEndpoint) ServiceReferenceDescriptor(com.sun.enterprise.deployment.ServiceReferenceDescriptor)

Aggregations

WebServiceEndpoint (com.sun.enterprise.deployment.WebServiceEndpoint)23 ServiceReferenceDescriptor (com.sun.enterprise.deployment.ServiceReferenceDescriptor)5 WebService (com.sun.enterprise.deployment.WebService)5 EjbDescriptor (com.sun.enterprise.deployment.EjbDescriptor)4 ArrayList (java.util.ArrayList)4 EjbBundleDescriptor (com.sun.enterprise.deployment.EjbBundleDescriptor)3 HandlerChainContainer (com.sun.enterprise.deployment.types.HandlerChainContainer)3 Iterator (java.util.Iterator)3 QName (javax.xml.namespace.QName)3 WebServiceHandler (com.sun.enterprise.deployment.WebServiceHandler)2 WebServicesDescriptor (com.sun.enterprise.deployment.WebServicesDescriptor)2 MessageSecurityBindingDescriptor (com.sun.enterprise.deployment.runtime.common.MessageSecurityBindingDescriptor)2 Model (com.sun.xml.rpc.spi.model.Model)2 Port (com.sun.xml.rpc.spi.model.Port)2 URL (java.net.URL)2 Collection (java.util.Collection)2 HashSet (java.util.HashSet)2 Application (com.sun.enterprise.deployment.Application)1 BundleDescriptor (com.sun.enterprise.deployment.BundleDescriptor)1 ServiceRefPortInfo (com.sun.enterprise.deployment.ServiceRefPortInfo)1