I've two different java projects(1 java , 1 JEE). I exposed methods in java project by web-service. I want to invoke that method from another JEE project. Should I copy all classes which are there in java project? Because I've to create an instance of the interface (currently showing compile errors, due to no class ). Is there any solution for this other than importing all classes from java to JEE?
For a WS call you only need the WS client classes, whatever those are. Importing all the classes needed for implementing the WS itself is not necessary. (I am assuming that by "WS call" you mean a call using the SOAP/REST API, and not a direct invocation of the Java method that implements the WS.)