re: [slove]Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled
2007-07-09 17:06 |
我还是不能,操作应该正确的,但就是显示总是:代码如下
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.encoding.XMLType;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public class Client {
public static void main(String[] args) throws Exception {
String endpoint = "
http://61.164.53.250/LZL_SMS_Service.dll";
//String endpoint = "
http://61.164.53.250/LZL_SMS_Service.dll/?";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName("SubmitShortMessage");
call.addParameter("UserName", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("UserPW", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("AtTime", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("SourceAddr", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("DestAddr", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("Content", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("ServiceID", XMLType.XSD_INT, ParameterMode.IN);
call.setReturnType(XMLType.XSD_INT);
Integer ret = (Integer) call.invoke(new Object[] { new String("ling"), new String("password"),new String
("19:20:20"),new String("source"),new String("dest"),new String("content"),new Integer(3)});
System.out.println("The value of webservice return is :" + ret);
}
}
回复 更多评论