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