/** * Round4XSDTestTestCase.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package test.wsdl.interop4.groupi; import java.net.URL; import java.util.Arrays; import java.util.TimeZone; public class Round4XSDTestTestCase 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.interop4.groupi.Round4XSDTestLocator().getRound4XSDTestSoapAddress()); } junit.textui.TestRunner.run(new junit.framework.TestSuite(Round4XSDTestTestCase.class)); } // main public Round4XSDTestTestCase(java.lang.String name) throws Exception { super(name); if (url == null) { url = new URL(new test.wsdl.interop4.groupi.Round4XSDTestLocator().getRound4XSDTestSoapAddress()); } } public void test1Round4XSDTestSoapEchoVoid() { test.wsdl.interop4.groupi.Round4XSDTestSoap binding; try { binding = new test.wsdl.interop4.groupi.Round4XSDTestLocator().getRound4XSDTestSoap(url); } catch (javax.xml.rpc.ServiceException jre) { jre.printStackTrace(); if(jre.getLinkedCause()!=null) jre.getLinkedCause().printStackTrace(); throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } assertTrue("binding is null", binding != null); try { binding.echoVoid(); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test2Round4XSDTestSoapEchoInteger() { test.wsdl.interop4.groupi.Round4XSDTestSoap binding; try { binding = new test.wsdl.interop4.groupi.Round4XSDTestLocator().getRound4XSDTestSoap(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); try { int value = binding.echoInteger(1500); assertEquals(value, 1500); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test3Round4XSDTestSoapEchoFloat() { test.wsdl.interop4.groupi.Round4XSDTestSoap binding; try { binding = new test.wsdl.interop4.groupi.Round4XSDTestLocator().getRound4XSDTestSoap(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); try { float value = binding.echoFloat(1500); assertEquals(1500, value, 0.001F); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test4Round4XSDTestSoapEchoString() { test.wsdl.interop4.groupi.Round4XSDTestSoap binding; try { binding = new test.wsdl.interop4.groupi.Round4XSDTestLocator().getRound4XSDTestSoap(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); try { java.lang.String value = null; value = binding.echoString(new java.lang.String("Hello World")); assertEquals("Hello World", value); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test5Round4XSDTestSoapEchoBase64() { test.wsdl.interop4.groupi.Round4XSDTestSoap binding; try { binding = new test.wsdl.interop4.groupi.Round4XSDTestLocator().getRound4XSDTestSoap(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); try { byte[] input = new byte[] {0xC, 0xA, 0xF, 0xE, 0xB, 0xA, 0xB, 0xE}; byte[] value = null; value = binding.echoBase64(input); assertTrue("Array values do not match", Arrays.equals(input, value)); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test6Round4XSDTestSoapEchoDate() { test.wsdl.interop4.groupi.Round4XSDTestSoap binding; try { binding = new test.wsdl.interop4.groupi.Round4XSDTestLocator().getRound4XSDTestSoap(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); try { java.util.Calendar input = java.util.Calendar.getInstance(); input.setTimeZone(TimeZone.getTimeZone("GMT")); java.util.Calendar value = null; value = binding.echoDate(input); value.setTimeZone(TimeZone.getTimeZone("GMT")); assertEquals(input, value); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test7Round4XSDTestSoapEchoComplexType() { test.wsdl.interop4.groupi.Round4XSDTestSoap binding; try { binding = new test.wsdl.interop4.groupi.Round4XSDTestLocator().getRound4XSDTestSoap(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); try { test.wsdl.interop4.groupi.xsd.SOAPComplexType input = new test.wsdl.interop4.groupi.xsd.SOAPComplexType(); input.setVarFloat(1024); input.setVarInt(2048); input.setVarString("Hello World"); test.wsdl.interop4.groupi.xsd.SOAPComplexType value = binding.echoComplexType(input); assertEquals(input, value); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test8Round4XSDTestSoapEchoIntegerMultiOccurs() { test.wsdl.interop4.groupi.Round4XSDTestSoap binding; try { binding = new test.wsdl.interop4.groupi.Round4XSDTestLocator().getRound4XSDTestSoap(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); try { test.wsdl.interop4.groupi.ArrayOfInt input = new test.wsdl.interop4.groupi.ArrayOfInt(); int[] input2 = new int[3]; input2[0] = 512; input2[1] = 1024; input2[2] = 2048; input.set_int(input2); int[] value = null; value = binding.echoIntegerMultiOccurs(input); assertEquals(input2.length, value.length); for(int i=0;i