• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Can i host web service through batch file

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

i just want to host my web service from batch file.

my batch files are exe(java).

consider my java file is two method add and subract

i want to host this methods as web service from batch files

my batch file run in d:/imwf/java

how to host web service in tomcat remotely without putting my class file inside the tomcat??
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A web service has to respond to requests - how were you planning to receive a request if not through a web server like Tomcat?
Define how you want the outside world to communicate with your service.
Bill
 
kannagiri rosei
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi


i am creating java exe using batchfile. am calling batchfile

inside my Mqworkflow BuildTime - process Template i configured the exe .


when the document is triggerred from mq workflow it will execute my java exe and move to next activity based on some condition in sample.FDL file.


i assume that u know Mq workflow that is qhy am writing this mail to u.


here when my batch file runs in the Mq workflow - process.


my web service need three input from third party guys

based on that input i use my logic.


when i start trigger the process from MQ workflow.
is it possible to call web service?
inside my exe.

like my class file is here (path).(D;//imwf/java/giri.jar

is it possible to configure tomcat to directly call this jar(outside WEB-INF)
execute request/responses.
[ December 05, 2005: Message edited by: kannagiri rosei ]
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kannagiri,
Earlier you mentioned you want to host a webservice. If I understood correctly, now I guess you want to know how to call and consume an existing webservice ??
Is that right ? If yes.. then its possible. Try to see how java client samples that is shipped with Apache Axis.
Import or refer the necessary class for consuming the webserivce along with your giri.jar file. Then you should be able to consume a webservice.
Axis Samples:http://cvs.apache.org/viewcvs.cgi/ws-axis/java/samples/
 
kannagiri rosei
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no balaji


the path i mentioned will be executed in Mqworkflow configuration.
path=D;/imwf/java/giri.jar

i configure giri.jar file will be condigured out side web app.

my batch files will be there in the path.

simply i will take this path and inside MQ workflow -process template i will give this path.

when i start MQ it auotmatically executes java exe.

now tell me
my web service method which is hosted on TOMCAT.

when client call my web service
method add 4 5
i need pass those (4,5) parameters from (integration-any external program) externally to use inside my batch file.

when they access my URL defintely it will execute inside web-inf/classes/myservice -this class i want automatically executed
in my batch file-any way


please tell me.
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok...
Calling webservice is as simple as running a java method/function.
For example...
if you want your giri.jar to send an email, then you will need the mail.jar file configured to your MQ workflow..
That is mail.jar file should be available at runtime classpath. Otherwise the system will throw "class not found exception.."
Please let me know whether you understood the above logic ??

Simillar to that calling a webservice requires you have some jar files configured to your workflow. Once done, you can call a webserivce.
 
kannagiri rosei
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi balaji.

i can call a web service,but i want to host my webservice method

is outside webserver.(remotely).

let me clear:
==============

1. my method is in c:/imwf/java

2. i used deploy.wsdd -the class files if i copy it in web server/web-inf/classes only it will work write?

3.i don't want that, my class files will be here
D:/imwf/java if i run deploy.wsdd it should automatically connect web server
and my method in the path should execute.the path i specified that method should execute.


but what actually is doing here is in axis when i deploy.wsdd?

am running deploy.wsdd in the path D:/imwf/java/MyService //org.apache.axis.client.AdminClient deploy.wsdd
next:
=====
please this issue only?

weather should i have to copy these files in web-inf/classes dir

or it is automatically copy's the files inside webinf/classes/

if this happens automatically?


D;/imwf/java/myservice will execute or tomcat server/myservice will execute?

please tell me.

where the my service method will be called.
 
Watchya got in that poodle gun? Anything for me? Or this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic