Search code examples
web-servicescxfjax-ws

publishing different services with same url and managing them separately


We have more than 2000 business methods which we want to expose as soap web service. We decided to use cxf with apache camel for this. We want to publish all these services from same url since we think management of them would be easier(especially for customers who call many web services). However we also have some requirements like:

  • method based log enabling
  • method based setting timeout
  • method based mtom/base64 setting and etc.

My question is, if its possible to publish all the services from same url(same SEI) and also being able to provide all these requirements. And also if we manage to do this, will it be a good and scalable solution?


Solution

  • method based log enabling

    If you have 2000 methods in your business logic, I guess you also have logging. You can define multiple loggers for your webservice and use in every method at your convenience

    method based setting timeout

    CXF allow to configure ReceiveTimeout at server endpoint configuration, so if you use one endpoint, then the timeout will be the same for all your methods

    method based mtom/base64 setting and etc.

    MTOM is configured by JAX-WS server, enabling or disabling it. Also the methods will have an specific DataHandler to support it. One endpoint means one MTOM configuration

    In this link you can see the http-transport variables set by server. Other utilities like interceptors, bus or fault handlers are also configured by JAX-WS server. Check here if any is of interest

    will it be a good and scalable solution?

    As stated @kolossus, 2k methods is a solution weird. I do not think you have performance problems, but it will difficult to develop and maintain. Think you can also provide a built client, instead of only the WSDL, that encapsulates several endpoint