• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Listen for a POST

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I could use pointers to the right resource. The array of data and situations on the net is overwhelming.

I'm working with the interface between two companies.

The first wants to send a "silent post" to an https url hosted by the second company ( I am at the second company ). The first company doesn't need to see a web page, this is an automated process.

What I have to do is receive the post, parse out some data and then update a table in our database.

I presume from my readings this can be done as a servlet, am I correct? Should it be done as a servlet or is there a better approach that occurs to any of you off hand?

I know, they are newbish questions. I don't need anyone to write the code for me, just point me in the right directions. As usual, this has to be done in a short time frame and I'm under the gun.

Thanks
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi George,

Yes, you're correct that you could use a servlet. You could also use a restful webservice which would also be a nice solution too.
more on that at:
http://courses.coreservlets.com/Course-Materials/csajsp2.html
http://www.jboss.org/resteasy

Note that using both of those will require that your application run inside a Container, like tomcat. It's a lil bit more complicated than using plain java SE,
but will enable your application to the web.

There's also the option of using sockets, by in my point of view that would be very primitive AND it would give you a LOT more trouble.
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I agree with Greenhorn you can use servlet for this but best solution is web service , you can use SOAP for this.
 
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

abani patra wrote:I agree with Greenhorn you can use servlet for this but best solution is web service , you can use SOAP for this.


Yes, you can use SOAP, but why would you? Eduardo already mentioned RESTful web services, which should be the first tool of choice, unless and until it's clear that SOAP's capabilities are actually required. You certainly shouldn't claim it's the "best" solution, because that depends on the requirements about which we know just about nothing.

And yes, you can use servlets to implement simple RESTful web services, but I would advise to use a library like Jersey instead; it makes coding the service much simpler.
 
reply
    Bookmark Topic Watch Topic
  • New Topic