Espionage means illegally obtaining a classified information. it doesn't matter what the spy's nationality is. if the foreign spy is captured, he/she will be charged with espionage in the country and be locked up at a classified location for life.
it is common tactic for both countries to negotiate with thru secret proxy to make a valuable exchange. I think we will see something like this in WikiLeaks.
Remember Anna Chapman?

She's a very hot Russian spy in America. She was recently arrested by FBI... along with 11 other Russian spies. They're held without bail at undisclosed location.