FileDocCategorySizeDatePackage
ServiceEngineEndpoint.javaAPI DocGlassfish v2 API7756Mon Jun 18 08:06:20 BST 2007com.sun.enterprise.jbi.serviceengine.core

ServiceEngineEndpoint

public class ServiceEngineEndpoint extends Object
author
Manisha Umbarje

Fields Summary
private Document
wsdlDocument
private com.sun.enterprise.jbi.serviceengine.util.soap.EndpointMetaData
endpointMetaData
private javax.jbi.servicedesc.ServiceEndpoint
jbiEndpoint
private com.sun.xml.ws.api.server.WSEndpoint
wsep
private com.sun.enterprise.deployment.WebServiceEndpoint
endpointDesc
private String
url
private String
sei
private String
implClass
private boolean
jaxwsFlag
private boolean
ejbType
private boolean
enabled
private String
contextRoot
private QName
serviceName
private String
endpointName
private String
applicationName
private ClassLoader
classLoader
Constructors Summary
public ServiceEngineEndpoint(com.sun.enterprise.deployment.WebServiceEndpoint endpointDesc, QName serviceName, String endpointName, String implClass, String contextRoot, boolean enabled)
Creates a new instance of Endpoint


           
      
                                  
                                  
                                  
                                   
                                   
        this.serviceName = serviceName;
        this.endpointName = endpointName;
        this.endpointDesc = endpointDesc;
        setApplicationName(endpointDesc);
        this.url = endpointDesc.getEndpointAddressUri();
        this.ejbType = endpointDesc.implementedByEjbComponent();
        this.sei = endpointDesc.getServiceEndpointInterface();
        this.implClass = implClass;
        this.jaxwsFlag = endpointDesc.getWebService().getMappingFileUri() == null;
        this.enabled = enabled;
        this.contextRoot = contextRoot;    
        this.classLoader = endpointDesc.getBundleDescriptor().getClassLoader();
    
Methods Summary
public java.lang.StringgetApplicationName()

        return applicationName;
    
public java.lang.ClassLoadergetClassLoader()

        return classLoader;
    
public java.lang.StringgetContextRoot()

        return contextRoot;
    
public com.sun.enterprise.deployment.WebServiceEndpointgetEndpointDesc()

        return endpointDesc;
    
public com.sun.enterprise.jbi.serviceengine.util.soap.EndpointMetaDatagetEndpointMetaData()

        if(endpointMetaData == null)
            initializeEndpointMetaData();
        return endpointMetaData;
    
public java.lang.StringgetEndpointName()

        return endpointName;
    
public java.lang.StringgetImplementationClass()

        return implClass; 
    
public javax.jbi.servicedesc.ServiceEndpointgetServiceEndpoint()

        return jbiEndpoint;
    
public java.lang.StringgetServiceEndpointInterface()

        return sei;
    
public javax.xml.namespace.QNamegetServiceName()

        return serviceName;
    
public java.lang.StringgetURI()

        return url;
    
public org.w3c.dom.DocumentgetWsdlDocument()

        return wsdlDocument;
    
public com.sun.xml.ws.api.server.WSEndpointgetWsep()

        return wsep;
    
private synchronized voidinitializeEndpointMetaData()

        if(endpointMetaData == null) {
            try {
                EndpointMetaData emd = new EndpointMetaData(readWSDLDefinition(),
                        serviceName,
                        endpointName);
                emd.resolve();
                endpointMetaData = emd;
            } catch(Exception ex) {
                ex.printStackTrace();
            }
        }
    
public booleanisEnabled()

        return enabled;
    
public booleanisImplementedByEJB()

        return ejbType;
    
public booleanisJAXWSEndpoint()

        return jaxwsFlag;
    
private javax.wsdl.DefinitionreadWSDLDefinition()

        WSDLFactory mFactory = WSDLFactory.newInstance();
        WSDLReader mReader = mFactory.newWSDLReader();
        return (wsdlDocument!=null)?
                mReader.readWSDL(wsdlDocument.getDocumentURI(), wsdlDocument):
                mReader.readWSDL(endpointDesc.getWebService().getGeneratedWsdlFilePath());
    
private voidsetApplicationName(com.sun.enterprise.deployment.WebServiceEndpoint endpointDesc)
For standalone apps get the registration name and for ear applications use the archive Uri. e.g.: 1. For web-app.war, applicationName will be 'web-app' 2. For enterprise-app.ear |__ ejb.jar |__ web.war applicationName will be 'web.war'

        BundleDescriptor bundleDescriptor = endpointDesc.getBundleDescriptor();
        this.applicationName = 
                (bundleDescriptor.getModuleDescriptor().isStandalone())?
                        bundleDescriptor.getApplication().getRegistrationName():
                        bundleDescriptor.getModuleDescriptor().getArchiveUri();
    
public voidsetEnabled(boolean flag)

        enabled = flag;
    
public voidsetEndpointMetaData(com.sun.enterprise.jbi.serviceengine.util.soap.EndpointMetaData emd)

        this.endpointMetaData = emd;
    
private voidsetEndpointName(java.lang.String epName)

        endpointName = epName;
    
public voidsetServiceEndpoint(javax.jbi.servicedesc.ServiceEndpoint jbiEp)

        jbiEndpoint = jbiEp;
        /*
        setServiceName(jbiEp.getServiceName());
        setEndpointName(jbiEp.getEndpointName());
         */
    
private voidsetServiceName(javax.xml.namespace.QName svcName)

        serviceName = svcName;
    
public voidsetWsdlDocument(org.w3c.dom.Document wsdlDocument)

        this.wsdlDocument = wsdlDocument;
    
public voidsetWsep(com.sun.xml.ws.api.server.WSEndpoint wsep)

        this.wsep = wsep;