}
public void validateContact(org.uddi.api_v3.Contact contact) throws DispositionReportFaultMessage {
// A supplied contact can't be null
if (contact == null)
throw new ValueNotAllowedException(new ErrorMessage("errors.contact.NullInput"));
// At least one personName is required
List<org.uddi.api_v3.PersonName> pnameList = contact.getPersonName();
if (pnameList == null || pnameList.size() == 0)
throw new ValueNotAllowedException(new ErrorMessage("errors.contact.NoPersonName"));
List<org.uddi.api_v3.Address> addressList = contact.getAddress();
if (addressList != null) {
for (org.uddi.api_v3.Address address : addressList) {
if (address != null) {
if (address.getAddressLine() == null || address.getAddressLine().size() == 0)
throw new ValueNotAllowedException(new ErrorMessage("errors.contact.NoAddressLine"));
}
}
}
}