FileDocCategorySizeDatePackage
TestVersionMismatch.javaAPI DocApache Axis 1.42595Sat Apr 22 18:57:26 BST 2006test.soap12

TestVersionMismatch

public class TestVersionMismatch extends TestCase
Test VersionMismatch fault generation

Fields Summary
private AxisServer
server
private final String
SOAP_MESSAGE
Constructors Summary
public TestVersionMismatch(String name)



       
        super(name);
        server = new AxisServer();
    
Methods Summary
public voidtestVersionMismatch()



         
        Message message = new Message(SOAP_MESSAGE);
        MessageContext context = new MessageContext(server);
        context.setSOAPConstants(SOAPConstants.SOAP12_CONSTANTS);

        message.setMessageContext(context);

        boolean expectedExceptionThrown = false;
        try {
            SOAPEnvelope envelope = message.getSOAPEnvelope();
        } catch (AxisFault af) {
            if (Constants.FAULT_VERSIONMISMATCH.equals(af.getFaultCode()))
                expectedExceptionThrown = true;
        }

        assertTrue(expectedExceptionThrown);