The Supreme Court in Perth has ruled that West Australian Newspapers does not have to reveal its sources in relation to a series of stories about mining billionaire Gina Rinehart.

Mrs Rinehart had taken legal action against West Australian Newspapers over stories featuring her son John Hancock.

She was seeking access to details of communications between her son and reporter Steve Pennells.

But in a judgment handed down on Tuesday, Justice Janine Pritchard said Mrs Rinehart's subpoena should be set aside as it is oppressive and an abuse of process.

She also found "the disclosure of the evidence would constitute a breach of a fundamental ethical obligation on Steve Pennells as a journalist" and Pennells was "bound by an ethical obligation to respect and observe undertakings of confidence given to sources".

Outside the court, Pennells said the judgement was a relief.

"Having this over your head for 18 months is a big weight on your shoulders," he said.

"But I've had great support from the paper, great support from the union, other journalists in Australia and overseas, it's been amazing. So that's helped a lot."

He described the judgment as a good one for the profession of journalism.

"Not only is it a weight off my shoulders, but it's enshrined in a judgment the things that we hold sacred in journalism: the right to protect sources, the right for people to be able to come to us and tell us things and not be worried that someone can use a court to try and get at them," he said.

Decision hailed as a win for journalism

West Australian editor Brett McCarthy also hailed the court's ruling as a win for all Australian journalists.

"I think it's a spectacular win for journalism - in particular, there's some very strong stuff in the judgment there which really backs up shield laws," he said.

"We have struggled for a long time to get to this point, to get journalist sources respected and protected and the fact that the WA Supreme Court today has ruled the way it has is a great day for us," he said.

Justice Pritchard will consider applications to reopen the case at a directions hearing next month.