Help coderanch get a
new server
by contributing to the fundraiser
  • 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

Howto limit requests to a webservice per day

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

actually I'm trying to limit the requests to a Axis webservice per day.
I want to assure that for example each webservice client can send 100 requests to webservice per day. I want to prevent that someone do batch jobs against the webservice.

Has anyone any ideas how I can achieve this. Perhaps I can outsource this request restriction to a server-side Axis-handler (plugged into the request chain).

Thx a lot in advance.

cheers
Freddy
 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can try that, using handler. Maybe you can keep the current-date, and counter, in a file.
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Frederik W.:
I want to prevent that someone do batch jobs against the webservice.


If your SOAP-request carries a user-token in a SOAP header you could implement this with a JAX-RPC SOAP handler (javax.xml.rpc.handler.Handler).
If you want to do this based on IP-address, you could implement and deploy a javax.servlet.Filter in the web-container that is hosting the JAX-RPC endpoint.
[ July 23, 2006: Message edited by: Peer Reynders ]
 
Frederik W.
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thx for your help

If you want to do this based on IP-address, you could implement and deploy a javax.servlet.Filter in the web-container that is hosting the JAX-RPC endpoint.



Yes I had the same idea ... however my architecture is already using a server-side handler (request chain) , which performs an authentication of the webservice client against a security product (Siteminder) Therefore I already want to block requests at this point.

Perhaps I have to use the file-based approach.

cheers
Freddy
 
eat bricks! HA! And here's another one! And a tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic