aspose file tools*
The moose likes Web Services and the fly likes axis error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "axis error" Watch "axis error" New topic
Author

axis error

kishani liyanage
Ranch Hand

Joined: Dec 08, 2003
Posts: 40
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
Pavan Panduga
Ranch Hand

Joined: Jun 12, 2002
Posts: 68
shouldn't the class name be BatkService??
Regards,
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
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


Spritle Software Blogs
Pavan Panduga
Ranch Hand

Joined: Jun 12, 2002
Posts: 68
sorry for the wrong information there,
Thank you very much Balaji, for the correction.
Regards,
Raj Chila
Ranch Hand

Joined: Mar 18, 2004
Posts: 128

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
 
jQuery in Action, 2nd edition
 
subject: axis error