FileDocCategorySizeDatePackage
TestServiceServiceTestCase.javaAPI DocApache Axis 1.42835Sat Apr 22 18:57:26 BST 2006test.wsdl.document

TestServiceServiceTestCase

public class TestServiceServiceTestCase extends TestCase
TestServiceServiceTestCase.java This file was auto-generated from WSDL by the Apache Axis WSDL2Java emitter.

Fields Summary
String
xml
Constructors Summary
public TestServiceServiceTestCase(String name)

       
        super(name);
    
Methods Summary
public voidtest1DocumentTestGetElement()

        test.wsdl.document.DocumentTestSoapBindingStub binding;
        try {
            binding = (test.wsdl.document.DocumentTestSoapBindingStub)
                          new test.wsdl.document.TestServiceServiceLocator().getDocumentTest();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        org.w3c.dom.Element value = null;
        value = binding.getElement();
        // TBD - validate results
        assertTrue(value != null);
        assertTrue(XMLUtils.ElementToString(value).indexOf(xml)!=-1);
    
public voidtest2DocumentTestGetDocument()

        test.wsdl.document.DocumentTestSoapBindingStub binding;
        try {
            binding = (test.wsdl.document.DocumentTestSoapBindingStub)
                          new test.wsdl.document.TestServiceServiceLocator().getDocumentTest();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        org.w3c.dom.Document value = null;
        value = binding.getDocument();
        // TBD - validate results
        assertTrue(value != null);
        assertTrue(XMLUtils.DocumentToString(value).indexOf(xml)!=-1);
    
public voidtestDocumentTestWSDL()

        javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
        java.net.URL url = new java.net.URL(new test.wsdl.document.TestServiceServiceLocator().getDocumentTestAddress() + "?WSDL");
        javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.document.TestServiceServiceLocator().getServiceName());
        assertTrue(service != null);