日期:2014-05-18 浏览次数:20749 次
private String sendService(String param, String url, String method) {
log.info("InvoicePostService: now post to WMS param is :" + param);
String result="";
try {
RPCServiceClient serviceClient = new RPCServiceClient();
Options options = serviceClient.getOptions();
EndpointReference targetEPR = new EndpointReference(url);
options.setTo(targetEPR);
QName opAddEntry = new QName( SystemConfig.getProperty("service.invoice.qname"), method);
Object[] opAddEntryArgs = new Object[] { param };
Class<?>[] classes = new Class[] { String.class };
result = (String) serviceClient.invokeBlocking(opAddEntry, opAddEntryArgs, classes)[0];
log.info("The result is :" + result);
} catch (Exception e) {
log.error("post was failed error is :" + ExceptionUtils.getFullStackTrace(e));
throw new RuntimeException(" post to was failed error is :"+e.getMessage());
}
return result;
}