FileDocCategorySizeDatePackage
MessageTest.javaAPI DocExample5815Tue May 29 16:57:44 BST 2007com.sun.xml.ws.tx.common

MessageTest

public class MessageTest extends TestCase
author
Ryan.Shoemaker@Sun.COM

Fields Summary
private final String
messageSource
private final com.sun.xml.ws.api.message.Message
jaxwsMessage
private final com.sun.xml.ws.tx.common.Message
txMessage
Constructors Summary
public MessageTest(String name)
Creates a new instance of MessageTest

        super(name);
    
Methods Summary
public voidtestGetContext()

        CoordinationContextInterface cc = 
            txMessage.getCoordinationContext(TxJAXBContext.createUnmarshaller());
        // we really only need to test that JAXB can unmarshal and hand us the object
        assertEquals("http://schemas.xmlsoap.org/ws/2004/10/wsat", cc.getCoordinationType());
        assertEquals("uuid:WSCOOR-SUN-2", cc.getIdentifier());
        assertEquals(37376l, cc.getExpires());
    
public voidtestGetCtxHeader()

    
         
        Header h = txMessage.getCoordCtxHeader();
        assertNotNull(h);
        assertEquals("http://schemas.xmlsoap.org/ws/2004/10/wscoor", h.getNamespaceURI());
        assertEquals("CoordinationContext", h.getLocalPart());
    
public voidtestGetCtxHeader2()

        assertNotNull(txMessage.getCoordCtxHeader(Constants.WSCOOR_SOAP_NSURI, Constants.COORDINATION_CONTEXT));