return messageNode;
}
private void setMiscDescriptors() {
XMLNode parentNode =
getParentNode().getParentNode().getParentNode();
// get the endpoint or portinfo descriptor
Object parentDesc = parentNode.getDescriptor();
if (parentDesc instanceof ServiceRefPortInfo) {
descriptor.setServiceRefPortInfo((ServiceRefPortInfo)parentDesc);
} else if(parentDesc instanceof WebServiceEndpoint) {
descriptor.setWebServiceEndpoint((WebServiceEndpoint)parentDesc);
}
// Get the bundle descriptor of which this belongs
BundleDescriptor bundleDesc = null;
parentNode = parentNode.getParentNode().getParentNode();
if (parentNode.getDescriptor() instanceof WebBundleDescriptor) {
// In the cases of used in
// 1. webservice-endpoint for web component
// 2. port-info for web component
bundleDesc =
(WebBundleDescriptor)parentNode.getDescriptor();
} else if (parentNode.getDescriptor() instanceof BundleDescriptor) {
// In the cases of used in port-info for app client
bundleDesc = (BundleDescriptor)parentNode.getDescriptor();
} else {
// In the case of used in webservice-endpoint for ejb component
if (parentNode.getDescriptor() instanceof EjbDescriptor) {
EjbDescriptor ejbDesc =
(EjbDescriptor)parentNode.getDescriptor();
bundleDesc = ejbDesc.getEjbBundleDescriptor();
} else {
// In the case of used in port-info for ejb component
parentNode = parentNode.getParentNode();
if (parentNode.getDescriptor() instanceof EjbDescriptor) {
EjbDescriptor ejbDesc =
(EjbDescriptor)parentNode.getDescriptor();
bundleDesc = ejbDesc.getEjbBundleDescriptor();
}
}
}
descriptor.setBundleDescriptor(bundleDesc);