As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
import org.apache.cxf.jaxrs.client.WebClient; import org.junit.Test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class TestInvoke { private ApplicationContext context; @Test public void test() throws Exception { context = new ClassPathXmlApplicationContext("spring-cxf.config.xml"); WebClient client = context.getBean("rsWebClient", WebClient.class); assertNotNull(WebClient.fromClient(client) .header("Authorization", setUser()).accept("application/json") .type("application/json").path("/service").path("/runtime") .path("/process-instances").get()); } private String setUser() { String username = "kermit"; String password = "kermit"; return "Basic " + org.apache.cxf.common.util.Base64Utility.encode((username + ":" + password).getBytes()); } }
public class Message{ Collection data; private String id; private String url; private String businessKey; private boolean suspended; private boolean ended; private String processDefinitionId; private String processDefinitionUrl; private String activityId; private String tenantId; private boolean completed; }