📄 marshall2servicetestcase.java
字号:
// Test operation test.wsdl.marshall2.types.StringTestResponse value = null; value = binding.stringTest(new test.wsdl.marshall2.types.StringTest("foo")); // TBD - validate results } public void test21Marshall2PortQnameTest() 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.QNameTestResponse value = null; value = binding.qnameTest(new test.wsdl.marshall2.types.QNameTest(Constants.QNAME_FAULTDETAIL_HOSTNAME)); // TBD - validate results } public void test22Marshall2PortQnameArrayTest() 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.QNameArrayTestResponse value = null; value = binding.qnameArrayTest(new test.wsdl.marshall2.types.QNameArrayTest(new QName[]{Constants.QNAME_FAULTDETAIL_HOSTNAME,Constants.QNAME_FAULTDETAIL_EXCEPTIONNAME, new QName("someLocalPart"), new QName("http://someURI.org/", "someLocalPart"), null })); // TBD - validate results } public void test23Marshall2PortCalendarArrayTest() 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.CalendarArrayTestResponse value = null; value = binding.calendarArrayTest(new test.wsdl.marshall2.types.CalendarArrayTest(new Calendar[]{Calendar.getInstance(), new GregorianCalendar(96,5,1), new GregorianCalendar(99,10,25), null })); } public void test24Marshall2PortCalendarTest() 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.CalendarTestResponse value = null; value = binding.calendarTest(new test.wsdl.marshall2.types.CalendarTest(Calendar.getInstance())); // TBD - validate results } public void test25Marshall2PortJavaBeanArrayTest() 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); JavaBean b = new JavaBean(); b.setMyBigDecimal(new BigDecimal(4)); b.setMyBigInteger(new BigInteger("5")); b.setMyBoolean(false); b.setMyByte((byte)0x1); b.setMyCalendar(Calendar.getInstance()); b.setMyDouble(4); b.setMyFloat(5); b.setMyInt(6); b.setMyLong(3); b.setMyString("sdfsdf"); b.setMyJavaBean(new JavaBean2(new BigDecimal(5), (double)5, (long)2, (short)1, (int)1, Calendar.getInstance(), (byte)0x1, true, "xxx", new BigInteger("4"), (float)3)); JavaBean b2 = new JavaBean(); b2.setMyBigDecimal(new BigDecimal(4)); b2.setMyBigInteger(new BigInteger("5")); b2.setMyBoolean(false); b2.setMyByte((byte)0x1); b2.setMyCalendar(Calendar.getInstance()); b2.setMyDouble(4); b2.setMyFloat(5); b2.setMyInt(6); b2.setMyLong(3); b2.setMyString("sdfsdf"); b2.setMyJavaBean(new JavaBean2(new BigDecimal(5), (double)5, (long)2, (short)1, (int)1, Calendar.getInstance(), (byte)0x1, true, "xxx", new BigInteger("4"), (float)3)); // Test operation test.wsdl.marshall2.types.JavaBeanArrayTestResponse value = null; value = binding.javaBeanArrayTest(new test.wsdl.marshall2.types.JavaBeanArrayTest(new JavaBean[]{b,b2})); // TBD - validate results } public void test26Marshall2PortJavaBeanTest() 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); JavaBean b = new JavaBean(); b.setMyBigDecimal(new BigDecimal(4)); b.setMyBigInteger(new BigInteger("5")); b.setMyBoolean(false); b.setMyByte((byte)0x1); b.setMyCalendar(Calendar.getInstance()); b.setMyDouble(4); b.setMyFloat(5); b.setMyInt(6); b.setMyLong(3); b.setMyString("sdfsdf"); b.setMyJavaBean(new JavaBean2(new BigDecimal(5), (double)5, (long)2, (short)1, (int)1, Calendar.getInstance(), (byte)0x1, true, "xxx", new BigInteger("4"), (float)3)); // Time out after a minute binding.setTimeout(60000); // Test operation test.wsdl.marshall2.types.JavaBeanTestResponse value = null; value = binding.javaBeanTest(new test.wsdl.marshall2.types.JavaBeanTest(b)); // TBD - validate results } public void test27Marshall2PortAnyURITest() 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); URI b = new URI("urn:something"); // Time out after a minute binding.setTimeout(60000); // Test operation test.wsdl.marshall2.types.FooAnyURITypeResponse value = null; value = binding.fooAnyURITest(new test.wsdl.marshall2.types.FooAnyURIType(b)); // TBD - validate results }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -