`
jiaguwen123
  • 浏览: 405382 次
  • 性别: Icon_minigender_2
  • 来自: 深圳
社区版块
存档分类
最新评论

webservice

 
阅读更多
import org.codehaus.xfire.client.Client;

import com.utils.MD5;

import java.net.MalformedURLException;
import java.net.URL;

public class HelloWebService {
Object[] results;
public  void q() {
try {
Client client = new Client(new URL("http://127.0.0.1/WebService//services/UpbmsService?wsdl"));//发起端IP+合作商密钥+action+xml+cooperatorID
            results = client.invoke("cooperator", new Object[] {"CMT0032","02","20101001243644651011",o,md});
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
String result="";
result = (String)results[0];
}
public static void main(String[] args) throws Exception
{
HelloWebService hws = new HelloWebService();
hws.q();
}
}
http://www.hackchina.com/cont/144675
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics