⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 terminallocationservicetestcase.java

📁 电信ISAG的服务连接和服务
💻 JAVA
字号:
/**
 * TerminalLocationServiceTestCase.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis WSDL2Java emitter.
 */

package cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.v2_1.service;

public class TerminalLocationServiceTestCase extends junit.framework.TestCase {
    public TerminalLocationServiceTestCase(java.lang.String name) {
        super(name);
    }
    public void test1TerminalLocationGetLocation() throws Exception {
        cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.v2_1.service.TerminalLocationBindingStub binding;
        try {
            binding = (cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.v2_1.service.TerminalLocationBindingStub)
                          new cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.v2_1.service.TerminalLocationServiceLocator().getTerminalLocation();
        }
        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
        try {
            cn.com.chinatelecom.www.schema.ctcc.terminal_location.v2_1.LocationInfo value = null;
            value = binding.getLocation(new org.apache.axis.types.URI("urn:testing"), 0, 0);
        }
        catch (cn.com.chinatelecom.www.schema.ctcc.common.v2_1.PolicyException e1) {
            throw new junit.framework.AssertionFailedError("PolicyException Exception caught: " + e1);
        }
        catch (cn.com.chinatelecom.www.schema.ctcc.common.v2_1.ServiceException e2) {
            throw new junit.framework.AssertionFailedError("ServiceException Exception caught: " + e2);
        }
            // TBD - validate results
    }

    public void test2TerminalLocationGetTerminalDistance() throws Exception {
        cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.v2_1.service.TerminalLocationBindingStub binding;
        try {
            binding = (cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.v2_1.service.TerminalLocationBindingStub)
                          new cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.v2_1.service.TerminalLocationServiceLocator().getTerminalLocation();
        }
        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
        try {
            int value = -3;
            value = binding.getTerminalDistance(new org.apache.axis.types.URI("urn:testing"), 0, 0);
        }
        catch (cn.com.chinatelecom.www.schema.ctcc.common.v2_1.PolicyException e1) {
            throw new junit.framework.AssertionFailedError("PolicyException Exception caught: " + e1);
        }
        catch (cn.com.chinatelecom.www.schema.ctcc.common.v2_1.ServiceException e2) {
            throw new junit.framework.AssertionFailedError("ServiceException Exception caught: " + e2);
        }
            // TBD - validate results
    }

    public void test3TerminalLocationGetLocationForGroup() throws Exception {
        cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.v2_1.service.TerminalLocationBindingStub binding;
        try {
            binding = (cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.v2_1.service.TerminalLocationBindingStub)
                          new cn.com.chinatelecom.www.wsdl.ctcc.terminal_location.v2_1.service.TerminalLocationServiceLocator().getTerminalLocation();
        }
        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
        try {
            cn.com.chinatelecom.www.schema.ctcc.terminal_location.v2_1.LocationData[] value = null;
            value = binding.getLocationForGroup(new org.apache.axis.types.URI[0], 0, 0);
        }
        catch (cn.com.chinatelecom.www.schema.ctcc.common.v2_1.PolicyException e1) {
            throw new junit.framework.AssertionFailedError("PolicyException Exception caught: " + e1);
        }
        catch (cn.com.chinatelecom.www.schema.ctcc.common.v2_1.ServiceException e2) {
            throw new junit.framework.AssertionFailedError("ServiceException Exception caught: " + e2);
        }
            // TBD - validate results
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -