source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/src/etc/testcases/taskdefs/optional/WsdlToDotnet.xml@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 5.2 KB
Line 
1<?xml version="1.0"?>
2
3<project name="wsdl-to-java-jtest" basedir="." default="init">
4
5
6 <property environment="env"/>
7 <property name="build.dir" location="wsdl/build"/>
8 <property name="cache.dir" location="${build.dir}/cache"/>
9 <property name="src.dir" location="${build.dir}/src"/>
10 <property name="classes.dir" location="${build.dir}/classes"/>
11 <property name="local.wsdl"
12 location="wsdl/StockQuoteService.wsdl" />
13 <property name="out.csc" location="${src.dir}/out.cs"/>
14 <property name="out.app" location="${classes.dir}/out.dll"/>
15 <property name="out.type" value="module"/>
16 <property name="out.vbc" location="${src.dir}/out.vb"/>
17 <property name="endpoint"
18 value="http://nagoya.apache.org:5049/Axis/StockQuoteService.jws" />
19 <property name="endpoint.wsdl"
20 value="http://nagoya.apache.org:5049/Axis/StockQuoteService.jws?wsdl" />
21
22 <target name="init" depends="validate">
23 <mkdir dir="${build.dir}"/>
24 <mkdir dir="${cache.dir}"/>
25 <mkdir dir="${src.dir}"/>
26 <mkdir dir="${classes.dir}"/>
27 </target>
28
29 <target name="probe_for_apps" >
30 <condition property="wsdl.found">
31 <or>
32 <available file="wsdl" filepath="${env.PATH}" />
33 <available file="wsdl.exe" filepath="${env.PATH}" />
34 <available file="wsdl.exe" filepath="${env.Path}" />
35 </or>
36 </condition>
37 <echo> wsdl.found=${wsdl.found}</echo>
38 <condition property="csc.found">
39 <or>
40 <available file="csc" filepath="${env.PATH}" />
41 <available file="csc.exe" filepath="${env.PATH}" />
42 <available file="csc.exe" filepath="${env.Path}" />
43 </or>
44 </condition>
45 <echo> csc.found=${csc.found}</echo>
46 <condition property="vbc.found">
47 <or>
48 <available file="vbc" filepath="${env.PATH}" />
49 <available file="vbc.exe" filepath="${env.PATH}" />
50 <available file="vbc.exe" filepath="${env.Path}" />
51 </or>
52 </condition>
53 <echo> vbc.found=${vbc.found}</echo>
54 <condition property="dotnetapps.found">
55 <and>
56 <isset property="csc.found"/>
57 <isset property="vbc.found"/>
58 <isset property="wsdl.found"/>
59 </and>
60 </condition>
61 <echo> dotnetapps.found=${dotnetapps.found}</echo>
62 </target>
63
64 <target name="teardown">
65 <delete dir="${build.dir}"/>
66 </target>
67
68 <target name="validate" depends="probe_for_apps" >
69 <fail unless="dotnetapps.found">Needed .net apps are missing</fail>
70 </target>
71
72
73 <target name="testNoParams">
74 <wsdltodotnet/>
75 </target>
76
77 <target name="testNoSrc">
78 <wsdltodotnet destFile="${out.csc}"/>
79 </target>
80
81 <target name="testDestIsDir" depends="init">
82 <wsdltodotnet destFile="${build.dir}"
83 srcFile="${local.wsdl}"/>
84 </target>
85
86 <target name="testBothSrc" depends="init">
87 <wsdltodotnet destFile="${out.csc}"
88 srcFile="${local.wsdl}"
89 url="${endpoint.wsdl}"
90 />
91 </target>
92
93 <target name="testSrcIsDir" depends="init">
94 <wsdltodotnet destFile="${out.csc}"
95 srcFile="${build.dir}"
96 />
97 </target>
98
99 <target name="testSrcIsMissing" depends="init">
100 <wsdltodotnet destFile="${out.csc}"
101 srcFile="${build.dir}/invalidfile.wsdl"
102 />
103 </target>
104
105 <target name="testLocalWsdl" depends="init">
106 <wsdltodotnet destFile="${out.csc}"
107 srcFile="${local.wsdl}"
108 />
109 <csc
110 srcDir="${src.dir}"
111 destFile="${out.app}"
112 targetType="${out.type}"
113 />
114 <available property="app.created" file="${out.app}"/>
115 <fail unless="app.created">No app created</fail>
116 </target>
117
118 <target name="testLocalWsdlServer" depends="init">
119 <wsdltodotnet destFile="${out.csc}"
120 srcFile="${local.wsdl}"
121 server="true"
122 />
123 <csc
124 srcDir="${src.dir}"
125 destFile="${out.app}"
126 targetType="${out.type}"
127 fileAlign="512"
128 />
129 <available property="app.created" file="${out.app}"/>
130 <fail unless="app.created">No app created</fail>
131 </target>
132
133 <target name="testInvalidExtraOps" depends="init">
134 <wsdltodotnet destFile="${out.csc}"
135 srcFile="${local.wsdl}"
136 extraOptions="/newOption:not-one-known-of"
137 />
138 </target>
139
140
141
142 <target name="testLocalWsdlVB" depends="init">
143 <wsdltodotnet destFile="${out.vbc}"
144 language="VB"
145 srcFile="${local.wsdl}"
146 />
147 <vbc
148 srcDir="${src.dir}"
149 destFile="${out.app}"
150 targetType="${out.type}"
151 />
152 <available property="app.created" file="${out.app}"/>
153 <fail unless="app.created">No app created</fail>
154 </target>
155
156 <target name="testLocalWsdlServerVB"
157 depends="init" >
158 <wsdltodotnet destFile="${out.vbc}"
159 language="VB"
160 srcFile="${local.wsdl}"
161 server="true"
162 />
163 <vbc
164 srcDir="${src.dir}"
165 destFile="${out.app}"
166 targetType="${out.type}"
167 optionExplicit="true"
168 optionStrict="false"
169 optionCompare="text"
170 />
171 <available property="app.created" file="${out.app}"/>
172 <fail unless="app.created">No app created</fail>
173 </target>
174
175 <target name="testInvalidExtraOpsVB" depends="init" if="vbc.found">
176 <wsdltodotnet destFile="${out.vbc}"
177 language="VB"
178 srcFile="${local.wsdl}"
179 extraOptions="/newOption:not-one-known-of"
180 />
181 </target>
182
183</project>
Note: See TracBrowser for help on using the repository browser.