use of com.sun.enterprise.deployment.node.NameValuePairNode in project Payara by payara.
the class ServiceRefNode method writeDescriptor.
/**
* write the descriptor class to a DOM tree and return it
*
* @param parent node for the DOM tree
* @param node name for the descriptor
* @param the descriptor to write
* @return the DOM tree top node
*/
public Node writeDescriptor(Node parent, String nodeName, ServiceReferenceDescriptor serviceRef) {
Node serviceRefNode = super.writeDescriptor(parent, nodeName, serviceRef);
appendTextChild(serviceRefNode, WebServicesTagNames.SERVICE_REF_NAME, serviceRef.getName());
ServiceRefPortInfoRuntimeNode portInfoRuntimeNode = new ServiceRefPortInfoRuntimeNode();
Set<ServiceRefPortInfo> portsInfo = serviceRef.getPortsInfo();
for (ServiceRefPortInfo next : portsInfo) {
portInfoRuntimeNode.writeDescriptor(serviceRefNode, WebServicesTagNames.PORT_INFO, next);
}
NameValuePairNode nameValueNode = new NameValuePairNode();
for (NameValuePairDescriptor next : serviceRef.getCallProperties()) {
nameValueNode.writeDescriptor(serviceRefNode, WebServicesTagNames.CALL_PROPERTY, next);
}
if (serviceRef.hasWsdlOverride()) {
URL wsdlOverride = serviceRef.getWsdlOverride();
appendTextChild(serviceRefNode, WebServicesTagNames.WSDL_OVERRIDE, wsdlOverride.toExternalForm());
}
appendTextChild(serviceRefNode, WebServicesTagNames.SERVICE_IMPL_CLASS, serviceRef.getServiceImplClassName());
if (serviceRef.hasServiceName()) {
Node serviceNameNode = appendChild(serviceRefNode, WebServicesTagNames.SERVICE_QNAME);
QName serviceName = serviceRef.getServiceName();
appendTextChild(serviceNameNode, WebServicesTagNames.NAMESPACE_URI, serviceName.getNamespaceURI());
appendTextChild(serviceNameNode, WebServicesTagNames.LOCAL_PART, serviceName.getLocalPart());
}
return serviceRefNode;
}
use of com.sun.enterprise.deployment.node.NameValuePairNode in project Payara by payara.
the class ServiceRefPortInfoRuntimeNode method writeDescriptor.
/**
* write the descriptor class to a DOM tree and return it
*
* @param parent node for the DOM tree
* @param node name for the descriptor
* @param the descriptor to write
* @return the DOM tree top node
*/
public Node writeDescriptor(Node parent, String nodeName, ServiceRefPortInfo desc) {
Node serviceRefPortInfoRuntimeNode = super.writeDescriptor(parent, nodeName, desc);
appendTextChild(serviceRefPortInfoRuntimeNode, WebServicesTagNames.SERVICE_ENDPOINT_INTERFACE, desc.getServiceEndpointInterface());
QName port = desc.getWsdlPort();
if (port != null) {
Node wsdlPortNode = appendChild(serviceRefPortInfoRuntimeNode, WebServicesTagNames.WSDL_PORT);
appendTextChild(wsdlPortNode, WebServicesTagNames.NAMESPACE_URI, port.getNamespaceURI());
appendTextChild(wsdlPortNode, WebServicesTagNames.LOCAL_PART, port.getLocalPart());
}
// stub-property*
NameValuePairNode nameValueNode = new NameValuePairNode();
Set stubProperties = desc.getStubProperties();
for (Iterator iter = stubProperties.iterator(); iter.hasNext(); ) {
NameValuePairDescriptor next = (NameValuePairDescriptor) iter.next();
nameValueNode.writeDescriptor(serviceRefPortInfoRuntimeNode, WebServicesTagNames.STUB_PROPERTY, next);
}
// call-property*
for (Iterator iter = desc.getCallProperties().iterator(); iter.hasNext(); ) {
NameValuePairDescriptor next = (NameValuePairDescriptor) iter.next();
nameValueNode.writeDescriptor(serviceRefPortInfoRuntimeNode, WebServicesTagNames.CALL_PROPERTY, next);
}
// message-security-binding
MessageSecurityBindingDescriptor messageSecBindingDesc = desc.getMessageSecurityBinding();
if (messageSecBindingDesc != null) {
MessageSecurityBindingNode messageSecBindingNode = new MessageSecurityBindingNode();
messageSecBindingNode.writeDescriptor(serviceRefPortInfoRuntimeNode, WebServicesTagNames.MESSAGE_SECURITY_BINDING, messageSecBindingDesc);
}
return serviceRefPortInfoRuntimeNode;
}
use of com.sun.enterprise.deployment.node.NameValuePairNode in project Payara by payara.
the class WLServiceRefPortInfoRuntimeNode method writeDescriptor.
/**
* write the descriptor class to a DOM tree and return it
*
* @param parent node for the DOM tree
* @param nodeName node name for the descriptor
* @param desc the descriptor to write
* @return the DOM tree top node
*/
public Node writeDescriptor(Node parent, String nodeName, ServiceRefPortInfo desc) {
Node serviceRefPortInfoRuntimeNode = super.writeDescriptor(parent, nodeName, desc);
QName port = desc.getWsdlPort();
if (port != null) {
appendTextChild(serviceRefPortInfoRuntimeNode, WLWebServicesTagNames.SERVICE_REFERENCE_PORT_NAME, port.getLocalPart());
// stub-property*
NameValuePairNode nameValueNode = new NameValuePairNode();
Set stubProperties = desc.getStubProperties();
for (Iterator iter = stubProperties.iterator(); iter.hasNext(); ) {
NameValuePairDescriptor next = (NameValuePairDescriptor) iter.next();
nameValueNode.writeDescriptor(serviceRefPortInfoRuntimeNode, WebServicesTagNames.STUB_PROPERTY, next);
}
// call-property*
for (Iterator iter = desc.getCallProperties().iterator(); iter.hasNext(); ) {
NameValuePairDescriptor next = (NameValuePairDescriptor) iter.next();
nameValueNode.writeDescriptor(serviceRefPortInfoRuntimeNode, WebServicesTagNames.CALL_PROPERTY, next);
}
}
return serviceRefPortInfoRuntimeNode;
}
use of com.sun.enterprise.deployment.node.NameValuePairNode in project Payara by payara.
the class WLServiceRefNode method writeDescriptor.
/**
* write the descriptor class to a DOM tree and return it
*
* @param parent node for the DOM tree
* @param nodeName for the descriptor
* @param serviceRef the descriptor to write
* @return the DOM tree top node
*/
public Node writeDescriptor(Node parent, String nodeName, ServiceReferenceDescriptor serviceRef) {
Node serviceRefNode = super.writeDescriptor(parent, nodeName, serviceRef);
appendTextChild(serviceRefNode, WebServicesTagNames.SERVICE_REF_NAME, serviceRef.getName());
if (serviceRef.hasWsdlOverride()) {
URL wsdlOverride = serviceRef.getWsdlOverride();
appendTextChild(serviceRefNode, WLWebServicesTagNames.SERVICE_REFERENCE_WSDL_URL, wsdlOverride.toExternalForm());
}
NameValuePairNode nameValueNode = new NameValuePairNode();
for (Iterator iter = serviceRef.getCallProperties().iterator(); iter.hasNext(); ) {
NameValuePairDescriptor next = (NameValuePairDescriptor) iter.next();
nameValueNode.writeDescriptor(serviceRefNode, WebServicesTagNames.CALL_PROPERTY, next);
}
WLServiceRefPortInfoRuntimeNode portInfoRuntimeNode = new WLServiceRefPortInfoRuntimeNode();
Set portsInfo = serviceRef.getPortsInfo();
for (Iterator iter = portsInfo.iterator(); iter.hasNext(); ) {
ServiceRefPortInfo next = (ServiceRefPortInfo) iter.next();
portInfoRuntimeNode.writeDescriptor(serviceRefNode, WLWebServicesTagNames.SERVICE_REFERENCE_PORT_NAME, next);
}
return serviceRefNode;
}
Aggregations