use of com.sun.enterprise.deployment.node.runtime.common.MessageSecurityBindingNode 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.runtime.common.MessageSecurityBindingNode in project Payara by payara.
the class WebServiceEndpointRuntimeNode 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, WebServiceEndpoint endpoint) {
Node endpointNode = super.writeDescriptor(parent, nodeName, endpoint);
appendTextChild(endpointNode, WebServicesTagNames.PORT_COMPONENT_NAME, endpoint.getEndpointName());
appendTextChild(endpointNode, WebServicesTagNames.ENDPOINT_ADDRESS_URI, endpoint.getEndpointAddressUri());
// this info is described in web application itself.
if (endpoint.implementedByEjbComponent() && endpoint.hasAuthMethod()) {
Node loginConfigNode = appendChild(endpointNode, RuntimeTagNames.LOGIN_CONFIG);
appendTextChild(loginConfigNode, RuntimeTagNames.AUTH_METHOD, endpoint.getAuthMethod());
appendTextChild(loginConfigNode, RuntimeTagNames.REALM, endpoint.getRealm());
}
// message-security-binding
MessageSecurityBindingDescriptor messageSecBindingDesc = endpoint.getMessageSecurityBinding();
if (messageSecBindingDesc != null) {
MessageSecurityBindingNode messageSecBindingNode = new MessageSecurityBindingNode();
messageSecBindingNode.writeDescriptor(endpointNode, WebServicesTagNames.MESSAGE_SECURITY_BINDING, messageSecBindingDesc);
}
appendTextChild(endpointNode, WebServicesTagNames.TRANSPORT_GUARANTEE, endpoint.getTransportGuarantee());
QName serviceName = endpoint.getServiceName();
if (serviceName != null) {
Node serviceQnameNode = appendChild(endpointNode, WebServicesTagNames.SERVICE_QNAME);
appendTextChild(serviceQnameNode, WebServicesTagNames.NAMESPACE_URI, serviceName.getNamespaceURI());
appendTextChild(serviceQnameNode, WebServicesTagNames.LOCAL_PART, serviceName.getLocalPart());
}
appendTextChild(endpointNode, WebServicesTagNames.TIE_CLASS, endpoint.getTieClassName());
if (endpoint.implementedByWebComponent() && (endpoint.getServletImplClass() != null)) {
appendTextChild(endpointNode, WebServicesTagNames.SERVLET_IMPL_CLASS, endpoint.getServletImplClass());
}
// debugging-enabled?
appendTextChild(endpointNode, WebServicesTagNames.DEBUGGING_ENABLED, endpoint.getDebugging());
// property*
Iterator properties = endpoint.getProperties();
if (properties != null) {
RuntimeNameValuePairNode propNode = new RuntimeNameValuePairNode();
while (properties.hasNext()) {
NameValuePairDescriptor aProp = (NameValuePairDescriptor) properties.next();
propNode.writeDescriptor(endpointNode, RuntimeTagNames.PROPERTY, aProp);
}
}
return endpointNode;
}
Aggregations