wlapi 0.8.6 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,221 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://anonymous:anonymous@wortschatz.uni-leipzig.de/axis/services/Wordforms?wsdl
6
+ body:
7
+ string: ""
8
+ headers:
9
+ Accept:
10
+ - "*/*"
11
+ response:
12
+ status:
13
+ code: 200
14
+ message: OK
15
+ headers:
16
+ Content-Type:
17
+ - text/xml;charset=utf-8
18
+ Transfer-Encoding:
19
+ - chunked
20
+ Date:
21
+ - Sun, 27 Jul 2014 21:53:30 GMT
22
+ Server:
23
+ - Apache-Coyote/1.1
24
+ X-Cache:
25
+ - MISS from wortschatz.uni-leipzig.de
26
+ body:
27
+ string: |
28
+ <?xml version="1.0" encoding="UTF-8"?>
29
+ <wsdl:definitions targetNamespace="urn:Wordforms" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:Wordforms" xmlns:intf="urn:Wordforms" xmlns:tns1="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
30
+ <!--WSDL created by Apache Axis version: 1.2RC3
31
+ Built on Mar 28, 2005 (10:34:47 CEST)-->
32
+ <wsdl:types>
33
+ <schema elementFormDefault="qualified" targetNamespace="urn:Wordforms" xmlns="http://www.w3.org/2001/XMLSchema">
34
+ <import namespace="http://datatypes.webservice.wortschatz.uni_leipzig.de"/>
35
+ <element name="execute">
36
+ <complexType>
37
+ <sequence>
38
+ <element name="objRequestParameters" type="impl:RequestParameter"/>
39
+ </sequence>
40
+ </complexType>
41
+ </element>
42
+ <complexType name="DataMatrix">
43
+ <sequence>
44
+ <element maxOccurs="unbounded" name="dataVectors" type="tns1:DataVector"/>
45
+ </sequence>
46
+ </complexType>
47
+ <complexType name="RequestParameter">
48
+ <sequence>
49
+ <element name="corpus" nillable="true" type="xsd:string"/>
50
+ <element name="parameters" nillable="true" type="impl:DataMatrix"/>
51
+ </sequence>
52
+ </complexType>
53
+ <element name="executeResponse">
54
+ <complexType>
55
+ <sequence>
56
+ <element name="executeReturn" type="impl:ResponseParameter"/>
57
+ </sequence>
58
+ </complexType>
59
+ </element>
60
+ <complexType name="ResponseParameter">
61
+ <sequence>
62
+ <element name="executionTime" nillable="true" type="xsd:string"/>
63
+ <element name="result" nillable="true" type="impl:DataMatrix"/>
64
+ <element name="serviceMagnitude" type="xsd:int"/>
65
+ <element name="userAmount" type="xsd:int"/>
66
+ <element name="userMaxLimit" type="xsd:int"/>
67
+ </sequence>
68
+ </complexType>
69
+ <element name="ping">
70
+ <complexType/>
71
+ </element>
72
+ <element name="pingResponse">
73
+ <complexType>
74
+ <sequence>
75
+ <element name="pingReturn" type="xsd:string"/>
76
+ </sequence>
77
+ </complexType>
78
+ </element>
79
+ </schema>
80
+ <schema elementFormDefault="qualified" targetNamespace="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns="http://www.w3.org/2001/XMLSchema">
81
+ <import namespace="urn:Wordforms"/>
82
+ <complexType name="DataVector">
83
+ <sequence>
84
+ <element maxOccurs="unbounded" name="dataRow" type="xsd:string"/>
85
+ </sequence>
86
+ </complexType>
87
+ </schema>
88
+ </wsdl:types>
89
+
90
+ <wsdl:message name="executeRequest">
91
+
92
+ <wsdl:part element="impl:execute" name="parameters"/>
93
+
94
+ </wsdl:message>
95
+
96
+ <wsdl:message name="pingRequest">
97
+
98
+ <wsdl:part element="impl:ping" name="parameters"/>
99
+
100
+ </wsdl:message>
101
+
102
+ <wsdl:message name="pingResponse">
103
+
104
+ <wsdl:part element="impl:pingResponse" name="parameters"/>
105
+
106
+ </wsdl:message>
107
+
108
+ <wsdl:message name="executeResponse">
109
+
110
+ <wsdl:part element="impl:executeResponse" name="parameters"/>
111
+
112
+ </wsdl:message>
113
+
114
+ <wsdl:portType name="Wordforms">
115
+
116
+ <wsdl:operation name="execute">
117
+
118
+ <wsdl:input message="impl:executeRequest" name="executeRequest"/>
119
+
120
+ <wsdl:output message="impl:executeResponse" name="executeResponse"/>
121
+
122
+ </wsdl:operation>
123
+
124
+ <wsdl:operation name="ping">
125
+
126
+ <wsdl:input message="impl:pingRequest" name="pingRequest"/>
127
+
128
+ <wsdl:output message="impl:pingResponse" name="pingResponse"/>
129
+
130
+ </wsdl:operation>
131
+
132
+ </wsdl:portType>
133
+
134
+ <wsdl:binding name="WordformsSoapBinding" type="impl:Wordforms">
135
+
136
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
137
+
138
+ <wsdl:operation name="execute">
139
+
140
+ <wsdlsoap:operation soapAction=""/>
141
+
142
+ <wsdl:input name="executeRequest">
143
+
144
+ <wsdlsoap:body use="literal"/>
145
+
146
+ </wsdl:input>
147
+
148
+ <wsdl:output name="executeResponse">
149
+
150
+ <wsdlsoap:body use="literal"/>
151
+
152
+ </wsdl:output>
153
+
154
+ </wsdl:operation>
155
+
156
+ <wsdl:operation name="ping">
157
+
158
+ <wsdlsoap:operation soapAction=""/>
159
+
160
+ <wsdl:input name="pingRequest">
161
+
162
+ <wsdlsoap:body use="literal"/>
163
+
164
+ </wsdl:input>
165
+
166
+ <wsdl:output name="pingResponse">
167
+
168
+ <wsdlsoap:body use="literal"/>
169
+
170
+ </wsdl:output>
171
+
172
+ </wsdl:operation>
173
+
174
+ </wsdl:binding>
175
+
176
+ <wsdl:service name="WordformsService">
177
+
178
+ <wsdl:port binding="impl:WordformsSoapBinding" name="Wordforms">
179
+
180
+ <wsdlsoap:address location="http://wortschatz.uni-leipzig.de:8100/axis/services/Wordforms"/>
181
+
182
+ </wsdl:port>
183
+
184
+ </wsdl:service>
185
+
186
+ </wsdl:definitions>
187
+
188
+ http_version:
189
+ recorded_at: Sun, 27 Jul 2014 21:53:33 GMT
190
+ - request:
191
+ method: post
192
+ uri: http://anonymous:anonymous@wortschatz.uni-leipzig.de:8100/axis/services/Wordforms
193
+ body:
194
+ string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:dat="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ins0="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:impl="urn:Wordforms" xmlns:urn="http://wortschatz.uni-leipzig.de/axis/services/Wordforms" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><impl:execute><urn:objRequestParameters><urn:parameters><urn:dataVectors><dat:dataRow>Word</dat:dataRow><dat:dataRow>Buch</dat:dataRow></urn:dataVectors><urn:dataVectors><dat:dataRow>Limit</dat:dataRow><dat:dataRow>10</dat:dataRow></urn:dataVectors></urn:parameters><urn:corpus>de</urn:corpus></urn:objRequestParameters></impl:execute></env:Body></env:Envelope>
195
+ headers:
196
+ Content-Length:
197
+ - "805"
198
+ Soapaction:
199
+ - "\"execute\""
200
+ Content-Type:
201
+ - text/xml;charset=UTF-8
202
+ Accept:
203
+ - "*/*"
204
+ response:
205
+ status:
206
+ code: 200
207
+ message: OK
208
+ headers:
209
+ Content-Type:
210
+ - text/xml;charset=utf-8
211
+ Transfer-Encoding:
212
+ - chunked
213
+ Date:
214
+ - Sun, 27 Jul 2014 21:53:30 GMT
215
+ Server:
216
+ - Apache-Coyote/1.1
217
+ body:
218
+ string: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><executeResponse xmlns="urn:Wordforms"><executeReturn><executionTime>0.011 s</executionTime><result><ns1:dataVectors xsi:type="ns2:DataVector" xmlns:ns1="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:ns2="urn:Wordforms"><ns1:dataRow>Buch</ns1:dataRow></ns1:dataVectors><ns3:dataVectors xsi:type="ns4:DataVector" xmlns:ns3="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:ns4="urn:Wordforms"><ns3:dataRow>B&#xFC;cher</ns3:dataRow></ns3:dataVectors><ns5:dataVectors xsi:type="ns6:DataVector" xmlns:ns5="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:ns6="urn:Wordforms"><ns5:dataRow>B&#xFC;chern</ns5:dataRow></ns5:dataVectors><ns7:dataVectors xsi:type="ns8:DataVector" xmlns:ns7="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:ns8="urn:Wordforms"><ns7:dataRow>Buches</ns7:dataRow></ns7:dataVectors><ns9:dataVectors xsi:type="ns10:DataVector" xmlns:ns9="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:ns10="urn:Wordforms"><ns9:dataRow>Buchs</ns9:dataRow></ns9:dataVectors><ns11:dataVectors xsi:type="ns12:DataVector" xmlns:ns11="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:ns12="urn:Wordforms"><ns11:dataRow>Bucher</ns11:dataRow></ns11:dataVectors></result><serviceMagnitude>0</serviceMagnitude><userAmount>1999241783</userAmount><userMaxLimit>-100</userMaxLimit></executeReturn></executeResponse></soapenv:Body></soapenv:Envelope>
219
+ http_version:
220
+ recorded_at: Sun, 27 Jul 2014 21:53:33 GMT
221
+ recorded_with: VCR 2.9.2
@@ -0,0 +1,221 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://anonymous:anonymous@wortschatz.uni-leipzig.de/axis/services/Wordforms?wsdl
6
+ body:
7
+ string: ""
8
+ headers:
9
+ Accept:
10
+ - "*/*"
11
+ response:
12
+ status:
13
+ code: 200
14
+ message: OK
15
+ headers:
16
+ Transfer-Encoding:
17
+ - chunked
18
+ Content-Type:
19
+ - text/xml;charset=utf-8
20
+ Date:
21
+ - Tue, 29 Jul 2014 10:20:11 GMT
22
+ Server:
23
+ - Apache-Coyote/1.1
24
+ X-Cache:
25
+ - MISS from wortschatz.uni-leipzig.de
26
+ body:
27
+ string: |
28
+ <?xml version="1.0" encoding="UTF-8"?>
29
+ <wsdl:definitions targetNamespace="urn:Wordforms" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:Wordforms" xmlns:intf="urn:Wordforms" xmlns:tns1="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
30
+ <!--WSDL created by Apache Axis version: 1.2RC3
31
+ Built on Mar 28, 2005 (10:34:47 CEST)-->
32
+ <wsdl:types>
33
+ <schema elementFormDefault="qualified" targetNamespace="urn:Wordforms" xmlns="http://www.w3.org/2001/XMLSchema">
34
+ <import namespace="http://datatypes.webservice.wortschatz.uni_leipzig.de"/>
35
+ <element name="execute">
36
+ <complexType>
37
+ <sequence>
38
+ <element name="objRequestParameters" type="impl:RequestParameter"/>
39
+ </sequence>
40
+ </complexType>
41
+ </element>
42
+ <complexType name="DataMatrix">
43
+ <sequence>
44
+ <element maxOccurs="unbounded" name="dataVectors" type="tns1:DataVector"/>
45
+ </sequence>
46
+ </complexType>
47
+ <complexType name="RequestParameter">
48
+ <sequence>
49
+ <element name="corpus" nillable="true" type="xsd:string"/>
50
+ <element name="parameters" nillable="true" type="impl:DataMatrix"/>
51
+ </sequence>
52
+ </complexType>
53
+ <element name="executeResponse">
54
+ <complexType>
55
+ <sequence>
56
+ <element name="executeReturn" type="impl:ResponseParameter"/>
57
+ </sequence>
58
+ </complexType>
59
+ </element>
60
+ <complexType name="ResponseParameter">
61
+ <sequence>
62
+ <element name="executionTime" nillable="true" type="xsd:string"/>
63
+ <element name="result" nillable="true" type="impl:DataMatrix"/>
64
+ <element name="serviceMagnitude" type="xsd:int"/>
65
+ <element name="userAmount" type="xsd:int"/>
66
+ <element name="userMaxLimit" type="xsd:int"/>
67
+ </sequence>
68
+ </complexType>
69
+ <element name="ping">
70
+ <complexType/>
71
+ </element>
72
+ <element name="pingResponse">
73
+ <complexType>
74
+ <sequence>
75
+ <element name="pingReturn" type="xsd:string"/>
76
+ </sequence>
77
+ </complexType>
78
+ </element>
79
+ </schema>
80
+ <schema elementFormDefault="qualified" targetNamespace="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns="http://www.w3.org/2001/XMLSchema">
81
+ <import namespace="urn:Wordforms"/>
82
+ <complexType name="DataVector">
83
+ <sequence>
84
+ <element maxOccurs="unbounded" name="dataRow" type="xsd:string"/>
85
+ </sequence>
86
+ </complexType>
87
+ </schema>
88
+ </wsdl:types>
89
+
90
+ <wsdl:message name="executeRequest">
91
+
92
+ <wsdl:part element="impl:execute" name="parameters"/>
93
+
94
+ </wsdl:message>
95
+
96
+ <wsdl:message name="pingRequest">
97
+
98
+ <wsdl:part element="impl:ping" name="parameters"/>
99
+
100
+ </wsdl:message>
101
+
102
+ <wsdl:message name="pingResponse">
103
+
104
+ <wsdl:part element="impl:pingResponse" name="parameters"/>
105
+
106
+ </wsdl:message>
107
+
108
+ <wsdl:message name="executeResponse">
109
+
110
+ <wsdl:part element="impl:executeResponse" name="parameters"/>
111
+
112
+ </wsdl:message>
113
+
114
+ <wsdl:portType name="Wordforms">
115
+
116
+ <wsdl:operation name="execute">
117
+
118
+ <wsdl:input message="impl:executeRequest" name="executeRequest"/>
119
+
120
+ <wsdl:output message="impl:executeResponse" name="executeResponse"/>
121
+
122
+ </wsdl:operation>
123
+
124
+ <wsdl:operation name="ping">
125
+
126
+ <wsdl:input message="impl:pingRequest" name="pingRequest"/>
127
+
128
+ <wsdl:output message="impl:pingResponse" name="pingResponse"/>
129
+
130
+ </wsdl:operation>
131
+
132
+ </wsdl:portType>
133
+
134
+ <wsdl:binding name="WordformsSoapBinding" type="impl:Wordforms">
135
+
136
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
137
+
138
+ <wsdl:operation name="execute">
139
+
140
+ <wsdlsoap:operation soapAction=""/>
141
+
142
+ <wsdl:input name="executeRequest">
143
+
144
+ <wsdlsoap:body use="literal"/>
145
+
146
+ </wsdl:input>
147
+
148
+ <wsdl:output name="executeResponse">
149
+
150
+ <wsdlsoap:body use="literal"/>
151
+
152
+ </wsdl:output>
153
+
154
+ </wsdl:operation>
155
+
156
+ <wsdl:operation name="ping">
157
+
158
+ <wsdlsoap:operation soapAction=""/>
159
+
160
+ <wsdl:input name="pingRequest">
161
+
162
+ <wsdlsoap:body use="literal"/>
163
+
164
+ </wsdl:input>
165
+
166
+ <wsdl:output name="pingResponse">
167
+
168
+ <wsdlsoap:body use="literal"/>
169
+
170
+ </wsdl:output>
171
+
172
+ </wsdl:operation>
173
+
174
+ </wsdl:binding>
175
+
176
+ <wsdl:service name="WordformsService">
177
+
178
+ <wsdl:port binding="impl:WordformsSoapBinding" name="Wordforms">
179
+
180
+ <wsdlsoap:address location="http://wortschatz.uni-leipzig.de:8100/axis/services/Wordforms"/>
181
+
182
+ </wsdl:port>
183
+
184
+ </wsdl:service>
185
+
186
+ </wsdl:definitions>
187
+
188
+ http_version:
189
+ recorded_at: Tue, 29 Jul 2014 10:20:11 GMT
190
+ - request:
191
+ method: post
192
+ uri: http://anonymous:anonymous@wortschatz.uni-leipzig.de:8100/axis/services/Wordforms
193
+ body:
194
+ string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:urn="http://wortschatz.uni-leipzig.de/axis/services/Wordforms" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dat="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:impl="urn:Wordforms" xmlns:ins0="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Body><impl:execute><urn:objRequestParameters><urn:parameters><urn:dataVectors><dat:dataRow>Word</dat:dataRow><dat:dataRow>Buch</dat:dataRow></urn:dataVectors><urn:dataVectors><dat:dataRow>Limit</dat:dataRow><dat:dataRow>10</dat:dataRow></urn:dataVectors></urn:parameters><urn:corpus>de</urn:corpus></urn:objRequestParameters></impl:execute></env:Body></env:Envelope>
195
+ headers:
196
+ Accept:
197
+ - "*/*"
198
+ Content-Type:
199
+ - text/xml;charset=UTF-8
200
+ Soapaction:
201
+ - "\"execute\""
202
+ Content-Length:
203
+ - "805"
204
+ response:
205
+ status:
206
+ code: 200
207
+ message: OK
208
+ headers:
209
+ Transfer-Encoding:
210
+ - chunked
211
+ Content-Type:
212
+ - text/xml;charset=utf-8
213
+ Date:
214
+ - Tue, 29 Jul 2014 10:20:11 GMT
215
+ Server:
216
+ - Apache-Coyote/1.1
217
+ body:
218
+ string: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><executeResponse xmlns="urn:Wordforms"><executeReturn><executionTime>0.016 s</executionTime><result><ns1:dataVectors xsi:type="ns2:DataVector" xmlns:ns1="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:ns2="urn:Wordforms"><ns1:dataRow>Buch</ns1:dataRow></ns1:dataVectors><ns3:dataVectors xsi:type="ns4:DataVector" xmlns:ns3="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:ns4="urn:Wordforms"><ns3:dataRow>B&#xFC;cher</ns3:dataRow></ns3:dataVectors><ns5:dataVectors xsi:type="ns6:DataVector" xmlns:ns5="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:ns6="urn:Wordforms"><ns5:dataRow>B&#xFC;chern</ns5:dataRow></ns5:dataVectors><ns7:dataVectors xsi:type="ns8:DataVector" xmlns:ns7="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:ns8="urn:Wordforms"><ns7:dataRow>Buches</ns7:dataRow></ns7:dataVectors><ns9:dataVectors xsi:type="ns10:DataVector" xmlns:ns9="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:ns10="urn:Wordforms"><ns9:dataRow>Buchs</ns9:dataRow></ns9:dataVectors><ns11:dataVectors xsi:type="ns12:DataVector" xmlns:ns11="http://datatypes.webservice.wortschatz.uni_leipzig.de" xmlns:ns12="urn:Wordforms"><ns11:dataRow>Bucher</ns11:dataRow></ns11:dataVectors></result><serviceMagnitude>0</serviceMagnitude><userAmount>1999241783</userAmount><userMaxLimit>-100</userMaxLimit></executeReturn></executeResponse></soapenv:Body></soapenv:Envelope>
219
+ http_version:
220
+ recorded_at: Tue, 29 Jul 2014 10:20:11 GMT
221
+ recorded_with: VCR 2.9.2
@@ -1,13 +1,18 @@
1
1
  # -*- coding: utf-8 -*-
2
+ require 'yaml'
2
3
  require 'test/unit'
3
4
  require 'test_helper.rb'
4
5
  require 'wlapi'
5
6
 
6
7
  class TestApi < Test::Unit::TestCase
7
8
  include TestHelper
9
+
10
+ credentials = YAML.load_file('SENSITIVE')['credentials']
11
+ USER = credentials['user']
12
+ PASS = credentials['pass']
8
13
 
9
14
  def setup
10
- @api = WLAPI::API.new
15
+ @api = WLAPI::API.new(USER, PASS)
11
16
  end
12
17
 
13
18
  def teardown