一个发短信的类,明天就要用,急死了,总是报错,请各位帮帮我啊!谢谢!在线等
package cndr;
import com.meterware.httpunit.*;
import java.io.IOException;
import java.net.MalformedURLException;
import org.xml.sax.SAXException;
import share.sys.Logs;
public class Sms{
public boolean sendSms(String msg,String mobile) throws IOException,MalformedURLException,SAXException{
try{
WebConversation wc = new WebConversation();
WebResponse wr = wc.getResponse("http://210.51.188.143:8088/51sms/Delsms.action?customernum=81&mycontent=" + msg + "&password=123456&mobile=" + mobile);
String result=wr.getText();
Logs.logout(result);
Logs.logout("短信:http://210.51.188.143:8088/51sms/Delsms.action?customernum=81&mycontent=" + msg + "&password=123456&mobile=" + mobile);
return true;
}catch(Exception e){
return false;
}
}
}
总是提示import com.meterware.httpunit.*;有错
请各位帮帮我啊!