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;
}
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);
}
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()]));
}
}
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;
}
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);
}
}
}
}
Aggregations