use of com.dexels.navajo.client.ClientInterface in project navajo by Dexels.
the class ProxyMap method store.
@Override
public void store() throws MappableException, UserException {
if (server == null)
throw new UserException(-1, "ProxyMap error: no server URI specified, e.g. localhost/servlet/Postman");
try {
ClientInterface nc = NavajoClientFactory.createClient();
inMessage.removeHeader();
nc.setUsername(username == null ? access.rpcUser : username);
nc.setPassword(password == null ? access.rpcPwd : password);
nc.setAllowCompression(true);
nc.setServerUrl(server);
Navajo out = nc.doSimpleSend(inMessage, (method == null ? access.rpcName : method));
access.setOutputDoc(out);
} catch (Exception e) {
throw new UserException(-1, e.getMessage());
}
}
use of com.dexels.navajo.client.ClientInterface in project navajo by Dexels.
the class ScriptTestContext method callService.
public Navajo callService(String script, Navajo input, String altProfile) throws ClientException {
if (input == null) {
input = NavajoFactory.getInstance().createNavajo();
}
ClientInterface c = NavajoClientFactory.getClient();
setupClient(c, altProfile);
// Navajo result = c.doSimpleSend(input,"", script,"","",-1,false,false);
Navajo result = c.doSimpleSend(input, script);
navajoMap.put(script, result);
return result;
}
Aggregations