Search in sources :

Example 6 with ServiceReferenceDescriptor

use of com.sun.enterprise.deployment.ServiceReferenceDescriptor 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 ServiceReferenceDescriptor

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

the class WLServiceRefPortInfoRuntimeNode method setElementValue.

/**
 * receives notiification of the value for a particular tag
 *
 * @param element the xml element
 * @param value   it's associated value
 */
public void setElementValue(XMLElement element, String value) {
    String name = element.getQName();
    if (WLWebServicesTagNames.SERVICE_REFERENCE_PORT_NAME.equals(name)) {
        ServiceReferenceDescriptor serviceRef = ((ServiceReferenceDescriptor) getParentNode().getDescriptor());
        // WLS-DD does not provide a way to specify ns uri of the port, so use the service ns uri
        String namespaceUri = serviceRef.getServiceNamespaceUri();
        QName wsdlPort = new QName(namespaceUri, value);
        descriptor = serviceRef.getPortInfoByPort(wsdlPort);
    } else
        super.setElementValue(element, value);
}
Also used : QName(javax.xml.namespace.QName) ServiceReferenceDescriptor(com.sun.enterprise.deployment.ServiceReferenceDescriptor)

Example 8 with ServiceReferenceDescriptor

use of com.sun.enterprise.deployment.ServiceReferenceDescriptor 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 ServiceReferenceDescriptor

use of com.sun.enterprise.deployment.ServiceReferenceDescriptor 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)

Example 10 with ServiceReferenceDescriptor

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

the class EjbBundleTracerVisitor method accept.

protected void accept(EjbDescriptor ejb) {
    logInfo("==================");
    logInfo(ejb.getType() + " Bean " + ejb.getName());
    logInfo("\thomeClassName " + ejb.getHomeClassName());
    logInfo("\tremoteClassName " + ejb.getRemoteClassName());
    logInfo("\tlocalhomeClassName " + ejb.getLocalHomeClassName());
    logInfo("\tlocalClassName " + ejb.getLocalClassName());
    logInfo("\tremoteBusinessIntfs " + ejb.getRemoteBusinessClassNames());
    logInfo("\tlocalBusinessIntfs " + ejb.getLocalBusinessClassNames());
    logInfo("\tjndiName " + ejb.getJndiName());
    logInfo("\tejbClassName " + ejb.getEjbClassName());
    logInfo("\ttransactionType " + ejb.getTransactionType());
    if (ejb.getUsesCallerIdentity() == false) {
        logInfo("\trun-as role " + ejb.getRunAsIdentity());
    } else {
        logInfo("\tuse-caller-identity " + ejb.getUsesCallerIdentity());
    }
    for (EjbReference aRef : ejb.getEjbReferenceDescriptors()) {
        accept(aRef);
    }
    for (Iterator e = ejb.getPermissionedMethodsByPermission().keySet().iterator(); e.hasNext(); ) {
        MethodPermission mp = (MethodPermission) e.next();
        Set methods = (Set) ejb.getPermissionedMethodsByPermission().get(mp);
        accept(mp, methods);
    }
    if (ejb.getStyledPermissionedMethodsByPermission() != null) {
        for (Iterator e = ejb.getStyledPermissionedMethodsByPermission().keySet().iterator(); e.hasNext(); ) {
            MethodPermission mp = (MethodPermission) e.next();
            Set methods = (Set) ejb.getStyledPermissionedMethodsByPermission().get(mp);
            accept(mp, methods);
        }
    }
    for (RoleReference roleRef : ejb.getRoleReferences()) {
        accept(roleRef);
    }
    for (Iterator e = ejb.getMethodContainerTransactions().keySet().iterator(); e.hasNext(); ) {
        MethodDescriptor md = (MethodDescriptor) e.next();
        ContainerTransaction ct = (ContainerTransaction) ejb.getMethodContainerTransactions().get(md);
        accept(md, ct);
    }
    for (EnvironmentProperty envProp : ejb.getEnvironmentProperties()) {
        accept(envProp);
    }
    for (ResourceReferenceDescriptor next : ejb.getResourceReferenceDescriptors()) {
        accept(next);
    }
    for (ResourceEnvReferenceDescriptor next : ejb.getResourceEnvReferenceDescriptors()) {
        accept(next);
    }
    for (MessageDestinationReferencer next : ejb.getMessageDestinationReferenceDescriptors()) {
        accept(next);
    }
    // referencer as well.
    if (ejb.getType().equals(EjbMessageBeanDescriptor.TYPE)) {
        MessageDestinationReferencer msgDestReferencer = (MessageDestinationReferencer) ejb;
        if (msgDestReferencer.getMessageDestinationLinkName() != null) {
            accept(msgDestReferencer);
        }
    }
    for (ServiceReferenceDescriptor sref : ejb.getServiceReferenceDescriptors()) {
        accept(sref);
    }
    if (ejb instanceof EjbCMPEntityDescriptor) {
        EjbCMPEntityDescriptor cmp = (EjbCMPEntityDescriptor) ejb;
        PersistenceDescriptor persistenceDesc = cmp.getPersistenceDescriptor();
        for (Object fd : persistenceDesc.getCMPFields()) {
            accept((FieldDescriptor) fd);
        }
        for (Object o : persistenceDesc.getQueriedMethods()) {
            if (o instanceof MethodDescriptor) {
                QueryDescriptor qd = persistenceDesc.getQueryFor((MethodDescriptor) o);
                accept(qd);
            }
        }
    }
}
Also used : Set(java.util.Set) ServiceReferenceDescriptor(com.sun.enterprise.deployment.ServiceReferenceDescriptor) MethodDescriptor(com.sun.enterprise.deployment.MethodDescriptor) MethodPermission(com.sun.enterprise.deployment.MethodPermission) EjbReference(com.sun.enterprise.deployment.types.EjbReference) PersistenceDescriptor(org.glassfish.ejb.deployment.descriptor.PersistenceDescriptor) MessageDestinationReferencer(com.sun.enterprise.deployment.types.MessageDestinationReferencer) QueryDescriptor(org.glassfish.ejb.deployment.descriptor.QueryDescriptor) RoleReference(com.sun.enterprise.deployment.RoleReference) ContainerTransaction(org.glassfish.ejb.deployment.descriptor.ContainerTransaction) EnvironmentProperty(com.sun.enterprise.deployment.EnvironmentProperty) Iterator(java.util.Iterator) ResourceEnvReferenceDescriptor(com.sun.enterprise.deployment.ResourceEnvReferenceDescriptor) ResourceReferenceDescriptor(com.sun.enterprise.deployment.ResourceReferenceDescriptor) EjbCMPEntityDescriptor(org.glassfish.ejb.deployment.descriptor.EjbCMPEntityDescriptor)

Aggregations

ServiceReferenceDescriptor (com.sun.enterprise.deployment.ServiceReferenceDescriptor)14 WebServiceEndpoint (com.sun.enterprise.deployment.WebServiceEndpoint)5 EjbDescriptor (com.sun.enterprise.deployment.EjbDescriptor)3 HandlerChainContainer (com.sun.enterprise.deployment.types.HandlerChainContainer)3 ArrayList (java.util.ArrayList)3 Iterator (java.util.Iterator)3 EjbBundleDescriptor (com.sun.enterprise.deployment.EjbBundleDescriptor)2 ResourceEnvReferenceDescriptor (com.sun.enterprise.deployment.ResourceEnvReferenceDescriptor)2 ResourceReferenceDescriptor (com.sun.enterprise.deployment.ResourceReferenceDescriptor)2 WebComponentDescriptor (com.sun.enterprise.deployment.WebComponentDescriptor)2 SecurityRoleMapping (com.sun.enterprise.deployment.runtime.common.SecurityRoleMapping)2 IdempotentUrlPattern (com.sun.enterprise.deployment.runtime.web.IdempotentUrlPattern)2 EjbReference (com.sun.enterprise.deployment.types.EjbReference)2 Set (java.util.Set)2 Cache (org.glassfish.web.deployment.runtime.Cache)2 ClassLoader (org.glassfish.web.deployment.runtime.ClassLoader)2 SunWebAppImpl (org.glassfish.web.deployment.runtime.SunWebAppImpl)2 Application (com.sun.enterprise.deployment.Application)1 ApplicationClientDescriptor (com.sun.enterprise.deployment.ApplicationClientDescriptor)1 EnvironmentProperty (com.sun.enterprise.deployment.EnvironmentProperty)1