• 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
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

axis error

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, i need some help very badly. I wrote this class to make a web service out of it.
I deployed it on Tomcat server using Axis 1.1. But it does not get deployed -
(cannot see the wsdl and i cannot view it using the axis servlet. But the service
is there in the server-config file. but does not have a log file.)
Can somebody give me a solution?
the service is this.

package project.ws2;
import java.io.*;
public class Batk {


public String kk() {

Runtime r = Runtime.getRuntime();
Process p = null;
String temp="";
try {
p = r.exec("C:\\b.bat");

InputStream i=p.getInputStream();
int data;


while ( ( data=i.read() ) != -1 )

{temp += (char) data;
}//while

i.close();
System.out.println(temp);


}//try


catch (Exception e ) {
System.out.println("Error executing notepad.");
}//catch

return temp;
}//kbat

}//class
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
shouldn't the class name be BatkService??
Regards,
 
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

Originally posted by kishani liyanage:
Hi, i need some help very badly. I wrote this class to make a web service out of it.
I deployed it on Tomcat server using Axis 1.1. But it does not get deployed -
(cannot see the wsdl and i cannot view it using the axis servlet. But the service
is there in the server-config file. but does not have a log file.)
Can somebody give me a solution?


Try to deploy it again, There is no possiblity that a service is displayed in server-config but not in axis servelt, it should throw error while accessing axis servlet again.
Check again you wsdd.
BYW try to print the exception instead of just saying
System.out.println("Error executing notepad.");,
i'm also curious to know wht you are trying to achive in the function String kk()

Pavan!.. the class name can be anything as long as the service name points to the class project.ws2.Batk

 
Pavan Panduga
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry for the wrong information there,
Thank you very much Balaji, for the correction.
Regards,
 
Ranch Hand
Posts: 128
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I would like to know, did you deploy the service through a wsdd or you just copied the class file in the axis folder where it tries to pick up the Class?
The reason why you might not be seeing the wsdl could be because of this, it compiles the class and puts it in the jws classes, but because your class is qualified...I mean defined in a package the default deploying does not work.
Hope I have given a hint atleast
 
He's dead Jim. Grab his tricorder. I'll get his wallet and this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic