1 23 package com.sun.enterprise.tools.verifier.tests.wsclients; 24 25 import com.sun.enterprise.deployment.*; 26 import com.sun.enterprise.tools.verifier.*; 27 import com.sun.enterprise.tools.verifier.tests.*; 28 import java.io.IOException ; 29 import java.lang.reflect.*; 30 import java.util.*; 31 32 35 36 44 45 public class MappingFileOnlyIfWSDLFileCheck extends WSClientTest implements WSClientCheck { 46 47 51 public Result check (ServiceReferenceDescriptor descriptor) { 52 53 Result result = getInitializedResult(); 54 ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor(); 55 56 if (!descriptor.hasWsdlFile()) { 57 if (descriptor.hasMappingFile()) { 58 result.addErrorDetails(smh.getLocalString ("tests.componentNameConstructor", 60 "For [ {0} ]", new Object [] {compName.toString()})); 61 result.failed(smh.getLocalString (getClass().getName() + ".failed", 62 "Mapping file specified for this webservice [{0}] without a corresponding WSDL file.", 63 new Object [] {compName.toString()})); 64 } 65 else { 66 result.addGoodDetails(smh.getLocalString ("tests.componentNameConstructor", 68 "For [ {0} ]", new Object [] {compName.toString()})); 69 result.passed(smh.getLocalString (getClass().getName() + ".passed", 70 "No Mapping file specified since there is no WSDL file.")); 71 72 } 73 } 74 else { 75 result.addNaDetails(smh.getLocalString 78 ("tests.componentNameConstructor", "For [ {0} ]", 79 new Object [] {compName.toString()})); 80 result.notApplicable(smh.getLocalString 81 ( getClass().getName() + ".notapp", 82 "Not Applicable since there is a WSDL file specified.")); 83 84 } 85 86 return result; 87 } 88 } 89 90 | Popular Tags |