From TomMettam: Calculate port based on schema if the port is not explicitly set.