A former News of the World reporter accused over his dealings with a soldier in Prince Harry's regiment told jurors that Clarence House had the power to "blacklist" him if relations had turned sour.
Ryan Sabey denies aiding and abetting then lance corporal Paul Brunt to commit misconduct in a public office by providing details about Harry and other soldiers in his unit to the NoW.
In all, Brunt was paid more than £16,000 by the NoW and The Sun for information and pictures about Harry over an 18-month period in 2006 and 2007, the court has heard.
He was the source of a picture for a 2006 story in the NoW entitled Swastika Shame Of Harry's Regiment, for which he was paid £5,000, and also provided information about the royal's deployment to Iraq and Afghanistan, the court has heard.
Giving evidence in his defence in relation to the NoW contact, Sabey said he regarded Brunt as a "whistleblower" who wanted to expose impropriety or wrongdoing.
He told jurors that he was first given Brunt's contact details by his newsdesk and went on to have regular contact with him.
Out of seven NoW payments made to the soldier, only two were related to specific stories while others were for "good will", the court heard.
Defending, Orlando Pownall QC, asked Sabey if there was ever a time when his relationship with Clarence House or the Ministry of Defence appeared to have "soured".
He replied: "No, not at all. All the way through I had a very good relationship with them, a professional relationship with them."
Pownall asked: "If relations with a particular newspaper or an individual employed by a newspaper turned sour what effect would that have?"
The journalist said: "It could have a devastating effect on the newspaper, you would effectively be put on a blacklist from official events, rota events, like the royal wedding.
"It would affect your coverage. You would not have your own man or woman on the ground. You would effectively be covering the royal wedding from the office. "
The barrister asked: "Do you accept ignorance of the law is not a defence?"
Sabey said: "Yes."
Pownall went on: "But in doing what you did, did you consider that right-minded individuals such as this jury would think you were aiding and abetting misconduct in a public officer?"
The defendant replied: "No."
Brunt, 32, of Kentish Town, north London, is charged with misconduct in a public office and Sabey, 34, of Bethnal Green, east London, is charged with aiding and abetting Brunt to commit misconduct in a public office in relation to the NoW. Both men deny the charges against them.