请问怎样调用上面的那种webservice???十万火急
解决方案 »
- erp项目试用?
- 关于jbpm4 业务日历的配置
- 企业应用级问题:JUNIT在使用时如何使用同一个类,运行不同的TESTCASE,但是又能从junit report中看出运行了哪些testcase
- xml 解析
- 求助关于hibernate子查询和hibernate中使用group by desc语句报错问题!
- 用dom4j解析xml文档及开发过程中所想
- 如何输出struts formBean中的bean的值?
- 【100分求助】请教如何使用Log4j记录自定义字段?
- java高手在.net版与ms mvp大战,快不行了!java版的兄弟们快过去帮忙啊!!
- 使用Local接口出错
- Hibernate多对一关系,主键值由外键的主键决定
- 关于struts中validation.xml的问题
Properties p = new Properties();
p.load(ClassLoaderUtils.getResourceAsStream(
"bizqryinterface.properties", AbstractInquireAction.class)); String ServerIP = p.getProperty("SoapServiceIp");
String ServerPort = p.getProperty("SoapServicePort");
String bizUrn = p.getProperty("SoapServiceId");
String bizMethods = p.getProperty("SoapServiceMethods");
Call c = null;
URL url = null;
Response rep = null;
url = new URL("http://"+ServerIP+":"+ServerPort+"/ulcc/servlet/rpcrouter");
log.debug("Passing to our deployed " + url.getPath());
c = new Call();
c.setTargetObjectURI(bizUrn);
c.setMethodName(bizMethods);
c.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
//设置查询参数
c.setParams(params);
log.debug("BizQueryInterface's echos are: ");
rep = c.invoke(url, "");
if (rep.generatedFault()) {
Fault fault = rep.getFault();
log.debug("\nCall failed!");
log.debug("Code = " + fault.getFaultCode());
log.debug("String = " + fault.getFaultString());
} else {
Parameter result = rep.getReturnValue();
log.debug(result.getValue());
}
}