Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I would like to create a webservice (either SOAP or REST) in java with jdk 1.5 (deployed Weblogic 9.2 which is 1.5 compatible) and the same will be consumed by the client created with jdk1.6. Is the above claim fine? Or both the clinet and the server should be created of the same jdk version?

I know this might be reduntant question, but i'm unable to find a satisfactory answer googling.

  • What are the better options(frameworks,methodology etc.,) to develop java webservices with jdk 1.5 ?
  • SOAP and REST have their own advantages and disadvantages, I would like to know if the clinet is not via a web browser (but a standalone java program or so), then what is the better approach to get along.. SOAP or REST? Added to this, I also need the webservice to be secure i.e, user authenticated possibly..

Thanks.

share|improve this question

1 Answer

The main advantage of Web Services is that the server and client use HTTP and XML or JSON as the communication language and don't have to share anything else in common. The client could be .NET on Windows, and the server could be Java on Linux, or even embedded C inside a smart appliance. If you're wanting to share the actual program code that interprets and uses the data transferred, then you can reuse it most easily if you're using the same platform on both ends, but that's not a requirement.

These days, I would encourage you to see if there's any way possible to use a more modern version of Java. Even Java 6 is deprecated now.

As for frameworks, look at Spring MVC, especially its JSON support. SOAP and REST have more to do with the design of your program logic (REST is basically stateless, which isn't appropriate for all systems).

share|improve this answer
Okie, just to clarify my doubts.. might be silly... When you say use HTTP, you mean via the clinet all i need to have a URLconnection (if its java) to open the connection and consume the service right? Or is there any other option? And I dont have any other option but to use jdk1.5 (weblogic 9.2) because thats what is the prod system is.. I really wanted to use latest stuffs but my hands are tied... :( – Faz Aug 9 at 10:30
To add to this, the clinet will more likely be a standalone program rather than a web project in that case how will Spring MVC suffice? – Faz Aug 9 at 10:32
2  
The idea behind Web Services is that the interface is just an HTTP request with parameters and responses with special meaning--no need to invent (or debug) custom protocols like RMI or CORBA. Anything that has an HTTP library can talk to any server. Technically, you could consume the service from telnet, but you will usually want to use a library that handles the encoding and such for you (e.g., Jackson for JSON). It's actually not uncommon for Web servers to talk to others over Web services, but you'd use Spring MVC for the container providing the services. – chrylis Aug 9 at 10:32
Sorry i couldn't understand the last part of ur answer. COuld you pls elaborate on it? – Faz Aug 9 at 10:36
Not right now; I must go. The Wikipedia article on REST may be helpful in understanding what a REST API looks like in practice. – chrylis Aug 9 at 10:41
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.