public Collection<WebServiceEndpoint> getEndpointsImplementedBy(EjbDescriptor ejb) { Collection<WebServiceEndpoint> endpoints = new HashSet(); if( ejb instanceof EjbSessionDescriptor ) { for(WebServiceEndpoint next : getEndpoints()) { if( next.implementedByEjbComponent(ejb) ) { endpoints.add(next); } } } return endpoints; }
public String getLinkName() { String linkName = null; if( implementedByEjbComponent() ) { linkName = ejbLink; } else if( implementedByWebComponent() ) { linkName = webComponentLink; } return linkName; }
public String getLinkName() { String linkName = null; if( implementedByEjbComponent() ) { linkName = ejbLink; } else if( implementedByWebComponent() ) { linkName = webComponentLink; } return linkName; }
public Collection<WebServiceEndpoint> getEndpointsImplementedBy(EjbDescriptor ejb) { Collection<WebServiceEndpoint> endpoints = new HashSet(); if( ejb instanceof EjbSessionDescriptor ) { for(WebServiceEndpoint next : getEndpoints()) { if( next.implementedByEjbComponent(ejb) ) { endpoints.add(next); } } } return endpoints; }
@Override public void setElementValue(XMLElement element, String value) { String elementName = element.getQName(); if (WLWebServicesTagNames.WEBSERVICE_CONTEXTPATH.equals(elementName)) { //contextPath is ignored for servlet endpoints as they get it from web.xml if(descriptor.implementedByEjbComponent()) { contextPath = value; } } else if (WLWebServicesTagNames.WEBSERVICE_SERVICEURI.equals(elementName)) { String serviceuri = value; serviceuri = (serviceuri.startsWith("/")?"":"/") + serviceuri; descriptor.setEndpointAddressUri(contextPath+serviceuri); } else super.setElementValue(element, value); }
@Override public void setElementValue(XMLElement element, String value) { String elementName = element.getQName(); if (WLWebServicesTagNames.WEBSERVICE_CONTEXTPATH.equals(elementName)) { //contextPath is ignored for servlet endpoints as they get it from web.xml if(descriptor.implementedByEjbComponent()) { contextPath = value; } } else if (WLWebServicesTagNames.WEBSERVICE_SERVICEURI.equals(elementName)) { String serviceuri = value; serviceuri = (serviceuri.startsWith("/")?"":"/") + serviceuri; descriptor.setEndpointAddressUri(contextPath+serviceuri); } else super.setElementValue(element, value); }
public Node writeDescriptor(Node parent, WebServiceEndpoint descriptor) { String ctxtPath; String serviceUri; String endpointAddressUri = descriptor.getEndpointAddressUri(); if (descriptor.implementedByEjbComponent()) { ctxtPath = endpointAddressUri.substring(0, endpointAddressUri.lastIndexOf("/") - 1); serviceUri = endpointAddressUri.substring(endpointAddressUri.lastIndexOf("/")); } else { //for servlet endpoint, use web application context root ctxtPath = descriptor.getWebComponentImpl().getWebBundleDescriptor().getContextRoot(); serviceUri = endpointAddressUri; } Document doc = getOwnerDocument(parent); Element serviceEndpointAddress = doc.createElement(WLWebServicesTagNames.SERVICE_ENDPOINT_ADDRESS); Element ctxtPathEl = doc.createElement(WLWebServicesTagNames.WEBSERVICE_CONTEXTPATH); ctxtPathEl.appendChild(doc.createTextNode(ctxtPath)); serviceEndpointAddress.appendChild(ctxtPathEl); Element serviceuriEl = doc.createElement(WLWebServicesTagNames.WEBSERVICE_SERVICEURI); serviceuriEl.appendChild(doc.createTextNode(serviceUri)); serviceEndpointAddress.appendChild(serviceuriEl); parent.appendChild(serviceEndpointAddress); return serviceEndpointAddress; }
public Node writeDescriptor(Node parent, WebServiceEndpoint descriptor) { String ctxtPath; String serviceUri; String endpointAddressUri = descriptor.getEndpointAddressUri(); if (descriptor.implementedByEjbComponent()) { ctxtPath = endpointAddressUri.substring(0, endpointAddressUri.lastIndexOf("/") - 1); serviceUri = endpointAddressUri.substring(endpointAddressUri.lastIndexOf("/")); } else { //for servlet endpoint, use web application context root ctxtPath = descriptor.getWebComponentImpl().getWebBundleDescriptor().getContextRoot(); serviceUri = endpointAddressUri; } Document doc = getOwnerDocument(parent); Element serviceEndpointAddress = doc.createElement(WLWebServicesTagNames.SERVICE_ENDPOINT_ADDRESS); Element ctxtPathEl = doc.createElement(WLWebServicesTagNames.WEBSERVICE_CONTEXTPATH); ctxtPathEl.appendChild(doc.createTextNode(ctxtPath)); serviceEndpointAddress.appendChild(ctxtPathEl); Element serviceuriEl = doc.createElement(WLWebServicesTagNames.WEBSERVICE_SERVICEURI); serviceuriEl.appendChild(doc.createTextNode(serviceUri)); serviceEndpointAddress.appendChild(serviceuriEl); parent.appendChild(serviceEndpointAddress); return serviceEndpointAddress; }
public DeployedEndpointData(String path, Application app, WebServiceEndpoint endpoint) { super(path, "", ""); this.appName = app.getAppName(); this.endpointName = endpoint.getEndpointName(); this.namespace = endpoint.getServiceName().getNamespaceURI(); this.serviceName = endpoint.getServiceName().getLocalPart(); QName pName = endpoint.getWsdlPort(); this.portName = (pName != null) ? pName.getLocalPart() : ""; this.implClass = endpoint.implementedByEjbComponent() ? endpoint.getEjbComponentImpl().getEjbImplClassName() : endpoint.getServletImplClass(); this.address = path; this.wsdl = address+"?wsdl"; this.tester = address+"?Tester"; this.implType = endpoint.implementedByEjbComponent() ? "EJB" : "SERVLET"; this.deploymentType = "109"; fillStatMap(); }
public String getEndpointAddressUri() { if (implementedByEjbComponent() && !hasEndpointAddressUri()) { setEndpointAddressUri("/" + getWebService().getName() + "/" + getEndpointName()); } return endpointAddressUri; }
String handlerClassName = nextEndpoint.implementedByEjbComponent() ? "org.glassfish.webservices.EjbContainerPreHandler" : "org.glassfish.webservices.ServletPreHandler"; handlerClassName = nextEndpoint.implementedByEjbComponent() ? "org.glassfish.webservices.EjbContainerPostHandler" : "org.glassfish.webservices.ServletPostHandler";
actualAddress.toExternalForm()); String endpointType = next.implementedByEjbComponent() ? "EJB" : "Servlet";
if (endpoint.implementedByEjbComponent()) { implClassName = endpoint.getEjbComponentImpl().getEjbClassName(); } else {
private void collectEjbEndpoints(BundleDescriptor bundleDesc) { WebServicesDescriptor wsDesc = bundleDesc.getWebServices(); for (WebService ws : wsDesc.getWebServices()) { for (WebServiceEndpoint endpoint : ws.getEndpoints()) { //Only add for ejb based endpoints if (endpoint.implementedByEjbComponent()) { ejbendpoints.add(new EjbEndpoint(endpoint.getEndpointAddressUri(), endpoint.isSecure())); } } } //For ejb webservices in war we need to get the extension descriptors //from the WebBundleDescriptor and process those too //http://monaco.sfbay/detail.jsf?cr=6956406 for (EjbBundleDescriptor ejbD : bundleDesc.getExtensionsDescriptors(EjbBundleDescriptor.class)) { collectEjbEndpoints(ejbD); } } public boolean stop(ApplicationContext stopContext) {
appendTextChild(linkNode, WebServicesTagNames.SERVLET_LINK, descriptor.getWebComponentLink()); } else if( descriptor.implementedByEjbComponent() ) { Node linkNode = appendChild(wseNode, WebServicesTagNames.SERVICE_IMPL_BEAN);
appendTextChild(linkNode, WebServicesTagNames.SERVLET_LINK, descriptor.getWebComponentLink()); } else if( descriptor.implementedByEjbComponent() ) { Node linkNode = appendChild(wseNode, WebServicesTagNames.SERVICE_IMPL_BEAN);
if( endpoint.implementedByEjbComponent() && endpoint.hasAuthMethod() ) { Node loginConfigNode = appendChild(endpointNode,
if( endpoint.implementedByEjbComponent() && endpoint.hasAuthMethod() ) { Node loginConfigNode = appendChild(endpointNode,
if( descriptor.implementedByEjbComponent() && descriptor.hasAuthMethod() ) { Node loginConfigNode = appendChild(wseNode,
if( descriptor.implementedByEjbComponent() && descriptor.hasAuthMethod() ) { Node loginConfigNode = appendChild(wseNode,