public static V1ServiceDescription createServiceDescription(
      boolean requiresRegistration, int numberOfProperties) {
    V1ServiceDescription sd = WSRP1TypeFactory.createServiceDescription(requiresRegistration);

    if (requiresRegistration) {
      List<V1PropertyDescription> descriptions =
          new ArrayList<V1PropertyDescription>(numberOfProperties);
      for (int i = 0; i < numberOfProperties; i++) {
        descriptions.add(
            WSRP1TypeFactory.createPropertyDescription("prop" + i, WSRPConstants.XSD_STRING));
      }
      sd.setRegistrationPropertyDescription(WSRP1TypeFactory.createModelDescription(descriptions));
    }

    return sd;
  }
 public void setServiceDescription(boolean requiresRegistration, int numberOfProps) {
   V1ServiceDescription sd = createServiceDescription(requiresRegistration, numberOfProps);
   offeredPortlets = sd.getOfferedPortlets();
   this.requiresRegistration = sd.isRequiresRegistration();
   registrationProperties = sd.getRegistrationPropertyDescription();
 }