Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Major differences between J2EE and C#/.Net when developing Web Services

Having been primarily a .NET guy up until starting a new job recently; I've only done Web-Service development and consumption in C#/.Net. However I'm embarking on the journey to learn the ins and outs of doing it on the J2EE platform, and I'm curious what the major differences are in this specific type of development.

Note: I have familiarity with the Java Language at the console/simple interface level, but not much experience with "How to put together a functional Web Service Architecture" using it.

Update: Great answers so far, I just wanted to add however that in the simple web-service class structure they don't seem to display too many differences; but how about from the perspective of putting it all together with DB logic and actually hosting it - getting the service running and working/how its interacted with.

like image 458
Jeff Dalley Avatar asked Jul 08 '09 19:07

Jeff Dalley


1 Answers

While there is only one way to do Web Services in .NET using Microsoft Technology, Java Web Services are very fragmented. See this question for example. Most frameworks can do both contract-first (start from the WSDL file) and code-first (start from source code) web services. Each framework has also its way of hosting the Web Service. Axis2 framework for example deploys the web services as AAR files inside the Axis2 Web Application. Other frameworks deploy the web services inside a WAR file (Axis2 can also do).

For people coming from .NET to Java it is always a problem to pick a Web Services framework. IDE integration is also not so good as it is with Visual Studio.

If you are new in J2EE, I recommend to have a look at Spring framework. Spring has a sub-project (Spring-WS) that allows you to create contract-first web services. Integration with DB and application logic is much easier with a dependency injection framework like Spring. Apache CXF also integrates nicely with Spring.

like image 182
kgiannakakis Avatar answered Sep 20 '22 20:09

kgiannakakis