A public inquiry is to be held after an energy company appealed a decision to reject plans to build a major solar farm on greenbelt land in Wakefield.