📄 basetypesinteropteststestcase.java
字号:
/** * BaseTypesInteropTestsTestCase.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */package test.wsdl.interop5.basetype;import org.apache.axis.types.NMToken;import org.apache.axis.types.NMTokens;import org.apache.axis.types.IDRef;import org.apache.axis.types.IDRefs;import java.net.URL;public class BaseTypesInteropTestsTestCase extends junit.framework.TestCase { public static URL url = null; public static void main(String[] args) throws Exception { if (args.length == 1) { url = new URL(args[0]); } else { url = new URL(new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPortAddress()); } junit.textui.TestRunner.run(new junit.framework.TestSuite(BaseTypesInteropTestsTestCase.class)); } // main protected void setUp() throws Exception { if (url == null) { String urlStr = System.getProperty("testURL"); if (urlStr != null) { url = new URL(urlStr); } } if(url == null) { url = new URL(new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPortAddress()); } } public BaseTypesInteropTestsTestCase(java.lang.String name) { super(name); } public void testInteropTestsPortWSDL() throws Exception { javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance(); java.net.URL url = new java.net.URL(new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPortAddress() + "?WSDL"); javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getServiceName()); assertTrue(service != null); } public void test1InteropTestsPortEchoDouble() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation double value = -3; value = binding.echoDouble(0); // TBD - validate results } public void test2InteropTestsPortEchoDuration() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation org.apache.axis.types.Duration value = null; value = binding.echoDuration(new org.apache.axis.types.Duration()); // TBD - validate results } public void test3InteropTestsPortEchoDateTime() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation java.util.Calendar value = null; value = binding.echoDateTime(java.util.Calendar.getInstance()); // TBD - validate results } public void test4InteropTestsPortEchoTime() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation org.apache.axis.types.Time value = null; value = binding.echoTime(new org.apache.axis.types.Time("15:45:45.275Z")); // TBD - validate results } public void test5InteropTestsPortEchoGYearMonth() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation org.apache.axis.types.YearMonth value = null; value = binding.echoGYearMonth(new org.apache.axis.types.YearMonth(2000,1)); // TBD - validate results } public void test6InteropTestsPortEchoGYear() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation org.apache.axis.types.Year value = null; value = binding.echoGYear(new org.apache.axis.types.Year(2000)); // TBD - validate results } public void test7InteropTestsPortEchoGMonthDay() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation org.apache.axis.types.MonthDay value = null; value = binding.echoGMonthDay(new org.apache.axis.types.MonthDay(1, 1)); // TBD - validate results } public void test8InteropTestsPortEchoGDay() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation org.apache.axis.types.Day value = null; value = binding.echoGDay(new org.apache.axis.types.Day(1)); // TBD - validate results } public void test9InteropTestsPortEchoGMonth() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation org.apache.axis.types.Month value = null; value = binding.echoGMonth(new org.apache.axis.types.Month(1)); // TBD - validate results } public void test10InteropTestsPortEchoAnyURI() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation org.apache.axis.types.URI value = null; value = binding.echoAnyURI(new org.apache.axis.types.URI("urn:testing")); // TBD - validate results } public void test11InteropTestsPortEchoQName() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation javax.xml.namespace.QName value = null; value = binding.echoQName(new javax.xml.namespace.QName("http://double-double", "toil-and-trouble")); // TBD - validate results } public void test12InteropTestsPortEchoNotation() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation org.apache.axis.types.Notation value = null; value = binding.echoNotation(new org.apache.axis.types.Notation()); // TBD - validate results } public void test13InteropTestsPortEchoLanguage() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation org.apache.axis.types.Language value = null; value = binding.echoLanguage(new org.apache.axis.types.Language()); // TBD - validate results } public void test14InteropTestsPortEchoNMToken() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation org.apache.axis.types.NMToken value = null; NMToken token = new NMToken(); token.setValue("eye_am_an_en_em_tokin"); value = binding.echoNMToken(token); assertEquals(token, value); } public void test15InteropTestsPortEchoNMTokens() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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); // Test operation org.apache.axis.types.NMTokens value = null; NMTokens tokens = new NMTokens(); tokens.setValue("one two three"); value = binding.echoNMTokens(tokens); assertEquals(tokens, value); } public void test16InteropTestsPortEchoName() throws Exception { test.wsdl.interop5.basetype.InteropTestsExpType binding; try { binding = new test.wsdl.interop5.basetype.BaseTypesInteropTestsLocator().getInteropTestsPort(url); } 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);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -