//IRegistry registry = new RegistryProxy(props);
String userID = "sviens";
String password = "password";
DispositionReport dispReport = null;
try
{
String serviceKey = "5E2D4E60-9876-11D8-AE77-AC68422E7D92";
CategoryBag categoryBag = new CategoryBag();
Vector catKeyRefVector = new Vector();
catKeyRefVector.addElement(new KeyedReference("ntis-gov:NAICS:1997","51121"));
catKeyRefVector.addElement(new KeyedReference("alpha","abcdefghi"));
catKeyRefVector.addElement(new KeyedReference("cff049d0-c460-40c2-91c7-aa2261123dc7","Yadda, Yadda, Yadda"));
catKeyRefVector.addElement(new KeyedReference("1775f0f8-cd47-451d-88da-73ce508836f3","blah, blah, blah"));
categoryBag.setKeyedReferenceVector(catKeyRefVector);
IdentifierBag identifierBag = new IdentifierBag();
Vector idKeyRefVector = new Vector();
idKeyRefVector.addElement(new KeyedReference("alpha","abcdefghi"));
idKeyRefVector.addElement(new KeyedReference("cff049d0-c460-40c2-91c7-aa2261123dc7","Yadda, Yadda, Yadda"));
identifierBag.setKeyedReferenceVector(idKeyRefVector);
BusinessEntity business = new BusinessEntity();
business.setCategoryBag(categoryBag);
business.setIdentifierBag(identifierBag);
Vector businessVector = new Vector();
businessVector.add(business);
BusinessService service = new BusinessService();
service.setCategoryBag(categoryBag);
Vector serviceVector = new Vector();
serviceVector.add(service);
TModel tModel = new TModel();
tModel.setCategoryBag(categoryBag);
tModel.setIdentifierBag(identifierBag);
Vector tModelVector = new Vector();
tModelVector.add(tModel);
dispReport = registry.validateValues(businessVector,serviceVector,tModelVector);
}
catch (RegistryException regex)
{
dispReport = regex.getDispositionReport();
}
Vector resultVector = dispReport.getResultVector();
if (resultVector != null)
{
Result result = (Result)resultVector.elementAt(0);
int errNo = result.getErrno();
System.out.println("Errno: "+errNo);