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 6584107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:29:45+00:00 2026-05-25T16:29:45+00:00

I am designing a Java web application that makes heavy use of AJAX (for

  • 0

I am designing a Java web application that makes heavy use of AJAX (for user experience – no reloads, etc.). I also have the need to expose a large number of web services because there will be many different clients (not just web browsers) connecting to the Java EE backend.

This got me thinking that it might just make sense for my AJAX XmlHttpRequests to somehow (magically) envelope a SOAP message and talk directly with my existing web servers, so I’m not writing duplicate code. Although I don’t really know how I’ll do that at this point, I know its possible because I’ve already found a few articles on doing just that.

I’m not concerned with whether or not I can have AJAX content post to a Java web service; I’m concerned with whether or not I should be doing this.

Is this a discouraged practice? Are there security vulnerabilities or performance issues I need to be aware of? It makes sense to do this from a reusability and system consistency point of view, but I’m neither an AJAX or Java EE expert to know any better here.

I guess I’m just interested in some educated opinions. And, as always, thanks!

  • 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-25T16:29:46+00:00Added an answer on May 25, 2026 at 4:29 pm

    I think that you are definitely on the right track: try to DRY and reuse your code wherever it is sensible. Your approach is – in my opinion – very good, so I just have a few remarks to maybe point you in the direction you would like to go anyway.

    In my humble opinion, especially when you are dealing with AJAX, Json would be a much handier format for your data: your AJAX code can directly work with the supplied data structures, you save a lot of data overhead (especially if you are considering using the services a lot) and – but that is very subjective – Json is a much more elegant data format.

    I don’t know what your other clients expect from your webservices, but if you are not fixed on the format of the messages being transmitted (although you did mention SOAP and XML), they could consume and produce Json, too.

    A very handy framework to produce and consume Json is Jersey, if you are just looking into parsing and creating Json, I really like Gson from Google.

    I would suggest you look into RESTful webservices, especially when combined with Java EE. If you are working with a Java EE 6 compliant server, creating RESTful webservices is very easy. They even can produce and consume different kinds of data formats – Json and XML for example.

    Good luck! 🙂

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

Sidebar

Related Questions

I am designing a web application that does server side image processing in real
I need your suggestions in designing a Java/J2EE web based application. Here are its
I am designing a web application where i want to use maximum of struts
I'm designing a concurrent Java application that reads data from various medical devices available
I am designing a psychology experiment with java applets. I have to make my
When designing user table what would be the must have fields from the security/user
For a current project, we're designing a client desktop application that parses text files
I am creating a new web service for an application and am currently designing
I am in the process of designing a trading application which will use a
I'm on the process of designing a web application based on Google App Engine

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.