I have a web service that is running and generates a WSDL file based on data that is stored on the database.
When I update some columns in the database with new data and then reloads the WSDL, the old value is still returned from the web service.
Do I have to enable somthing on the EntityManager (in the java code) or something?
First of all, do you really mean WSDL? I can hardly imagine a system that changes the WSDL (web service contract, in other words interface description) upon change in the database (although of course it is possible).
That being said I assume it is the web service response that changes. Looks like you are using JPA. Most JPA providers add some caching layer. E.g. in Hibernate there is L1 cache, L2 and query cache. If you are modifying the database manually, JPA has no knowledge about these changes and still serves old data.
Please specify which JPA provider you use, typically there is a way to manually flush caches (either in the provider or in the caching library).
UPDATE: It turned out you are using EclipseLink. Please try clearing the cache with the following code:
Now the tricky part – when to call it? The best solution is to execute this functionality every time you modify the database directly. You mentioned it is the PHP scripts that modifies the database directly. Calling Java from PHP can be achieved e.g. with JMX and Jolokia or you can expose yet another SOAP web service.
Another solution is to clear cache periodically if you can live with stale data for a while. On the other hand clearing the cache on every update might be a performance killer.