I’m entirely new to web services and all I’ve been able to do is a Hello World
My situation is the following, I have some servers which provide a WSDL file, all the servers provide the same file and methods, they just have different IPs/ports. In addition each server contains its own set of users.
I know how to communicate to work with one WSDL at a time, but I need 2 things:
- Being able to add web services dynamically (connect/disconnect to other servers)
- Being able to perform methods on the right server as the right user (you cant make a request if your user does not exist on the server you are asking to)
I have no idea of where to start, can someone point me in a direction to solve those 2 problems?
You’re not specific in terms of libraries you use.
For example if you use CXF (Jax-WS in general) you can do the following:
If you’re using Spring for the infrastructure you can autowire all proxies with one statement:
If you want to add web services dynamically you have to decide whether this dynamically means at any time or at application startup – this however has nothing to do with web services – it’s general programming model of autodiscovery (you can use database, one single remote source of available services, etc.)