package com.fileup.upfileclient;
import java.util.Date;
import javax.xml.namespace.QName;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.rpc.client.RPCServiceClient;
/**
* webservice 文件上传测试代码
*
* @author root
*
*/
public class FileUploadClient2 {
public static void main(String[] args) throws Exception {
RPCServiceClient sc = new RPCServiceClient();
Options options = sc.getOptions();
EndpointReference erf = new EndpointReference(
"http://localhost:8088/FileUploadInfo/services/upload_service");
options.setTo(erf);
//查看文件上传后的所在路径删除文件
Object[] opAddEntryArgs = new Object[] { "E:\\WorkSpace\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0\\wtpwebapps\\FileUploadInfo\\WEB-INF\\classes\\upload\\20150511162101.jar" };
// 设置返回值类型
Class<?>[] classes = new Class<?>[] { String.class };
// 命名空间和方法名称
QName qname = new QName("http://upservice.fileup.com", "deleteFile");
// 执行文件删除,接收返回值
Object returnValue = sc.invokeBlocking(qname,
opAddEntryArgs, classes)[0];
System.out.println(new Date() + " 删除结束,返回值:" + returnValue);
}
}
最近下载更多
1358849392 LV21
2023年11月18日
mengyr LV3
2022年3月21日
Gustav_1 LV1
2019年5月29日
plushenko LV1
2019年2月25日
chinafjfzlj LV31
2018年10月27日
zjjhzjb LV15
2018年9月13日
十年后 LV15
2018年5月23日
fengyaofei LV16
2017年12月13日
nan_fan LV10
2017年7月21日
剑是道 LV9
2017年6月23日

最近浏览