I've created the Java classes using wsdl2java from my wsdl file.
On client side I'm going to create the port (on which I can call the web service) this way
// Creating Service Class
MyServiceService service = new MyServiceService();
// Creating LoggingFeature
LoggingFeature loggingFeature = new LoggingFeature();
// ...
// Crating WebService
MyService ws = service.getMyService(new WSAddressingFeature(), loggingFeature);
// obtaining the Client
Client client = ClientProxy.getClient(ws);
// Modifying the client timeouts and so on...
// ...
// Call the web service method
ws.callMyWebservice(...);
So I can add Features by creating the web service Class. But is it possible to add a Feature after crating the web service Class?
I've only found a way how to list the active features:
Endpoint endpoint = client.getEndpoint();
List<Feature> features = endpoint.getActiveFeatures()
// ...
But this list is only a view of currently active features. Manipulating this list has no effect.