use of com.sun.enterprise.deployment.node.InjectionTargetNode 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;
}
Aggregations