Search in sources :

Example 11 with InstanceIdentifier

use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.

the class BusinessAgreementWithCoordinatorCompletionCoordinatorTest method testSendExited.

@Test
public void testSendExited() throws Exception {
    final String messageId = "testSendExited";
    final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("5");
    W3CEndpointReference endpoint = TestUtil.getCoordinatorCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
    final MAP map = AddressingHelper.createRequestContext(TestUtil.coordinatorCompletionParticipantServiceURI, messageId);
    CoordinatorCompletionParticipantClient.getClient().sendExited(endpoint, map, new InstanceIdentifier("sender"));
    final CoordinatorCompletionParticipantDetails details = testCoordinatorCompletionParticipantProcessor.getCoordinatorCompletionParticipantDetails(messageId, 10000);
    assertTrue(details.hasExited());
    checkDetails(details, false, true, messageId, instanceIdentifier);
}
Also used : W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) CoordinatorCompletionParticipantDetails(com.arjuna.wst.tests.arq.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails) MAP(org.jboss.ws.api.addressing.MAP) Test(org.junit.Test)

Example 12 with InstanceIdentifier

use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.

the class BusinessAgreementWithCoordinatorCompletionCoordinatorTest method testSendFaulted.

@Test
public void testSendFaulted() throws Exception {
    final String messageId = "testSendFaulted";
    final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("4");
    W3CEndpointReference endpoint = TestUtil.getCoordinatorCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
    final MAP map = AddressingHelper.createRequestContext(TestUtil.coordinatorCompletionParticipantServiceURI, messageId);
    CoordinatorCompletionParticipantClient.getClient().sendFailed(endpoint, map, new InstanceIdentifier("sender"));
    final CoordinatorCompletionParticipantDetails details = testCoordinatorCompletionParticipantProcessor.getCoordinatorCompletionParticipantDetails(messageId, 10000);
    assertTrue(details.hasFailed());
    checkDetails(details, false, true, messageId, instanceIdentifier);
}
Also used : W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) CoordinatorCompletionParticipantDetails(com.arjuna.wst.tests.arq.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails) MAP(org.jboss.ws.api.addressing.MAP) Test(org.junit.Test)

Example 13 with InstanceIdentifier

use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.

the class BusinessAgreementWithCoordinatorCompletionCoordinatorTest method testSendComplete.

@Test
public void testSendComplete() throws Exception {
    final String messageId = "testSendComplete";
    final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("7");
    W3CEndpointReference endpoint = TestUtil.getCoordinatorCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
    final MAP map = AddressingHelper.createRequestContext(TestUtil.coordinatorCompletionParticipantServiceURI, messageId);
    CoordinatorCompletionParticipantClient.getClient().sendComplete(endpoint, map, new InstanceIdentifier("sender"));
    final CoordinatorCompletionParticipantDetails details = testCoordinatorCompletionParticipantProcessor.getCoordinatorCompletionParticipantDetails(messageId, 10000);
    assertTrue(details.hasComplete());
    checkDetails(details, true, true, messageId, instanceIdentifier);
}
Also used : W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) CoordinatorCompletionParticipantDetails(com.arjuna.wst.tests.arq.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails) MAP(org.jboss.ws.api.addressing.MAP) Test(org.junit.Test)

Example 14 with InstanceIdentifier

use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.

the class BusinessAgreementWithCoordinatorCompletionCoordinatorTest method testSendNotCompleted.

@Test
public void testSendNotCompleted() throws Exception {
    final String messageId = "testSendNotCompleted";
    final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("10");
    W3CEndpointReference endpoint = TestUtil.getCoordinatorCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
    final MAP map = AddressingHelper.createRequestContext(TestUtil.coordinatorCompletionParticipantServiceURI, messageId);
    CoordinatorCompletionParticipantClient.getClient().sendNotCompleted(endpoint, map, new InstanceIdentifier("sender"));
    final CoordinatorCompletionParticipantDetails details = testCoordinatorCompletionParticipantProcessor.getCoordinatorCompletionParticipantDetails(messageId, 10000);
    assertTrue(details.hasNotCompleted());
    checkDetails(details, false, true, messageId, instanceIdentifier);
}
Also used : W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) CoordinatorCompletionParticipantDetails(com.arjuna.wst.tests.arq.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails) MAP(org.jboss.ws.api.addressing.MAP) Test(org.junit.Test)

Example 15 with InstanceIdentifier

use of com.arjuna.webservices11.wsarj.InstanceIdentifier in project narayana by jbosstm.

the class BusinessAgreementWithCoordinatorCompletionCoordinatorTest method testSendGetStatus.

@Test
public void testSendGetStatus() throws Exception {
    final String messageId = "testSendGetStatus";
    final InstanceIdentifier instanceIdentifier = new InstanceIdentifier("8");
    W3CEndpointReference endpoint = TestUtil.getCoordinatorCompletionParticipantEndpoint(instanceIdentifier.getInstanceIdentifier());
    final MAP map = AddressingHelper.createRequestContext(TestUtil.coordinatorCompletionParticipantServiceURI, messageId);
    CoordinatorCompletionParticipantClient.getClient().sendGetStatus(endpoint, map, new InstanceIdentifier("sender"));
    final CoordinatorCompletionParticipantDetails details = testCoordinatorCompletionParticipantProcessor.getCoordinatorCompletionParticipantDetails(messageId, 10000);
    assertTrue(details.hasGetStatus());
    checkDetails(details, true, true, messageId, instanceIdentifier);
}
Also used : W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) InstanceIdentifier(com.arjuna.webservices11.wsarj.InstanceIdentifier) CoordinatorCompletionParticipantDetails(com.arjuna.wst.tests.arq.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails) MAP(org.jboss.ws.api.addressing.MAP) Test(org.junit.Test)

Aggregations

InstanceIdentifier (com.arjuna.webservices11.wsarj.InstanceIdentifier)130 MAP (org.jboss.ws.api.addressing.MAP)83 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)53 Test (org.junit.Test)51 SoapFault11 (com.arjuna.webservices11.SoapFault11)24 SoapFault (com.arjuna.webservices.SoapFault)20 ArjunaContext (com.arjuna.webservices11.wsarj.ArjunaContext)13 SystemException (com.arjuna.wst.SystemException)13 UnknownTransactionException (com.arjuna.wst.UnknownTransactionException)13 QName (javax.xml.namespace.QName)12 CoordinatorCompletionCoordinatorInboundEvents (com.arjuna.webservices11.wsba.CoordinatorCompletionCoordinatorInboundEvents)10 CoordinatorCompletionParticipantInboundEvents (com.arjuna.webservices11.wsba.CoordinatorCompletionParticipantInboundEvents)10 ParticipantCompletionCoordinatorInboundEvents (com.arjuna.webservices11.wsba.ParticipantCompletionCoordinatorInboundEvents)10 CoordinatorCompletionParticipantDetails (com.arjuna.wst.tests.arq.TestCoordinatorCompletionParticipantProcessor.CoordinatorCompletionParticipantDetails)10 ParticipantCompletionCoordinatorDetails (com.arjuna.wst.tests.arq.TestParticipantCompletionCoordinatorProcessor.ParticipantCompletionCoordinatorDetails)10 SoapFaultType (com.arjuna.webservices.SoapFaultType)9 ParticipantCompletionParticipantInboundEvents (com.arjuna.webservices11.wsba.ParticipantCompletionParticipantInboundEvents)9 CoordinatorCompletionCoordinatorDetails (com.arjuna.wst.tests.arq.TestCoordinatorCompletionCoordinatorProcessor.CoordinatorCompletionCoordinatorDetails)9 ParticipantCompletionParticipantDetails (com.arjuna.wst.tests.arq.TestParticipantCompletionParticipantProcessor.ParticipantCompletionParticipantDetails)9 ProtocolException (javax.xml.ws.ProtocolException)9