FileDocCategorySizeDatePackage
QNameSerTestCase.javaAPI DocApache Axis 1.43032Sat Apr 22 18:57:26 BST 2006test.wsdl.qnameser

QNameSerTestCase

public class QNameSerTestCase extends TestCase

Fields Summary
Constructors Summary
public QNameSerTestCase(String name)

        super(name);
    
Methods Summary
private voiddeployServer()

        final String INPUT_FILE = "server-deploy.wsdd";

        InputStream is = getClass().getResourceAsStream(INPUT_FILE);
        if (is == null) {
            // try current directory
            try {
                is = new FileInputStream(INPUT_FILE);
            } catch (FileNotFoundException e) {
                is = null;
            }
        }
        assertNotNull("Unable to find " + INPUT_FILE + ". Make sure it is on the classpath or in the current directory.", is);
        AdminClient admin = new AdminClient();
        try {
            Options opts = new Options( null );
            opts.setDefaultURL("http://localhost:8080/axis/services/AdminService");
            admin.process(opts, is);
        } catch (Exception e) {
            assertTrue("Unable to deploy " + INPUT_FILE + ". ERROR: " + e, false);
        }
    
public voidtestQName()

        PlanWSSoap binding;
        try {
            PlanWSLocator locator = new PlanWSLocator();
            binding = locator.getPlanWSSoap();
            deployServer();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        } 
        catch (Exception e) {
            throw new junit.framework.AssertionFailedError("Binding initialization Exception caught: " + e);
        }
        assertTrue("binding is null", binding != null);

        binding.getPlan(PlanService.Q_1);
        binding.getPlan(PlanService.Q_2);
        binding.getPlan(PlanService.Q_3);
    
public voidtestQNameList()

        PlanWSSoap binding;
        try {
            PlanWSLocator locator = new PlanWSLocator();
            binding = locator.getPlanWSSoap();
            deployServer();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        } 
        catch (Exception e) {
            throw new junit.framework.AssertionFailedError("Binding initialization Exception caught: " + e);
        }
        assertTrue("binding is null", binding != null);

        QName [] list =
            new QName[] {PlanService.Q_1, PlanService.Q_2, PlanService.Q_3};
        GetMPlan in = new GetMPlan(list);
        binding.getMPlan(in);