File: anytype.java

package info (click to toggle)
libaws 2.5~124785-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 7,488 kB
  • ctags: 419
  • sloc: ada: 61,158; makefile: 1,262; ansic: 219; xml: 196; java: 112; python: 66; sed: 43; sh: 34
file content (86 lines) | stat: -rw-r--r-- 2,701 bytes parent folder | download
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//--------------------------------------------------------------------------
//                              Ada Web Server
//
//                         Copyright (C) 2004-2005
//                                 AdaCore
//                                                                          
//  This library is free software; you can redistribute it and/or modify    
//  it under the terms of the GNU General Public License as published by    
//  the Free Software Foundation; either version 2 of the License, or (at   
//  your option) any later version.                                         
//
//  This library is distributed in the hope that it will be useful, but     
//  WITHOUT ANY WARRANTY; without even the implied warranty of              
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       
//  General Public License for more details.                                
//
//  You should have received a copy of the GNU General Public License       
//  along with this library; if not, write to the Free Software Foundation, 
//  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.          
//
//--------------------------------------------------------------------------
//
// $Id: anytype.java 9435 2006-09-13 09:20:27Z obry $
//
// This program can be used to test the AWS SOAP/WSDL implementation using the
// Axis application server based on Tomcat.
//
// First build and launch the AWS server:
//
//    $ wsdl2aws -q -f anytype.wsdl
//    $ gnatmake -Pregtests anytype
//    $ anytype -j
//
// Create the Java stub from WSDL document:
//
//   $ java org.apache.axis.wsdl.WSDL2Java anytype.wsdl
//
// Compile generated code:
//
//   $ javac anytype/aws/*.java
//
// Compile this Java client program:
//
//   $ javac anytype.java
//
// Then execute it:
//
//   $ java anytype > janytype.res
//
// Check the resutls:
//
//   $ diff -wc janytype.res anytype.out
//
// No difference should be reported.

import anytype.aws.*;

public class anytype {

    public static void main(String args[]) throws Exception {

        // Make a service
        Anytype_Service service = new Anytype_ServiceLocator();
 
        // Now use the service to get a stub which implements the SDI.
        Anytype_PortType port = service.getanytype_Port();
 
        // Make the actual call
        // System.out.println (port.plus (12));

	int[] ti = new int[2];
	ti[0] = 12;
	ti[1] = 9;

	java.lang.Object[] ta = new java.lang.Object [3];
	ta[0] = new Integer (45);
	ta[1] = new Integer (12);
	ta[2] = new Double (8.209);

	java.lang.Object[] res = port.call (ti, ta);

	for (int k=0; k<3; k++) {
	    System.out.println ((k + 1) + " - " + res[k]);
	}
    }
}