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

📄 dataservicetestcase.java

📁 Java有关XML编程需要用到axis 的源代码 把里面bin下的包导入相应的Java工程 进行使用
💻 JAVA
字号:
/** * DataServiceTestCase.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */package test.wsdl.dataset;import org.apache.axis.AxisFault;import java.net.ConnectException;import java.io.IOException;public class DataServiceTestCase extends junit.framework.TestCase {    public DataServiceTestCase(java.lang.String name) {        super(name);    }    public void test1DataServiceSoapGetTitleAuthors() throws Exception {        test.wsdl.dataset.DataServiceSoapStub binding;        try {            binding = (test.wsdl.dataset.DataServiceSoapStub)                    new test.wsdl.dataset.DataServiceLocator().getDataServiceSoap();        }        catch (javax.xml.rpc.ServiceException jre) {            if(jre.getLinkedCause()!=null)                jre.getLinkedCause().printStackTrace();            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);        }        assertTrue("binding is null", binding != null);        binding.setTimeout(60000);                try {            // Test operation            test.wsdl.dataset.GetTitleAuthorsResponseGetTitleAuthorsResult value = null;            value = binding.getTitleAuthors();            assertTrue(value != null);            // TBD - validate results        } catch (java.rmi.RemoteException re) {            if (re instanceof AxisFault) {                AxisFault fault = (AxisFault) re;                if (fault.detail instanceof ConnectException ||                    fault.getFaultCode().getLocalPart().equals("HTTP")) {                    System.err.println("DataService HTTP error: " + fault);                    return;                }                if (fault.detail instanceof IOException) {                    System.err.println("DataService IO error: " + fault);                    return;                }            }            throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re);        }    }}

⌨️ 快捷键说明

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