File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes how can i call the webservices when trigger fire Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "how can i call the webservices when trigger fire" Watch "how can i call the webservices when trigger fire" New topic
Author

how can i call the webservices when trigger fire

yennam reddy
Greenhorn

Joined: Mar 30, 2008
Posts: 4
Hi Everybody,

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


any help would be appreciated,

thanks,
Reddy.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
Welcome to JavaRanch.

What does "when trigger fire" mean? What kind of application is this?


Ping & DNS - updated with new look and Ping home screen widget
yennam reddy
Greenhorn

Joined: Mar 30, 2008
Posts: 4
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
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
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

Joined: Mar 30, 2008
Posts: 4
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
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
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

Joined: Mar 30, 2008
Posts: 4
yes..

how would i call this Webservices before insert?

thanks,
Reddy.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
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

Joined: Apr 10, 2008
Posts: 6
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


Keenon Han<br />SCJP 5.0
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can i call the webservices when trigger fire
 
Similar Threads
calling remote code through sqlj
Can we explicitly call triggers?
Notifiying EJB when database table changes
what is trigger ?
Calling servlet from SQL Server Triggers