Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6663065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:27:31+00:00 2026-05-26T02:27:31+00:00

Hi I want to implement a web service on a remote application server that

  • 0

Hi I want to implement a web service on a remote application server that will perform write actions to the database. Another application running on another application server will be consuming those web services that are exposed. How would I go about doing this? I was reading the Spring documentation and there is talk of using contract first web services and using the MessageDispatcherServlet. Then in another section called “remoting”, I read about Hessian and Burlap which communicate over HTTP.

There are so many options, which one should I choose?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:27:31+00:00Added an answer on May 26, 2026 at 2:27 am

    the answer, as with so many things, depends.

    if both your client and your server are only Java, and will not be anything else, and you have the ability to deploy new versions of the jars for both the client and the server at the same time (e.g., you can restart both the client and the server whenever a change in the java classes occurs), then consider Spring’s RPC “remoting” support. The remoting support basically works by taking the interface of an object and interacting with it from another machine. It is tightly coupled to that interface. But, this approach has the benfit of being convenient to use and it requires very little to take an existing POJO and export it as a service. Additionally, RPC mechanisms tend to not rely on the HTTP protocol, so if you’re serious about speed and you feel like you can’t afford to even have the hTTP exchange on the wire in your invocations, then consider one of the “remoting” options. Spring core supports RMI, HTTP-Invoker, Burlap and Hessian. I’ve implemented support for numerous other exporters that use more contemporary RPC technologies like Thrift, MessagePack, JBoss Remoting, and Avro. All of these technologies offer their own “serialization” technique which in turn comes with its own advantages and drawbacks, just as RMI, Hessian and Burlap do.

    All that said, the “remoting” support is probably not the safest option because the client and the server are tightly coupled: if you change the java class used on the server, youll need to change the Java class used on the client.

    Instead, prefer a “document-oriented” approach like REST, or Spring’s contract-first web services.In these technologies, you have two steps for the minimal web service: you define your Java service(s) with their associated return types and objects, and then you define the interface in terms of HTTP endpoints and the associated documents you’re prepared to handle at those endpoints. The “documents” you send, for example, over REST, may be XML documents, or they may be JSON documents, or any of a number of types of encoding. The point is that they are transmitted using HTTP and there must be machinery in place, like Spring MVC, to receive those documents and transform them into objects that are meaningful to your application. The nice part about doing things this way is that you can evolve the actual java service and the clients – who consume the HTTP endpoints and not the Java interface – are none the wiser.

    The REST support in Spring MVC 3 is very, very powerful and easy to get started with. Spring uses an SPI interface called HttpMessageConverter to transform HTTP requests from JSON or XML into Java objects that you can interface with in your code, and to transform objects from your code into documents that can be sent as HTTP responses. Spring MVC automatically registers a HttpMessageConverter if you have the Jackson JSON library on the classpath, and it registers JAXB support if you have JAXB on your classpath. Using JAXB, for example, is definitely out of the scope of this question, but you can look it up pretty readily. Spring will automatically respond to an HTTP request based on the type of the HTTP request’s “Accept” header. If you specify, “Accept=application/xml” then it’ll look for the appropriately registered HttpMessageConverter to transform the result into XML. It does the same for other “Accept” header values.

    RESTful web services, or SOAP-based, contract-first are of course subject to the speed of the underlying HTTP exchange. Additionally, SOAP or REST XML documents or even JSOn documents can be bloated, and inefficient across the wire. So, you can implement more efficient HttpMessageConverters. I have provided a HttpMessageConverter that lets you do RESTful exchanges using Avro, Thrift, Snappy (a compression library), Google Protocol Buffers, and MessagePack. Now, of course, even with these, you’re still subject to the latency intrinsic to HTTP, but at least the payloads themselves can be as efficient as possible. The message converters are effectively different ways of serializing, or encoding, the payloads. Instead of JSON, or XML, you simply use one of these instead. For examples, consult the tests in that package. For good, getting started examples check out hte Spring MVC showcase

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to implement a Web Service that will allow users to store arbitrary
I have a j2ee web application running on Spring framework. I want to implement
I have a Web Service, Now I want to implement security model for that,
I want to implement a web service for an Enterprise Application. Security is a
I want to implement a web-based IM service on the lines Meebo. Might sound
I want to implement a Facebook updates(user action and notifications) on my web application
I want to implement program by c# application. first of all I need web
Is it possible implement an Android application as a web service ? On the
How can I implement a web service in WCF such that it does not
I want to implement a Web Service whose purpose is to execute batch programs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.