split service generation method into smaller methods.
added shipping of declared exceptions.