*/
public void validateArtifact() throws WSIException
{
Entry entry = null;
BindingTemplate bindingTemplate = null;
TModel tModel = null;
// it depricated after refactoring
// now the inner classes moved out from validator
//String classPrefix = this.getClass().getName() + "$";
String classPrefix = this.getClass().getPackage().getName()+".";
try
{
// Set up a reference to the UDDI registry
uddiProxy = new UDDIProxy();
//new Socket(new InetAddress(uddiReference.getInquiryURL()));
uddiProxy.setInquiryURL(uddiReference.getInquiryURL());
boolean wasEx = false;
InputStream stream;
try
{
URL url = StringUtils.getURL(null, uddiReference.getInquiryURL());
stream = url.openStream();
stream.close();
}
catch (UnknownHostException ex)
{
wasEx = true;
}
catch (IOException ex)
{
}
if (!wasEx)
{
// If the UDDI reference is to a bindingTemplate then get it
if (uddiReference.getKeyType().equals(UDDIReference.BINDING_KEY))
{
// Get binding detail which will contain the bindingTemplate
BindingDetail bindingDetail =
uddiProxy.get_bindingDetail(uddiReference.getKey());
// Get bindingTemplate
bindingTemplate =
(BindingTemplate) bindingDetail
.getBindingTemplateVector()
.elementAt(
0);
if (verboseOption)
{
System.err.println(
" BindingTemplate - "
+ UDDIUtils.bindingTemplateToString(bindingTemplate));
}
// Get the wsdlSpec tModel
tModel = UDDIUtils.findTModel(uddiProxy, bindingTemplate,
verboseOption);
}
// Else it has to be a tModel
else
{
TModelDetail tModelDetail =
uddiProxy.get_tModelDetail(uddiReference.getKey());
tModel = (TModel) tModelDetail.getTModelVector().elementAt(0);
}
if (verboseOption)
{
System.err.println(
" TModel specified or found in bindingTemplate - "
+ UDDIUtils.tModelToString(tModel));
}
}
if (bindingTemplate == null)
{
setMissingInput(
EntryType.getEntryType(TYPE_DISCOVERY_BINDINGTEMPLATE));
}
// If there is a bindingTemplate, then process test assertions for it
else
{
// Create entry
entry = this.reporter.getReport().createEntry();
entry.setEntryType(
EntryType.getEntryType(TYPE_DISCOVERY_BINDINGTEMPLATE));
entry.setReferenceID(bindingTemplate.getBindingKey());
entry.setEntryDetail(bindingTemplate);
// Process test assertions
processAssertions(
classPrefix,