Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can i call the webservices when trigger fire

 
yennam reddy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everybody,

iam new to webservices how can i call the webservices when trigger fire?.


any help would be appreciated,

thanks,
Reddy.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

What does "when trigger fire" mean? What kind of application is this?
 
yennam reddy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it's a webapplication having 2 databases if values inserted in one database i have to write a trigger event to call webservice part...

values inserted-->databse-->trigger-->webservices

advice me

reagards,
Reddy
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on what the trigger mechanism of the database in question can do. I'd say that invoking a web service from within a trigger is not good design.

I'll move this to the JDBC forum. Tell us what DB you're using, and someone may be able to point you in the right direction.
 
yennam reddy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please suggest me...


i have a webapplication through one jsp file iam inserting the values into oracle10g databse. Before inserting the values i have to call the webservices for other application it is also webapplication through this application we insert the values into another database...

thanks,
Reddy.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what you actually want to do is not to have the DB trigger the WS call, but to perform the WS call before the DB insert? This sounds different from what you described earlier.

By "trigger" do you mean a SQL trigger?
 
yennam reddy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes..

how would i call this Webservices before insert?

thanks,
Reddy.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'd call it the same way you'd call any other WS. It doesn't matter that the calling application is a web app, or that you intend to perform a DB insert operation afterwards.

Or is your question really "How do I call a WS from within Java code?"

Moving back to the Web Services forum, as it turns out this doesn't have anything to do with databases.
 
Keenon Han
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or is your question really "How do I call a WS from within Java code?"
------------------------------------------------

Hello Ulf,

I am relatively new to webservices and I would like to know the answer to what you have quoted above. I have a web application that needs to call a WS from within. How do I do this? I understand I may have to add some jars in my application is that right? Can you also point me to some useful web service tutorials sight that you know? Right now I have a WSDL file which i will have to access once I get pass a step in my application process and I am not sure which concepts to study to help me achieve what I want. I would really appreciate your response. Thank you.

Rgs,
Keen
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Keenon, welcome to JavaRanch.

That's a big topic! Most Java WS implementations have a tool that can take a WSDL and generate Java client code from it. E.g., if you use Axis 2 (a popular choice) it's called "wsdl2java".

For something simpler (and on a lower level), here's a simple Java client that can be adapted to work with many web services.

The http://faq.javaranch.com/java/WebServicesFaq has a number of links to introductory articles and such.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic