Call oracle function through an extension

Call oracle function through an extension

  
How do I call an oracle function (external entity) that returns a ref cursor and assign it to the output structure of an advanced query?