Search in sources :

Example 71 with CoordinationContext

use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext in project narayana by jbosstm.

the class ActivationTest method checkResponse.

public void checkResponse(final String coordinationType, final Expires expiresInstance, final CreateCoordinationContextResponseType createCoordinationContextResponseType) throws Exception {
    CoordinationContext outContext = createCoordinationContextResponseType.getCoordinationContext();
    assertNotNull(outContext);
    assertEquals(coordinationType, outContext.getCoordinationType());
    if (expiresInstance != null) {
        assertNotNull(outContext.getExpires());
        assertEquals(expiresInstance.getValue(), outContext.getExpires().getValue());
    } else {
        assertNull(outContext.getExpires());
    }
    assertNotNull(outContext.getRegistrationService());
}
Also used : CoordinationContext(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext)

Example 72 with CoordinationContext

use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext in project narayana by jbosstm.

the class ActivationTest method testRequestWithoutExpiresWithoutCurrentContext.

@Test
public void testRequestWithoutExpiresWithoutCurrentContext() throws Exception {
    final String messageId = "testRequestWithoutExpiresWithoutCurrentContext";
    final String coordinationType = TestUtil.COORDINATION_TYPE;
    final Long expires = null;
    final CoordinationContext coordinationContext = null;
    executeRequestTest(messageId, coordinationType, expires, coordinationContext);
}
Also used : CoordinationContext(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext) Test(org.junit.Test)

Example 73 with CoordinationContext

use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext in project narayana by jbosstm.

the class ActivationTest method testRequestWithExpiresWithCurrentContextWithoutExpires.

@Test
public void testRequestWithExpiresWithCurrentContextWithoutExpires() throws Exception {
    final String messageId = "testRequestWithExpiresWithCurrentContextWithoutExpires";
    final String coordinationType = TestUtil.COORDINATION_TYPE;
    final Long expires = new Long(123456L);
    final CoordinationContext coordinationContext = new CoordinationContext();
    coordinationContext.setCoordinationType(coordinationType);
    CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier();
    identifier.setValue(TestUtil.PROTOCOL_IDENTIFIER);
    coordinationContext.setIdentifier(identifier);
    W3CEndpointReference registrationService = TestUtil11.getRegistrationEndpoint(identifier.getValue());
    coordinationContext.setRegistrationService(registrationService);
    executeRequestTest(messageId, coordinationType, expires, coordinationContext);
}
Also used : W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) CreateCoordinationContextType(org.oasis_open.docs.ws_tx.wscoor._2006._06.CreateCoordinationContextType) CoordinationContextType(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType) CoordinationContext(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext) Test(org.junit.Test)

Example 74 with CoordinationContext

use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext in project narayana by jbosstm.

the class ActivationTest method testRequestWithoutExpiresWithCurrentContextWithExpires.

@Test
public void testRequestWithoutExpiresWithCurrentContextWithExpires() throws Exception {
    final String messageId = "testRequestWithoutExpiresWithCurrentContextWithExpires";
    final String coordinationType = TestUtil.COORDINATION_TYPE;
    final Long expires = null;
    final CoordinationContext coordinationContext = new CoordinationContext();
    coordinationContext.setCoordinationType(coordinationType);
    CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier();
    identifier.setValue(TestUtil.PROTOCOL_IDENTIFIER);
    coordinationContext.setIdentifier(identifier);
    Expires expiresInstance = new Expires();
    expiresInstance.setValue(123456L);
    coordinationContext.setExpires(expiresInstance);
    W3CEndpointReference registrationService = TestUtil11.getRegistrationEndpoint(identifier.getValue());
    coordinationContext.setRegistrationService(registrationService);
    executeRequestTest(messageId, coordinationType, expires, coordinationContext);
}
Also used : W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) Expires(org.oasis_open.docs.ws_tx.wscoor._2006._06.Expires) CreateCoordinationContextType(org.oasis_open.docs.ws_tx.wscoor._2006._06.CreateCoordinationContextType) CoordinationContextType(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType) CoordinationContext(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext) Test(org.junit.Test)

Example 75 with CoordinationContext

use of org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext in project narayana by jbosstm.

the class ActivationTest method testRequestWithExpiresWithCurrentContextWithExpires.

@Test
public void testRequestWithExpiresWithCurrentContextWithExpires() throws Exception {
    final String messageId = "testRequestWithExpiresWithCurrentContextWithExpires";
    final String coordinationType = TestUtil.COORDINATION_TYPE;
    final Long expires = new Long(123456L);
    final CoordinationContext coordinationContext = new CoordinationContext();
    coordinationContext.setCoordinationType(coordinationType);
    CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier();
    identifier.setValue(TestUtil.PROTOCOL_IDENTIFIER);
    coordinationContext.setIdentifier(identifier);
    Expires expiresInstance = new Expires();
    expiresInstance.setValue(1234567L);
    coordinationContext.setExpires(expiresInstance);
    W3CEndpointReference registrationService = TestUtil11.getRegistrationEndpoint(identifier.getValue());
    coordinationContext.setRegistrationService(registrationService);
    executeRequestTest(messageId, coordinationType, expires, coordinationContext);
}
Also used : W3CEndpointReference(javax.xml.ws.wsaddressing.W3CEndpointReference) Expires(org.oasis_open.docs.ws_tx.wscoor._2006._06.Expires) CreateCoordinationContextType(org.oasis_open.docs.ws_tx.wscoor._2006._06.CreateCoordinationContextType) CoordinationContextType(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType) CoordinationContext(org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext) Test(org.junit.Test)

Aggregations

CoordinationContextType (org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType)69 MAP (org.jboss.ws.api.addressing.MAP)43 SoapFault11 (com.arjuna.webservices11.SoapFault11)39 Action (javax.xml.ws.Action)38 RequestWrapper (javax.xml.ws.RequestWrapper)38 MessageContext (javax.xml.ws.handler.MessageContext)38 CoordinationContext (org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext)24 W3CEndpointReference (javax.xml.ws.wsaddressing.W3CEndpointReference)14 InvalidCreateParametersException (com.arjuna.wsc.InvalidCreateParametersException)12 CreateCoordinationContextType (org.oasis_open.docs.ws_tx.wscoor._2006._06.CreateCoordinationContextType)9 Expires (org.oasis_open.docs.ws_tx.wscoor._2006._06.Expires)9 Test (org.junit.Test)7 SoapFault (com.arjuna.webservices.SoapFault)6 InvalidProtocolException (com.arjuna.wsc.InvalidProtocolException)6 SystemException (com.arjuna.wst.SystemException)6 TxContextImple (com.arjuna.mwlabs.wst11.at.context.TxContextImple)5 ServiceRegistry (com.arjuna.webservices11.ServiceRegistry)5 SOAPEnvelope (javax.xml.soap.SOAPEnvelope)5 SOAPHeaderElement (javax.xml.soap.SOAPHeaderElement)5 ProtocolException (javax.xml.ws.ProtocolException)5