FileDocCategorySizeDatePackage
WebServiceClientCheckMgrImpl.javaAPI DocGlassfish v2 API5831Fri May 04 22:34:20 BST 2007com.sun.enterprise.tools.verifier.wsclient

WebServiceClientCheckMgrImpl

public class WebServiceClientCheckMgrImpl extends CheckMgr implements JarCheck
WebServices harness

Fields Summary
private static final String
testsListFileName
name of the file containing the list of tests for the webservice client architecture
private static final String
sunONETestsListFileName
private String
moduleName
Constructors Summary
public WebServiceClientCheckMgrImpl(FrameworkContext frameworkContext)


       
        this.frameworkContext = frameworkContext;
    
Methods Summary
public voidcheck(com.sun.enterprise.deployment.Descriptor descriptor)
Check Ejb for spec. conformance

param
descriptor WebServices descriptor

        ServiceReferenceDescriptor rootDescriptor = (ServiceReferenceDescriptor) descriptor;
        ModuleType moduleType = rootDescriptor.getBundleDescriptor()
                .getModuleType();
        if (moduleType == ModuleType.EJB)
            moduleName = Result.EJB;
        else if (moduleType == ModuleType.WAR)
            moduleName = Result.WEB;
        else if (moduleType == ModuleType.CAR)
            moduleName = Result.APPCLIENT;
        super.check(rootDescriptor);
    
protected com.sun.enterprise.deployment.BundleDescriptorgetBundleDescriptor(com.sun.enterprise.deployment.Descriptor descriptor)

        return ((ServiceReferenceDescriptor)descriptor).getBundleDescriptor();
    
protected com.sun.enterprise.tools.verifier.tests.ComponentNameConstructorgetComponentNameConstructor(com.sun.enterprise.deployment.Descriptor descriptor)

        return new ComponentNameConstructor((ServiceReferenceDescriptor)descriptor);
    
protected java.lang.StringgetSchemaVersion(com.sun.enterprise.deployment.Descriptor descriptor)
A webservices client can be an application client or an ejb or a web component For a j2ee1.4 specific webservices client the version of client descriptor is 1.1. For jee 5.0 this version is 1.0

param
descriptor
return
webservices client descriptor version

        String wsclientVersion = null;
        String version = ((ServiceReferenceDescriptor) descriptor).getBundleDescriptor()
                .getSpecVersion();
        if(moduleName.equals(Result.EJB)){
            if("2.1".equals(version)) wsclientVersion = "1.1"; // NOI18N
            else if("3.0".equals(version)) wsclientVersion = "1.2"; // NOI18N
        } else if(moduleName.equals(Result.WEB)){
            if("2.4".equals(version)) wsclientVersion = "1.1"; // NOI18N
            else if("2.5".equals(version)) wsclientVersion = "1.2"; // NOI18N
        } else if(moduleName.equals(Result.APPCLIENT)){
            if("1.4".equals(version)) wsclientVersion = "1.1"; // NOI18N
            else if("5".equals(version)) wsclientVersion = "1.2"; // NOI18N
        }
        if(wsclientVersion==null) {
            wsclientVersion = ""; // should we not throw exception?
        }
        return wsclientVersion;
    
protected java.lang.StringgetSunONETestsListFileName()

return
String filename containing sunone tests

        return sunONETestsListFileName;
    
protected java.lang.StringgetTestsListFileName()
return the configuration file name for the list of tests pertinent to the connector architecture

return
String filename containing the list of tests

        return testsListFileName;
    
protected voidsetModuleName(Result r)

        r.setModuleName(moduleName);