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

📄 marshall2servicetestcase.java

📁 Java有关XML编程需要用到axis 的源代码 把里面bin下的包导入相应的Java工程 进行使用
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
        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.DoubleTestResponse value = null;        value = binding.doubleTest(new test.wsdl.marshall2.types.DoubleTest(4));        // TBD - validate results    }    public void test11Marshall2PortFloatArrayTest() 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.FloatArrayTestResponse value = null;        value = binding.floatArrayTest(new test.wsdl.marshall2.types.FloatArrayTest(new float[]{67,75}));        // TBD - validate results    }    public void test12Marshall2PortFloatTest() 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.FloatTestResponse value = null;        value = binding.floatTest(new test.wsdl.marshall2.types.FloatTest(56));        // TBD - validate results    }    public void test13Marshall2PortIntArrayTest() 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.IntArrayTestResponse value = null;        value = binding.intArrayTest(new test.wsdl.marshall2.types.IntArrayTest(new int[]{3,4}));        // TBD - validate results    }    public void test14Marshall2PortIntTest() 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.IntTestResponse value = null;        value = binding.intTest(new test.wsdl.marshall2.types.IntTest(3));        // TBD - validate results    }    public void test15Marshall2PortLongArrayTest() 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.LongArrayTestResponse value = null;        value = binding.longArrayTest(new test.wsdl.marshall2.types.LongArrayTest(new long[]{3,4}));        // TBD - validate results    }    public void test16Marshall2PortLongTest() 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.LongTestResponse value = null;        value = binding.longTest(new test.wsdl.marshall2.types.LongTest(5467));        // TBD - validate results    }    public void test17Marshall2PortShortArrayTest() 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.ShortArrayTestResponse value = null;        value = binding.shortArrayTest(new test.wsdl.marshall2.types.ShortArrayTest(new short[]{(short)3,(short)4}));        // TBD - validate results    }    public void test18Marshall2PortShortTest() 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.ShortTestResponse value = null;        value = binding.shortTest(new test.wsdl.marshall2.types.ShortTest((short)4));        // TBD - validate results    }    public void test19Marshall2PortStringArrayTest() 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.StringArrayTestResponse value = null;        value = binding.stringArrayTest(new test.wsdl.marshall2.types.StringArrayTest(new String[]{	"foo1",                                                                                                    "foo2",                                                                                                    "foo3",                                                                                                    "",                                                                                                    null                                                                                                }));        // TBD - validate results    }    public void test20Marshall2PortStringTest() 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);

⌨️ 快捷键说明

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