FraSCAti can't mock a specific WSDL (because no JAXWS annotations support)
( this issue has been originally reported in the easysoa project at https://github.com/easysoa/esper-frascati-poc/issues/4 )
It seems that FraSCAti does not use CXF JAXWS frontend when exposing a JAXWS annotated java service implementation. We want to make a mockup of an internet exposed service (http://www.webservicex.net/globalweather.asmx?WSDL) with FraSCAti. To do this mockup, we have generated the server classes from the original service with Eclipse web service tool (right-click on WSDL > SOA > Generate server with CXF) and then making a composite file with a binding-ws tag to start the server.
Works well but the mock generated service signature is not the same that the original service signature.
Why ? Because FraSCAti doesn't use the JAX-WS annotations present in the classes so there are two main problems :
- FraSCAti use the interface name for the service name. It is a problem because the generated interface has not necessary the same name than the service. A solution to get around the problem is to rename the interface. In our example : The generated interface is named GlobalWeatherSoap and the service name must be GlobalWeather. In FraSCAti, we have to use in the composite the interface GlobalWeatherSoap so the service name will be GlobalWeatherSoap.
- FraSCAti use for the port name the service name with the prefix 'Port'. It is the main problem because there is no way to change this name ... In ou example : The service implementation class is GlobalWeatherSoapImpl1 with a portname tag = GlobalWeatherSoap, In FraSCAti, the port name will be GloblaWeatherSoapPort.
When the mocked web service is deployed directly on a CXF platform, there is no problem, the signature is fully compatible with the original web service.
Solution is to add a JAX-WS annotation support in FraSCAti for WS server.