本文整理汇总了Java中org.kuali.rice.ksb.messaging.remotedservices.SOAPService.doTheThing方法的典型用法代码示例。如果您正苦于以下问题:Java SOAPService.doTheThing方法的具体用法?Java SOAPService.doTheThing怎么用?Java SOAPService.doTheThing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.ksb.messaging.remotedservices.SOAPService
的用法示例。
在下文中一共展示了SOAPService.doTheThing方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testSuccessfullyCallingSOAPTopic
import org.kuali.rice.ksb.messaging.remotedservices.SOAPService; //导入方法依赖的package包/类
@Test
public void testSuccessfullyCallingSOAPTopic() throws Exception {
// ensure test harness has entries for TestClient1
KsbApiServiceLocator.getServiceBus().synchronize();
QName serviceName = new QName("testNameSpace", "soap-repeatTopic");
SOAPService testJavaAsyncService = KsbApiServiceLocator.getMessageHelper().getServiceAsynchronously(serviceName);
testJavaAsyncService.doTheThing("The param");
verifyServiceCalls(serviceName);
assertTrue("Test harness topic never called", (ServiceCallInformationHolder.flags.get(
"TestHarnessCalled")).booleanValue());
assertTrue("Cliet1 app topic never called", (ServiceCallInformationHolder.flags.get(
"Client1SOAPServiceCalled")).booleanValue());
}
示例2: testSuccessfullyCallingSOAPTopicAsync
import org.kuali.rice.ksb.messaging.remotedservices.SOAPService; //导入方法依赖的package包/类
@Test
public void testSuccessfullyCallingSOAPTopicAsync() throws Exception {
KSBTestUtils.setMessagingToAsync();
QName serviceName = new QName("testNameSpace", "soap-repeatTopic");
SimpleCallback callback = new SimpleCallback();
SOAPService testJavaAsyncService = KsbApiServiceLocator.getMessageHelper().getServiceAsynchronously(
serviceName);
synchronized (callback) {
testJavaAsyncService.doTheThing("The param");
callback.waitForAsyncCall(3000);
}
verifyServiceCalls(serviceName);
assertTrue("Test harness topic never called", (ServiceCallInformationHolder.flags.get(
"TestHarnessCalled")).booleanValue());
assertTrue("Cliet1 app topic never called", (ServiceCallInformationHolder.flags.get(
"Client1SOAPServiceCalled")).booleanValue());
}
示例3: testSuccessfullyCallingSOAPTopicAsync
import org.kuali.rice.ksb.messaging.remotedservices.SOAPService; //导入方法依赖的package包/类
@Test
public void testSuccessfullyCallingSOAPTopicAsync() throws Exception {
KSBTestUtils.setMessagingToAsync();
QName serviceName = new QName("testNameSpace", "soap-repeatTopic");
SimpleCallback callback = new SimpleCallback();
SOAPService testJavaAsyncService = (SOAPService) KsbApiServiceLocator.getMessageHelper().getServiceAsynchronously(serviceName);
synchronized (callback) {
testJavaAsyncService.doTheThing("The param");
callback.waitForAsyncCall(3000);
}
verifyServiceCalls(serviceName);
assertTrue("Test harness topic never called", ((Boolean) ServiceCallInformationHolder.stuff.get("TestHarnessCalled")).booleanValue());
assertTrue("Cliet1 app topic never called", ((Boolean) ServiceCallInformationHolder.stuff.get("Client1SOAPServiceCalled")).booleanValue());
}
示例4: testSOAPClustering
import org.kuali.rice.ksb.messaging.remotedservices.SOAPService; //导入方法依赖的package包/类
@Test public void testSOAPClustering() throws Exception {
QName serviceName = new QName("testNameSpace", "soap-cluster-test");
int i = 0;
List<SOAPService> services = new ArrayList<SOAPService>();
while (i < SERVICE_CALLS) {
i++;
services.add((SOAPService)GlobalResourceLoader.getService(serviceName));
}
for (SOAPService service : services) {
service.doTheThing("testing one two three");
}
String server1Name = "TestClient1";
String server2Name = "TestClient2";
boolean server1Called = false;
boolean server2Called = false;
//verify clustering is happening through bam
List<BAMTargetEntry> bams = KSBServiceLocator.getBAMService().getCallsForService(serviceName);
for (BAMTargetEntry bam : bams) {
System.out.println("Found bam service URL of " + bam.getServiceURL());
if (bam.getServiceURL().contains(server1Name)) {
server1Called = true;
} else if (bam.getServiceURL().contains(server2Name)) {
server2Called = true;
}
}
assertTrue(server1Called);
assertTrue(server2Called);
}
示例5: testSOAPFailOver
import org.kuali.rice.ksb.messaging.remotedservices.SOAPService; //导入方法依赖的package包/类
@Test public void testSOAPFailOver() throws Exception {
QName serviceName = new QName("testNameSpace", "soap-cluster-test");
int i = 0;
List<SOAPService> services = new ArrayList<SOAPService>();
while (i < SERVICE_CALLS) {
i++;
services.add((SOAPService)GlobalResourceLoader.getService(serviceName));
}
// stop the server 1 and verify all calls going to server 2
try {
getTestClient1().stop();
} catch (Throwable t) {
// this is okay
}
for (SOAPService service : services) {
service.doTheThing("testing one two three");
}
String server1Name = "TestClient1";
String server2Name = "TestClient2";
boolean server1Called = false;
boolean server2Called = false;
//verify clustering is happening through bam
List<BAMTargetEntry> bams = KSBServiceLocator.getBAMService().getCallsForService(serviceName);
for (BAMTargetEntry bam : bams) {
if (bam.getServerInvocation() && bam.getServiceURL().contains(server1Name)) {
server1Called = true;
} else if (bam.getServerInvocation() && bam.getServiceURL().contains(server2Name)) {
server2Called = true;
}
}
assertFalse(server1Called);
assertTrue(server2Called);
}
示例6: testSimpleSOAPService
import org.kuali.rice.ksb.messaging.remotedservices.SOAPService; //导入方法依赖的package包/类
@Test
public void testSimpleSOAPService() throws Exception{
EchoService echoService = GlobalResourceLoader.getService(new QName("TestCl1", "soap-echoService"));
String result = echoService.trueEcho("Yo yo yo");
assertNotNull(result);
QName serviceName = new QName("testNameSpace", "soap-repeatTopic");
SOAPService soapService = GlobalResourceLoader.getService(serviceName);
soapService.doTheThing("hello");
}
示例7: testSuccessfullyCallingSOAPTopic
import org.kuali.rice.ksb.messaging.remotedservices.SOAPService; //导入方法依赖的package包/类
@Test
public void testSuccessfullyCallingSOAPTopic() throws Exception {
// ensure test harness has entries for TestClient1
KsbApiServiceLocator.getServiceBus().synchronize();
QName serviceName = new QName("testNameSpace", "soap-repeatTopic");
SOAPService testJavaAsyncService = (SOAPService) KsbApiServiceLocator.getMessageHelper().getServiceAsynchronously(serviceName);
testJavaAsyncService.doTheThing("The param");
verifyServiceCalls(serviceName);
assertTrue("Test harness topic never called", ((Boolean) ServiceCallInformationHolder.stuff.get("TestHarnessCalled")).booleanValue());
assertTrue("Cliet1 app topic never called", ((Boolean) ServiceCallInformationHolder.stuff.get("Client1SOAPServiceCalled")).booleanValue());
}
示例8: testSimpleSOAPService
import org.kuali.rice.ksb.messaging.remotedservices.SOAPService; //导入方法依赖的package包/类
@Test public void testSimpleSOAPService() throws Exception{
EchoService echoService = (EchoService)GlobalResourceLoader.getService(new QName("TestCl1", "soap-echoService"));
String result = echoService.trueEcho("Yo yo yo");
assertNotNull(result);
QName serviceName = new QName("testNameSpace", "soap-repeatTopic");
SOAPService soapService = (SOAPService) GlobalResourceLoader.getService(serviceName);
soapService.doTheThing("hello");
}