use of com.sun.enterprise.deployment.ServiceRefPortInfo 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.ServiceRefPortInfo in project Payara by payara.
the class ServiceInvocationHandler method getPropertiesForCall.
private Set getPropertiesForCall(int methodType, Object[] args) {
Set callProperties = null;
switch(methodType) {
case CREATE_CALL_PORT:
case CREATE_CALL_OPERATION_QNAME:
case CREATE_CALL_OPERATION_STRING:
case GET_CALLS:
// Each of these methods has port as first argument.
QName port = (QName) args[0];
// Check if call properties are set at the port level.
ServiceRefPortInfo portInfo = serviceRef.getPortInfoByPort(port);
if (portInfo != null) {
callProperties = portInfo.getCallProperties();
}
break;
case CREATE_CALL_NO_ARGS:
callProperties = serviceRef.getCallProperties();
break;
default:
break;
}
return callProperties;
}
use of com.sun.enterprise.deployment.ServiceRefPortInfo in project Payara by payara.
the class ServiceReferenceNode method writeDeploymentDescriptor.
public Node writeDeploymentDescriptor(Node parent, ServiceReferenceDescriptor descriptor) {
Node serviceRefNode = super.writeDescriptor(parent, WebServicesTagNames.SERVICE_REF, descriptor);
writeDisplayableComponentInfo(serviceRefNode, descriptor);
appendTextChild(serviceRefNode, WebServicesTagNames.SERVICE_REF_NAME, descriptor.getName());
appendTextChild(serviceRefNode, WebServicesTagNames.SERVICE_INTERFACE, descriptor.getServiceInterface());
appendTextChild(serviceRefNode, TagNames.LOOKUP_NAME, descriptor.getLookupName());
appendTextChild(serviceRefNode, WebServicesTagNames.SERVICE_REF_TYPE, descriptor.getInjectionTargetType());
appendTextChild(serviceRefNode, WebServicesTagNames.WSDL_FILE, descriptor.getWsdlFileUri());
appendTextChild(serviceRefNode, WebServicesTagNames.JAXRPC_MAPPING_FILE, descriptor.getMappingFileUri());
if (descriptor.hasServiceName()) {
QName serviceName = descriptor.getServiceName();
appendQNameChild(WebServicesTagNames.SERVICE_QNAME, serviceRefNode, serviceName.getNamespaceURI(), serviceName.getLocalPart(), descriptor.getServiceNameNamespacePrefix());
}
for (Iterator iter = descriptor.getPortsInfo().iterator(); iter.hasNext(); ) {
ServiceRefPortInfo next = (ServiceRefPortInfo) iter.next();
String sei = next.getServiceEndpointInterface();
Node portComponentRefNode = appendChild(serviceRefNode, WebServicesTagNames.PORT_COMPONENT_REF);
appendTextChild(portComponentRefNode, WebServicesTagNames.SERVICE_ENDPOINT_INTERFACE, sei);
appendTextChild(portComponentRefNode, WebServicesTagNames.ENABLE_MTOM, next.getMtomEnabled());
if (descriptor.getAddressing() != null) {
AddressingNode adNode = new AddressingNode();
adNode.writeDescriptor(portComponentRefNode, WebServicesTagNames.ADDRESSING, descriptor.getAddressing());
}
appendTextChild(portComponentRefNode, WebServicesTagNames.PORT_COMPONENT_LINK, next.getPortComponentLinkName());
}
WebServiceHandlerNode handlerNode = new WebServiceHandlerNode();
handlerNode.writeWebServiceHandlers(serviceRefNode, descriptor.getHandlers());
WebServiceHandlerChainNode handlerChainNode = new WebServiceHandlerChainNode();
handlerChainNode.writeWebServiceHandlerChains(serviceRefNode, descriptor.getHandlerChain());
appendTextChild(serviceRefNode, WebServicesTagNames.MAPPED_NAME, descriptor.getMappedName());
if (descriptor.isInjectable()) {
InjectionTargetNode ijNode = new InjectionTargetNode();
for (InjectionTarget target : descriptor.getInjectionTargets()) {
ijNode.writeDescriptor(serviceRefNode, TagNames.INJECTION_TARGET, target);
}
}
return serviceRefNode;
}
use of com.sun.enterprise.deployment.ServiceRefPortInfo in project Payara by payara.
the class WebServicesDelegateImpl method getBinding.
public MessageSecurityBindingDescriptor getBinding(ServiceReferenceDescriptor svcRef, Map properties) {
MessageSecurityBindingDescriptor binding = null;
WSDLPort p = (WSDLPort) properties.get("WSDL_MODEL");
QName portName = null;
if (p != null) {
portName = p.getName();
}
if (portName != null) {
ServiceRefPortInfo i = svcRef.getPortInfoByPort(portName);
if (i != null) {
binding = i.getMessageSecurityBinding();
}
}
return binding;
}
use of com.sun.enterprise.deployment.ServiceRefPortInfo in project Payara by payara.
the class JAXWSServiceDelegate method getPort.
public Object getPort(Class sei) {
checkUnsupportedMethods(GET_PORT_CONTAINER_MANAGED);
String serviceEndpointInterface = sei.getName();
ServiceRefPortInfo portInfo = serviceRef.getPortInfo(serviceEndpointInterface);
Object retVal;
if ((portInfo != null) && portInfo.hasWsdlPort()) {
retVal = getPort(portInfo.getWsdlPort(), sei);
} else {
retVal = serviceDelegate.getPort(sei);
}
return retVal;
}
Aggregations