I am new to Java web-services and am working on one currently, using Apache CXF. It will have both JAX-WS(SOAP) and JAX-RS(REST) support. It will be consumed by desktop and mobile applications. In learning Apache CXF, I have come across some showstoppers. Can anyone help me with the flow in terms of layers?
FYI: I have worked with the Google Maps API earlier. I developed a consuming application in .NET, and have a fair idea of web services (both SOAP and REST). I am having problems with these implementation details in Java.
About the service
Here is what I understand. Mule will run on a separate server, and since Mule already supports Apache CXF, it will be able to run both RESTful and SOAP services.
Quick question 1: What is the purpose of Apache CXF in Mule?
Quick question 2: I have seen some Apache CXF RESTful web services without Mule. Does it run in a servlet container in such a case? If yes, how is it different from deploying the web-service in Mule?
About Intgration
The consuming application will run in another server. It will will make SOAP or rest URL calls to the aforementioned web service. Based on the application type, a response will be sent to the consuming application.
Quick question 1: Is my service endpoint common for both REST and SOAP calls?
Quick question 2: Is it even possible to put a RESTful and SOAP web-service on a common endpoint? If not (which I guess is the case most probably), how is the consuming application to know what it is getting?
tl;dr? How does an Apache CXF web service withboth REST and SOAP definitions work when deployed in Mule ESB? What is the end-to-end flow through each layer?