Hi Karan
Can you please elaborate on what is your requirement?
Are you planning to use standard SAP's enterprise services, or developing a custom proxy?
For standard enterprise services, if it is already FEH-enabled (you can check by finding the details of the enterprise service in ES workplace http://esworkplace.sap.com/), you should not need to code any more.
If you are developing custom proxy and want to use FEH, then you can follow the blogs above. In the second blog, I have also provided a sample class with the FEH coding. You can use that and extend it further depending on your requirement.
FEH coding is done on the backend systems (ECC, SRM, CRM, etc) and not on PI.
Please check out the following wiki too for more details on FEH/ECH. There are links for further resources there.
http://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=228196499
Rgds
Eng Swee