Debian Codegraph @

test/wsdl/webref/DoubleBackServiceTestCase.java

raw
1 /**
2 * DoubleBackPortTypeServiceTestCase.java
3 *
4 * This file was auto-generated from WSDL
5 * by the Apache Axis 1.2beta May 06, 2004 (03:41:36 CEST) WSDL2Java emitter.
6 */
7
8 package test.wsdl.webref;
9
10 public class DoubleBackServiceTestCase extends junit.framework.TestCase {
11 public DoubleBackServiceTestCase(java.lang.String name) {
12 super(name);
13 }
14
15 public void testDoubleBackServiceWSDL() throws Exception {
16 javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
17 java.net.URL url = new java.net.URL(new test.wsdl.webref.DoubleBackPortTypeServiceLocator().getDoubleBackServiceAddress() + "?WSDL");
18 javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.webref.DoubleBackPortTypeServiceLocator().getServiceName());
19 assertTrue(service != null);
20 }
21
22 public void test1DoubleBackServiceEcho() throws Exception {
23 test.wsdl.webref.DoubleBackServiceSoapBindingStub binding;
24 try {
25 binding = (test.wsdl.webref.DoubleBackServiceSoapBindingStub)
26 new test.wsdl.webref.DoubleBackPortTypeServiceLocator().getDoubleBackService();
27 }
28 catch (javax.xml.rpc.ServiceException jre) {
29 if(jre.getLinkedCause()!=null)
30 jre.getLinkedCause().printStackTrace();
31 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
32 }
33 assertNotNull("binding is null", binding);
34
35 // Time out after a minute
36 binding.setTimeout(60000);
37
38 // Test operation
39 java.lang.String value = null;
40 value = binding.echo( "hello" );
41 assertEquals( "hellohello", value);
42 }
43
44 }