how to solve this
i am using netbeans and i have followed like this
1.creating entities from database
2.creating restful web service from entiies
3.creating restful javascript client from restful web service

the foriegn key table which have different schema

the foriegn key table which have same schema (which is the correct way)

You can also reverse engineer more than one schema by specifying a doubled-quoted space-separated list of schemas. Reverse engineering of foreign-key releationships between tables in different schemas is supported. For example:
This will reverse engineer all tables from schemas "schema1", "schema2", and "schema3".