File: Nested2ServiceTestCase.java

package info (click to toggle)
axis 1.4-29
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 52,100 kB
  • sloc: java: 129,124; xml: 10,602; jsp: 983; sh: 84; cs: 36; makefile: 18
file content (66 lines) | stat: -rw-r--r-- 2,716 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/**
 * Nested2ServiceTestCase.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis Wsdl2java emitter.
 */

package test.wsdl.nested;
import org.apache.axis.message.MessageElement;
import test.wsdl.nested.holders.PE_ADDRESSHolder;
import test.wsdl.nested.holders.RETURNHolder;

public class Nested2ServiceTestCase extends junit.framework.TestCase {
    public Nested2ServiceTestCase(String name) {
        super(name);
    }

    /* FIXME: RUNTIME WSDL broken.
    public void testNestedWSDL() throws Exception {
        javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
        java.net.URL url = new java.net.URL(new test.wsdl.nested.Nested2ServiceLocator().getNestedAddress() + "?WSDL");
        javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.nested.Nested2ServiceLocator().getServiceName());
        assertTrue(service != null);
    }
    */

    public void test1NestedNestedSvc2() {
        test.wsdl.nested.Nested2PortType binding;
        try {
            binding = new test.wsdl.nested.Nested2ServiceLocator().getNested();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
        }
        assertTrue("binding is null", binding != null);

        try {
            PE_ADDRESSHolder pE_ADDRESS = new PE_ADDRESSHolder();
            RETURNHolder rETURN = new RETURNHolder();
            binding.nestedSvc2(new java.lang.String("0000001000"),
                               new java.lang.String("01"),
                               new java.lang.String("00"),
                               new java.lang.String(""),
                               new java.lang.String("1000"),
                               pE_ADDRESS,
                               rETURN);
            PE_ADDRESS address = pE_ADDRESS.value;
            RETURN ret = rETURN.value;
            assertTrue("NAME is wrong", address.getNAME().equals("Becker Berlin"));
            assertTrue("LOGMSGNO is wrong", ret.getLOG_MSG_NO().equals("123456"));
            MessageElement [] any = address.get_any();
            assertNotNull("No 'any' content", any);
            assertTrue("any is wrong:" + any[0],
                       any[0].getObjectValue().equals("Test Any"));
        }
        catch (java.rmi.RemoteException re) {
            throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re);
        }
    }

    public static void main(String[] args){
        Nested2ServiceTestCase testcase = new Nested2ServiceTestCase("Nested2ServiceTestCase");
        testcase.test1NestedNestedSvc2();
    }
}