helloserviceservicetestcase.java

来自「精通Jboss——Ejb和Web Services开发精解的随书源代码」· Java 代码 · 共 37 行

JAVA
37
字号
/**
 * HelloServiceServiceTestCase.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis WSDL2Java emitter.
 */

package com.liuyang.axis.server;

public class HelloServiceServiceTestCase extends junit.framework.TestCase {
    public HelloServiceServiceTestCase(java.lang.String name) {
        super(name);
    }
    public void test1HelloServiceSayHello() throws Exception {
        com.liuyang.axis.server.HelloServiceSoapBindingStub binding;
        try {
            binding = (com.liuyang.axis.server.HelloServiceSoapBindingStub)
                          new com.liuyang.axis.server.HelloServiceServiceLocator().getHelloService();
        }
        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
        java.lang.String value = null;
        value = binding.sayHello(new java.lang.String());
        // TBD - validate results
    }

}

⌨️ 快捷键说明

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