KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > verifier > tests > webservices > SEIClassNameCheck


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.tools.verifier.tests.webservices;
24
25 import com.sun.enterprise.deployment.*;
26 import com.sun.enterprise.tools.verifier.*;
27 import java.util.*;
28 import com.sun.enterprise.tools.verifier.tests.*;
29 import java.lang.reflect.*;
30
31 /*
32  * @class.setup_props: ;
33  */

34
35 /*
36  * @testName: check
37  * @assertion_ids: JSR109_WS_15; JSR109_WS_24;
38  * @test_Strategy:
39  * @class.testArgs: Additional arguments (if any) to be passed when execing the client
40  * @testDescription: The developer is responsible for packaging, either by containment or
41  * reference, the WSDL file, Service Endpoint Interface class, Service Implementation Bean
42  * class, and their dependent classes, JAX-RPC mapping file along with a Web services
43  * deployment descriptor in a J2EE module.
44  *
45  * The developer must specify the fully qualified class name of the Service Endpoint
46  * Interface in the service-endpoint-interface element.
47  */

48
49 public class SEIClassNameCheck extends WSTest implements WSCheck {
50
51     /**
52      * @param descriptor the WebServices descriptor
53      * @return <code>Result</code> the results for this assertion
54      */

55     public Result check (WebServiceEndpoint wsdescriptor) {
56
57     Result result = getInitializedResult();
58         ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
59
60         Class JavaDoc cl = loadSEIClass(wsdescriptor,result);
61         if (cl == null) {
62            result.addErrorDetails(smh.getLocalString ("tests.componentNameConstructor",
63                                    "For [ {0} ]", new Object JavaDoc[] {compName.toString()}));
64            result.failed(smh.getLocalString
65                 (getClass().getName() + ".failed",
66                 "The [{0}] Class [{1}] could not be Loaded.",
67                  new Object JavaDoc[] {"SEI", wsdescriptor.getServiceEndpointInterface()}));
68
69         }
70         else {
71
72             result.addGoodDetails(smh.getLocalString ("tests.componentNameConstructor",
73                                    "For [ {0} ]", new Object JavaDoc[] {compName.toString()}));
74             result.passed(smh.getLocalString (getClass().getName() + ".passed",
75                           "The [{0}] Class [{1}] Loaded Successfully.",
76                            new Object JavaDoc[] {"SEI",wsdescriptor.getServiceEndpointInterface()}));
77
78         }
79
80         return result;
81     }
82  }
83
84
Popular Tags