📄 marshall2servicetestcase.java
字号:
/** * Marshall2ServiceTestCase.java * * This file was auto-generated from WSDL * by the Apache Axis 1.2RC3 Feb 14, 2005 (08:56:33 EST) WSDL2Java emitter. */package test.wsdl.marshall2;import org.apache.axis.Constants;import javax.xml.namespace.QName;import java.math.BigDecimal;import java.math.BigInteger;import java.util.Calendar;import java.util.GregorianCalendar;import java.net.URI;import test.wsdl.marshall2.types.JavaBean;import test.wsdl.marshall2.types.JavaBean2;public class Marshall2ServiceTestCase extends junit.framework.TestCase { public Marshall2ServiceTestCase(java.lang.String name) { super(name); } public void testMarshall2PortWSDL() throws Exception { javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance(); java.net.URL url = new java.net.URL(new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2PortAddress() + "?WSDL"); javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.marshall2.Marshall2ServiceLocator().getServiceName()); assertTrue(service != null); } public void test1Marshall2PortBigDecimalArrayTest() throws Exception { test.wsdl.marshall2.MarshallTestSoapBindingStub binding; try { binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); } 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.marshall2.types.BigDecimalArrayTestResponse value = null; value = binding.bigDecimalArrayTest(new test.wsdl.marshall2.types.BigDecimalArrayTest(new BigDecimal[]{new BigDecimal("5.0"), new BigDecimal("3512359.1456"), new BigDecimal("3512360.1456"), null })); } public void test2Marshall2PortBigDecimalTest() throws Exception { test.wsdl.marshall2.MarshallTestSoapBindingStub binding; try { binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); } 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.marshall2.types.BigDecimalTestResponse value = null; value = binding.bigDecimalTest(new test.wsdl.marshall2.types.BigDecimalTest(new BigDecimal("5.0"))); // TBD - validate results } public void test3Marshall2PortBigIntegerArrayTest() throws Exception { test.wsdl.marshall2.MarshallTestSoapBindingStub binding; try { binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); } 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.marshall2.types.BigIntegerArrayTestResponse value = null; value = binding.bigIntegerArrayTest(new test.wsdl.marshall2.types.BigIntegerArrayTest(new BigInteger[]{new BigInteger("5"), new BigInteger("3512359"), new BigInteger("3512360"), null })); // TBD - validate results } public void test4Marshall2PortBigIntegerTest() throws Exception { test.wsdl.marshall2.MarshallTestSoapBindingStub binding; try { binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); } 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.marshall2.types.BigIntegerTestResponse value = null; value = binding.bigIntegerTest(new test.wsdl.marshall2.types.BigIntegerTest(new BigInteger("8"))); // TBD - validate results } public void test5Marshall2PortBooleanArrayTest() throws Exception { test.wsdl.marshall2.MarshallTestSoapBindingStub binding; try { binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); } 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.marshall2.types.BooleanArrayTestResponse value = null; value = binding.booleanArrayTest(new test.wsdl.marshall2.types.BooleanArrayTest(new boolean[]{true,false})); // TBD - validate results } public void test6Marshall2PortBooleanTest() throws Exception { test.wsdl.marshall2.MarshallTestSoapBindingStub binding; try { binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); } 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.marshall2.types.BooleanTestResponse value = null; value = binding.booleanTest(new test.wsdl.marshall2.types.BooleanTest(true)); // TBD - validate results } public void test7Marshall2PortByteArrayTest() throws Exception { test.wsdl.marshall2.MarshallTestSoapBindingStub binding; try { binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); } 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.marshall2.types.ByteArrayTestResponse value = null; value = binding.byteArrayTest(new test.wsdl.marshall2.types.ByteArrayTest("hello".getBytes())); // TBD - validate results } public void test8Marshall2PortByteTest() throws Exception { test.wsdl.marshall2.MarshallTestSoapBindingStub binding; try { binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); } 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.marshall2.types.ByteTestResponse value = null; value = binding.byteTest(new test.wsdl.marshall2.types.ByteTest("x".getBytes()[0])); // TBD - validate results } public void test9Marshall2PortDoubleArrayTest() throws Exception { test.wsdl.marshall2.MarshallTestSoapBindingStub binding; try { binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); } 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.marshall2.types.DoubleArrayTestResponse value = null; value = binding.doubleArrayTest(new test.wsdl.marshall2.types.DoubleArrayTest(new double[]{4,5})); // TBD - validate results } public void test10Marshall2PortDoubleTest() throws Exception {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -