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

axis error

 
kishani liyanage
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • 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
 
Pavan Panduga
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shouldn't the class name be BatkService??
Regards,
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
sorry for the wrong information there,
Thank you very much Balaji, for the correction.
Regards,
 
Raj Chila
Ranch Hand
Posts: 128
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic