📄 round4xsdtesttestcase.java
字号:
public void test12Round4XSDTestSoapEchoDecimal() { 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.math.BigDecimal input = new java.math.BigDecimal(512); java.math.BigDecimal value = null; value = binding.echoDecimal(input); assertEquals(input, value); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test13Round4XSDTestSoapEchoBoolean() { 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 { boolean value = false; value = binding.echoBoolean(true); assertTrue("boolean value is not TRUE", value == true); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test14Round4XSDTestSoapEchoHexBinary() { 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.echoHexBinary(input); assertTrue("Array values don't match", Arrays.equals(input, value)); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test15Round4XSDTestSoapEchoComplexTypeAsSimpleTypes() { 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"); javax.xml.rpc.holders.StringHolder value1 = new javax.xml.rpc.holders.StringHolder(); javax.xml.rpc.holders.IntHolder value2 = new javax.xml.rpc.holders.IntHolder(); javax.xml.rpc.holders.FloatHolder value3 = new javax.xml.rpc.holders.FloatHolder(); binding.echoComplexTypeAsSimpleTypes(input, value1, value2, value3); assertEquals(input.getVarString(), value1.value); assertEquals(input.getVarInt(), value2.value); assertEquals(input.getVarFloat(), value3.value, 0.01F); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test16Round4XSDTestSoapEchoSimpleTypesAsComplexType() { 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 value = null; value = binding.echoSimpleTypesAsComplexType(new java.lang.String("Hello World"), 1024, 2048); assertEquals(value.getVarString(), "Hello World"); assertEquals(value.getVarInt(), 1024); assertEquals(value.getVarFloat(), 2048, 0.01F); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test17Round4XSDTestSoapEchoNestedComplexType() { 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.SOAPComplexTypeComplexType input = new test.wsdl.interop4.groupi.xsd.SOAPComplexTypeComplexType(); input.setVarFloat(512); input.setVarInt(1024); input.setVarString("Hello World"); test.wsdl.interop4.groupi.xsd.SOAPComplexType input2 = new test.wsdl.interop4.groupi.xsd.SOAPComplexType(); input2.setVarFloat(1024); input2.setVarInt(2048); input2.setVarString("Hello World"); input.setVarComplexType(input2); test.wsdl.interop4.groupi.xsd.SOAPComplexTypeComplexType value = null; value = binding.echoNestedComplexType(input); assertEquals(input, value); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test18Round4XSDTestSoapEchoNestedMultiOccurs() { 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.SOAPMultiOccursComplexType input = new test.wsdl.interop4.groupi.xsd.SOAPMultiOccursComplexType(); input.setVarFloat(512); input.setVarInt(1024); input.setVarString("H W"); test.wsdl.interop4.groupi.xsd.ArrayOfString varMultiOccurs = new test.wsdl.interop4.groupi.xsd.ArrayOfString(); varMultiOccurs.setString(new String[]{"A","B","C"}); input.setVarMultiOccurs(varMultiOccurs); test.wsdl.interop4.groupi.xsd.SOAPMultiOccursComplexType value = null; value = binding.echoNestedMultiOccurs(input); assertEquals(input, value); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test19Round4XSDTestSoapEchoChoice() { 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 { //TODO: What does this do? test.wsdl.interop4.groupi.xsd.ChoiceComplexType input = new test.wsdl.interop4.groupi.xsd.ChoiceComplexType(); input.setName0("Hello"); //input.setName1("World"); test.wsdl.interop4.groupi.xsd.ChoiceComplexType value = null; value = binding.echoChoice(input); assertEquals(input, value); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test20Round4XSDTestSoapEchoEnum() { 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.Enum input = test.wsdl.interop4.groupi.xsd.Enum.BitOne; test.wsdl.interop4.groupi.xsd.Enum value = null; value = binding.echoEnum(input); assertEquals(input, value); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test21Round4XSDTestSoapRetAnyType() { 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.Object input = new java.lang.String("Hello World"); java.lang.Object value = null; value = binding.echoAnyType(input); assertEquals(value, input); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test22Round4XSDTestSoapRetAny() { 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.EchoAnyElementInputAny input = new test.wsdl.interop4.groupi.EchoAnyElementInputAny(); org.apache.axis.message.MessageElement [] _any = new org.apache.axis.message.MessageElement [1]; _any[0] = new org.apache.axis.message.MessageElement("hello", "world"); input.set_any(_any); test.wsdl.interop4.groupi.EchoAnyElementResponseReturn value = null; value = binding.echoAnyElement(input); assertEquals(value.get_any()[0].getQName(), _any[0].getQName()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void test23Round4XSDTestSoapEchoVoidSoapHeader() { 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 { Round4XSDTestSoapStub stub = (Round4XSDTestSoapStub) binding; String namespace = url.toString(); stub.setHeader(namespace, "test1", "header1"); stub.setHeader(namespace, "test2", "header2"); binding.echoVoidSoapHeader(); assertEquals(stub.getHeader(namespace, "test1").getObjectValue(), "header1"); assertEquals(stub.getHeader(namespace, "test2").getObjectValue(), "header2"); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -