📄 myserviceservicetestcase.java
字号:
/** * MyServiceServiceTestCase.java * * This file was auto-generated from WSDL * by the Apache Axis 1.2alpha Dec 06, 2003 (10:46:24 EST) WSDL2Java emitter. */package test.wsdl.date;public class MyServiceServiceTestCase extends junit.framework.TestCase { public MyServiceServiceTestCase(java.lang.String name) { super(name); } public void testtestdateWSDL() throws Exception { javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance(); java.net.URL url = new java.net.URL(new test.wsdl.date.MyServiceServiceLocator().gettestdateAddress() + "?WSDL"); javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.date.MyServiceServiceLocator().getServiceName()); assertTrue(service != null); } public void test1testdateGetInfo() throws Exception { test.wsdl.date.TestdateSoapBindingStub binding; try { binding = (test.wsdl.date.TestdateSoapBindingStub) new test.wsdl.date.MyServiceServiceLocator().gettestdate(); } 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 test.wsdl.date.MyBean value = null; value = binding.getInfo(); // TBD - validate results System.out.println(value.getDate()); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -