big_register 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,8 +44,12 @@ module BIGRegister
44
44
  "WebSite" => "Ribiz",
45
45
  "RegistrationNumber" => big_number
46
46
  }
47
- response = @client.call(:list_hcp_approx3, message: message)
48
- format_response(response)
47
+ begin
48
+ response = @client.call(:list_hcp_approx3, message: message)
49
+ format_response(response)
50
+ rescue Savon::SOAPFault => e
51
+ raise NotFoundError.new(e.message)
52
+ end
49
53
  end
50
54
 
51
55
  private
@@ -69,4 +73,8 @@ module BIGRegister
69
73
  end
70
74
 
71
75
  end
76
+
77
+ class NotFoundError < StandardError
78
+ end
79
+
72
80
  end
@@ -1,3 +1,3 @@
1
1
  module BIGRegister
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -0,0 +1,331 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://webservices.cibg.nl/Ribiz/OpenbaarV2.asmx?wsdl
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - "*/*"
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Cache-Control:
22
+ - private, max-age=0
23
+ Content-Type:
24
+ - text/xml; charset=utf-8
25
+ Server:
26
+ - Microsoft-IIS/7.5
27
+ X-Aspnet-Version:
28
+ - 2.0.50727
29
+ X-Powered-By:
30
+ - ASP.NET
31
+ Date:
32
+ - Wed, 26 Feb 2014 13:48:33 GMT
33
+ Transfer-Encoding:
34
+ - chunked
35
+ Proxy-Connection:
36
+ - Keep-Alive
37
+ Connection:
38
+ - Keep-Alive
39
+ body:
40
+ encoding: UTF-8
41
+ string: "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<wsdl:definitions xmlns:s=\"http://www.w3.org/2001/XMLSchema\"
42
+ xmlns:soap12=\"http://schemas.xmlsoap.org/wsdl/soap12/\" xmlns:mime=\"http://schemas.xmlsoap.org/wsdl/mime/\"
43
+ xmlns:tns=\"http://services.cibg.nl/ExternalUser\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\"
44
+ xmlns:tm=\"http://microsoft.com/wsdl/mime/textMatching/\" xmlns:http=\"http://schemas.xmlsoap.org/wsdl/http/\"
45
+ xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" targetNamespace=\"http://services.cibg.nl/ExternalUser\"
46
+ xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\">\r\n <wsdl:types>\r\n <s:schema
47
+ elementFormDefault=\"qualified\" targetNamespace=\"http://services.cibg.nl/ExternalUser\">\r\n
48
+ \ <s:element name=\"listHcpApproxRequest\" type=\"tns:ListHcpApproxRequest\"
49
+ />\r\n <s:complexType name=\"ListHcpApproxRequest\">\r\n <s:sequence>\r\n
50
+ \ <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"WebSite\" type=\"tns:SourceWebSite\"
51
+ />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Name\" type=\"s:string\"
52
+ />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Initials\"
53
+ type=\"s:string\" />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\"
54
+ name=\"Prefix\" type=\"s:string\" />\r\n <s:element minOccurs=\"0\"
55
+ maxOccurs=\"1\" name=\"Street\" type=\"s:string\" />\r\n <s:element
56
+ minOccurs=\"0\" maxOccurs=\"1\" name=\"Gender\" type=\"s:string\" />\r\n <s:element
57
+ minOccurs=\"0\" maxOccurs=\"1\" name=\"HouseNumber\" type=\"s:string\" />\r\n
58
+ \ <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Postalcode\" type=\"s:string\"
59
+ />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"City\" type=\"s:string\"
60
+ />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"RegistrationNumber\"
61
+ type=\"s:string\" />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\"
62
+ name=\"DateOfBirth\" type=\"s:string\" />\r\n <s:element minOccurs=\"0\"
63
+ maxOccurs=\"1\" name=\"ProfessionalGroup\" type=\"s:string\" />\r\n <s:element
64
+ minOccurs=\"0\" maxOccurs=\"1\" name=\"TypeOfSpecialism\" type=\"s:string\"
65
+ />\r\n </s:sequence>\r\n </s:complexType>\r\n <s:simpleType
66
+ name=\"SourceWebSite\">\r\n <s:restriction base=\"s:string\">\r\n <s:enumeration
67
+ value=\"None\" />\r\n <s:enumeration value=\"Ribiz\" />\r\n <s:enumeration
68
+ value=\"Skp\" />\r\n </s:restriction>\r\n </s:simpleType>\r\n
69
+ \ <s:element name=\"ListHcpApprox3Result\" type=\"tns:ListHcpApproxResponse3\"
70
+ />\r\n <s:complexType name=\"ListHcpApproxResponse3\">\r\n <s:sequence>\r\n
71
+ \ <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ListHcpApprox\"
72
+ type=\"tns:ArrayOfListHcpApprox3\" />\r\n </s:sequence>\r\n </s:complexType>\r\n
73
+ \ <s:complexType name=\"ArrayOfListHcpApprox3\">\r\n <s:sequence>\r\n
74
+ \ <s:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"ListHcpApprox3\"
75
+ nillable=\"true\" type=\"tns:ListHcpApprox3\" />\r\n </s:sequence>\r\n
76
+ \ </s:complexType>\r\n <s:complexType name=\"ListHcpApprox3\">\r\n
77
+ \ <s:sequence>\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\"
78
+ name=\"HcpNumber\" type=\"s:decimal\" />\r\n <s:element minOccurs=\"0\"
79
+ maxOccurs=\"1\" name=\"BirthSurname\" type=\"s:string\" />\r\n <s:element
80
+ minOccurs=\"0\" maxOccurs=\"1\" name=\"MailingName\" type=\"s:string\" />\r\n
81
+ \ <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Prefix\" type=\"s:string\"
82
+ />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"PartnerName\"
83
+ type=\"s:string\" />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\"
84
+ name=\"PartnerNamePrefix\" type=\"s:string\" />\r\n <s:element minOccurs=\"0\"
85
+ maxOccurs=\"1\" name=\"Initial\" type=\"s:string\" />\r\n <s:element
86
+ minOccurs=\"0\" maxOccurs=\"1\" name=\"Gender\" type=\"s:string\" />\r\n <s:element
87
+ minOccurs=\"0\" maxOccurs=\"1\" name=\"WorkAddress1\" type=\"tns:Address\"
88
+ />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"WorkAddress2\"
89
+ type=\"tns:Address\" />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\"
90
+ name=\"WorkAddress3\" type=\"tns:Address\" />\r\n <s:element minOccurs=\"0\"
91
+ maxOccurs=\"1\" name=\"ArticleRegistration\" type=\"tns:ArrayOfArticleRegistrationExtApp\"
92
+ />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Specialism\"
93
+ type=\"tns:ArrayOfSpecialismExtApp\" />\r\n <s:element minOccurs=\"0\"
94
+ maxOccurs=\"1\" name=\"Mention\" type=\"tns:ArrayOfMentionExtApp\" />\r\n
95
+ \ <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"JudgmentProvision\"
96
+ type=\"tns:ArrayOfJudgmentProvisionExtApp\" />\r\n <s:element minOccurs=\"0\"
97
+ maxOccurs=\"1\" name=\"Limitation\" type=\"tns:ArrayOfLimitationExtApp\" />\r\n
98
+ \ </s:sequence>\r\n </s:complexType>\r\n <s:complexType name=\"Address\">\r\n
99
+ \ <s:sequence>\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\"
100
+ name=\"AddressTo\" type=\"s:string\" />\r\n <s:element minOccurs=\"0\"
101
+ maxOccurs=\"1\" name=\"StreetName\" type=\"s:string\" />\r\n <s:element
102
+ minOccurs=\"0\" maxOccurs=\"1\" name=\"HouseNumber\" type=\"s:string\" />\r\n
103
+ \ <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"HouseNumberAddition\"
104
+ type=\"s:string\" />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\"
105
+ name=\"PostalCode\" type=\"s:string\" />\r\n <s:element minOccurs=\"0\"
106
+ maxOccurs=\"1\" name=\"City\" type=\"s:string\" />\r\n <s:element
107
+ minOccurs=\"0\" maxOccurs=\"1\" name=\"ForeignAddress\" type=\"s:string\"
108
+ />\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"CountryCode\"
109
+ nillable=\"true\" type=\"s:decimal\" />\r\n <s:element minOccurs=\"0\"
110
+ maxOccurs=\"1\" name=\"Email\" type=\"s:string\" />\r\n <s:element
111
+ minOccurs=\"0\" maxOccurs=\"1\" name=\"TelephoneNumber\" type=\"s:string\"
112
+ />\r\n </s:sequence>\r\n </s:complexType>\r\n <s:complexType
113
+ name=\"ArrayOfArticleRegistrationExtApp\">\r\n <s:sequence>\r\n <s:element
114
+ minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"ArticleRegistrationExtApp\"
115
+ nillable=\"true\" type=\"tns:ArticleRegistrationExtApp\" />\r\n </s:sequence>\r\n
116
+ \ </s:complexType>\r\n <s:complexType name=\"ArticleRegistrationExtApp\">\r\n
117
+ \ <s:sequence>\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\"
118
+ name=\"ArticleRegistrationNumber\" type=\"s:decimal\" />\r\n <s:element
119
+ minOccurs=\"1\" maxOccurs=\"1\" name=\"ArticleRegistrationStartDate\" type=\"s:dateTime\"
120
+ />\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"ArticleRegistrationEndDate\"
121
+ type=\"s:dateTime\" />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\"
122
+ name=\"ProfessionalGroupCode\" type=\"s:string\" />\r\n </s:sequence>\r\n
123
+ \ </s:complexType>\r\n <s:complexType name=\"ArrayOfSpecialismExtApp\">\r\n
124
+ \ <s:sequence>\r\n <s:element minOccurs=\"0\" maxOccurs=\"unbounded\"
125
+ name=\"SpecialismExtApp\" nillable=\"true\" type=\"tns:SpecialismExtApp\"
126
+ />\r\n </s:sequence>\r\n </s:complexType>\r\n <s:complexType
127
+ name=\"SpecialismExtApp\">\r\n <s:sequence>\r\n <s:element
128
+ minOccurs=\"1\" maxOccurs=\"1\" name=\"SpecialismId\" type=\"s:decimal\" />\r\n
129
+ \ <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"ArticleRegistrationNumber\"
130
+ type=\"s:decimal\" />\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\"
131
+ name=\"StartDate\" type=\"s:dateTime\" />\r\n <s:element minOccurs=\"1\"
132
+ maxOccurs=\"1\" name=\"EndDate\" nillable=\"true\" type=\"s:dateTime\" />\r\n
133
+ \ <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"TypeOfSpecialismId\"
134
+ type=\"s:decimal\" />\r\n </s:sequence>\r\n </s:complexType>\r\n
135
+ \ <s:complexType name=\"ArrayOfMentionExtApp\">\r\n <s:sequence>\r\n
136
+ \ <s:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"MentionExtApp\"
137
+ nillable=\"true\" type=\"tns:MentionExtApp\" />\r\n </s:sequence>\r\n
138
+ \ </s:complexType>\r\n <s:complexType name=\"MentionExtApp\">\r\n
139
+ \ <s:sequence>\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\"
140
+ name=\"MentionId\" type=\"s:decimal\" />\r\n <s:element minOccurs=\"1\"
141
+ maxOccurs=\"1\" name=\"ArticleRegistrationNumber\" type=\"s:decimal\" />\r\n
142
+ \ <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"TypeOfMentionId\"
143
+ type=\"s:decimal\" />\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\"
144
+ name=\"StartDate\" type=\"s:dateTime\" />\r\n <s:element minOccurs=\"1\"
145
+ maxOccurs=\"1\" name=\"EndDate\" nillable=\"true\" type=\"s:dateTime\" />\r\n
146
+ \ </s:sequence>\r\n </s:complexType>\r\n <s:complexType name=\"ArrayOfJudgmentProvisionExtApp\">\r\n
147
+ \ <s:sequence>\r\n <s:element minOccurs=\"0\" maxOccurs=\"unbounded\"
148
+ name=\"JudgmentProvisionExtApp\" nillable=\"true\" type=\"tns:JudgmentProvisionExtApp\"
149
+ />\r\n </s:sequence>\r\n </s:complexType>\r\n <s:complexType
150
+ name=\"JudgmentProvisionExtApp\">\r\n <s:sequence>\r\n <s:element
151
+ minOccurs=\"1\" maxOccurs=\"1\" name=\"ArticleNumber\" type=\"s:decimal\"
152
+ />\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Id\" type=\"s:decimal\"
153
+ />\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"StartDate\"
154
+ type=\"s:dateTime\" />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\"
155
+ name=\"PublicDescription\" type=\"s:string\" />\r\n <s:element minOccurs=\"1\"
156
+ maxOccurs=\"1\" name=\"EndDate\" nillable=\"true\" type=\"s:dateTime\" />\r\n
157
+ \ <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Public\" type=\"s:boolean\"
158
+ />\r\n </s:sequence>\r\n </s:complexType>\r\n <s:complexType
159
+ name=\"ArrayOfLimitationExtApp\">\r\n <s:sequence>\r\n <s:element
160
+ minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"LimitationExtApp\" nillable=\"true\"
161
+ type=\"tns:LimitationExtApp\" />\r\n </s:sequence>\r\n </s:complexType>\r\n
162
+ \ <s:complexType name=\"LimitationExtApp\">\r\n <s:sequence>\r\n
163
+ \ <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"LimitationId\"
164
+ type=\"s:decimal\" />\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\"
165
+ name=\"ArticleRegistrationNumber\" type=\"s:decimal\" />\r\n <s:element
166
+ minOccurs=\"1\" maxOccurs=\"1\" name=\"CompetenceRegistrationId\" type=\"s:decimal\"
167
+ />\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"TypeLimitationId\"
168
+ type=\"s:decimal\" />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\"
169
+ name=\"Description\" type=\"s:string\" />\r\n <s:element minOccurs=\"1\"
170
+ maxOccurs=\"1\" name=\"StartDate\" nillable=\"true\" type=\"s:dateTime\" />\r\n
171
+ \ <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"EndDate\" nillable=\"true\"
172
+ type=\"s:dateTime\" />\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\"
173
+ name=\"ExpirationEndDate\" nillable=\"true\" type=\"s:dateTime\" />\r\n <s:element
174
+ minOccurs=\"1\" maxOccurs=\"1\" name=\"MonthsValid\" type=\"s:int\" />\r\n
175
+ \ <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"YearsValid\" type=\"s:int\"
176
+ />\r\n </s:sequence>\r\n </s:complexType>\r\n <s:element
177
+ name=\"GetRibizReferenceData\">\r\n <s:complexType>\r\n <s:sequence>\r\n
178
+ \ <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"getCibgReferenceDataRequest\"
179
+ type=\"tns:GetRibizReferenceDataRequest\" />\r\n </s:sequence>\r\n
180
+ \ </s:complexType>\r\n </s:element>\r\n <s:complexType name=\"GetRibizReferenceDataRequest\"
181
+ />\r\n <s:element name=\"GetRibizReferenceDataResponse\">\r\n <s:complexType>\r\n
182
+ \ <s:sequence>\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\"
183
+ name=\"GetRibizReferenceDataResult\" type=\"tns:GetRibizReferenceDataResponse\"
184
+ />\r\n </s:sequence>\r\n </s:complexType>\r\n </s:element>\r\n
185
+ \ <s:complexType name=\"GetRibizReferenceDataResponse\">\r\n <s:sequence>\r\n
186
+ \ <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ProfessionalGroups\"
187
+ type=\"tns:ArrayOfProfessionalGroup\" />\r\n <s:element minOccurs=\"0\"
188
+ maxOccurs=\"1\" name=\"TypeOfSpecialisms\" type=\"tns:ArrayOfTypeOfSpecialism\"
189
+ />\r\n </s:sequence>\r\n </s:complexType>\r\n <s:complexType
190
+ name=\"ArrayOfProfessionalGroup\">\r\n <s:sequence>\r\n <s:element
191
+ minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"ProfessionalGroup\" nillable=\"true\"
192
+ type=\"tns:ProfessionalGroup\" />\r\n </s:sequence>\r\n </s:complexType>\r\n
193
+ \ <s:complexType name=\"ProfessionalGroup\">\r\n <s:sequence>\r\n
194
+ \ <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Code\" type=\"s:string\"
195
+ />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Description\"
196
+ type=\"s:string\" />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\"
197
+ name=\"DescriptionEnglish\" type=\"s:string\" />\r\n <s:element minOccurs=\"0\"
198
+ maxOccurs=\"1\" name=\"Title\" type=\"s:string\" />\r\n <s:element
199
+ minOccurs=\"1\" maxOccurs=\"1\" name=\"Article3\" type=\"s:boolean\" />\r\n
200
+ \ <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Article34\" type=\"s:boolean\"
201
+ />\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"BusinessOwner\"
202
+ type=\"s:decimal\" />\r\n <s:element minOccurs=\"1\" maxOccurs=\"1\"
203
+ name=\"RequiredHoursForReregistration\" type=\"s:int\" />\r\n </s:sequence>\r\n
204
+ \ </s:complexType>\r\n <s:complexType name=\"ArrayOfTypeOfSpecialism\">\r\n
205
+ \ <s:sequence>\r\n <s:element minOccurs=\"0\" maxOccurs=\"unbounded\"
206
+ name=\"TypeOfSpecialism\" nillable=\"true\" type=\"tns:TypeOfSpecialism\"
207
+ />\r\n </s:sequence>\r\n </s:complexType>\r\n <s:complexType
208
+ name=\"TypeOfSpecialism\">\r\n <s:sequence>\r\n <s:element
209
+ minOccurs=\"1\" maxOccurs=\"1\" name=\"Code\" type=\"s:decimal\" />\r\n <s:element
210
+ minOccurs=\"0\" maxOccurs=\"1\" name=\"Description\" type=\"s:string\" />\r\n
211
+ \ <s:element minOccurs=\"0\" maxOccurs=\"1\" name=\"DescriptionEn\"
212
+ type=\"s:string\" />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\"
213
+ name=\"TitleOfSpecialist\" type=\"s:string\" />\r\n <s:element minOccurs=\"0\"
214
+ maxOccurs=\"1\" name=\"TitleOfSpecialistEn\" type=\"s:string\" />\r\n <s:element
215
+ minOccurs=\"0\" maxOccurs=\"1\" name=\"Register\" type=\"s:string\" />\r\n
216
+ \ <s:element minOccurs=\"1\" maxOccurs=\"1\" name=\"EndDate\" nillable=\"true\"
217
+ type=\"s:dateTime\" />\r\n <s:element minOccurs=\"0\" maxOccurs=\"1\"
218
+ name=\"ProfessionalGroupCode\" type=\"s:string\" />\r\n </s:sequence>\r\n
219
+ \ </s:complexType>\r\n </s:schema>\r\n </wsdl:types>\r\n <wsdl:message
220
+ name=\"ListHcpApprox3SoapIn\">\r\n <wsdl:part name=\"listHcpApproxRequest\"
221
+ element=\"tns:listHcpApproxRequest\" />\r\n </wsdl:message>\r\n <wsdl:message
222
+ name=\"ListHcpApprox3SoapOut\">\r\n <wsdl:part name=\"ListHcpApprox3Result\"
223
+ element=\"tns:ListHcpApprox3Result\" />\r\n </wsdl:message>\r\n <wsdl:message
224
+ name=\"GetRibizReferenceDataSoapIn\">\r\n <wsdl:part name=\"parameters\"
225
+ element=\"tns:GetRibizReferenceData\" />\r\n </wsdl:message>\r\n <wsdl:message
226
+ name=\"GetRibizReferenceDataSoapOut\">\r\n <wsdl:part name=\"parameters\"
227
+ element=\"tns:GetRibizReferenceDataResponse\" />\r\n </wsdl:message>\r\n
228
+ \ <wsdl:portType name=\"PublicV3Soap\">\r\n <wsdl:operation name=\"ListHcpApprox3\">\r\n
229
+ \ <wsdl:documentation xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\">Search
230
+ for health care professionals based on approx match</wsdl:documentation>\r\n
231
+ \ <wsdl:input message=\"tns:ListHcpApprox3SoapIn\" />\r\n <wsdl:output
232
+ message=\"tns:ListHcpApprox3SoapOut\" />\r\n </wsdl:operation>\r\n <wsdl:operation
233
+ name=\"GetRibizReferenceData\">\r\n <wsdl:documentation xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\">Returns
234
+ the RIBIZ reference data</wsdl:documentation>\r\n <wsdl:input message=\"tns:GetRibizReferenceDataSoapIn\"
235
+ />\r\n <wsdl:output message=\"tns:GetRibizReferenceDataSoapOut\" />\r\n
236
+ \ </wsdl:operation>\r\n </wsdl:portType>\r\n <wsdl:binding name=\"PublicV3Soap\"
237
+ type=\"tns:PublicV3Soap\">\r\n <soap:binding transport=\"http://schemas.xmlsoap.org/soap/http\"
238
+ />\r\n <wsdl:operation name=\"ListHcpApprox3\">\r\n <soap:operation
239
+ soapAction=\"http://services.cibg.nl/ExternalUser/ListHcpApprox3\" style=\"document\"
240
+ />\r\n <wsdl:input>\r\n <soap:body use=\"literal\" />\r\n </wsdl:input>\r\n
241
+ \ <wsdl:output>\r\n <soap:body use=\"literal\" />\r\n </wsdl:output>\r\n
242
+ \ </wsdl:operation>\r\n <wsdl:operation name=\"GetRibizReferenceData\">\r\n
243
+ \ <soap:operation soapAction=\"http://services.cibg.nl/ExternalUser/GetRibizReferenceData\"
244
+ style=\"document\" />\r\n <wsdl:input>\r\n <soap:body use=\"literal\"
245
+ />\r\n </wsdl:input>\r\n <wsdl:output>\r\n <soap:body use=\"literal\"
246
+ />\r\n </wsdl:output>\r\n </wsdl:operation>\r\n </wsdl:binding>\r\n
247
+ \ <wsdl:binding name=\"PublicV3Soap12\" type=\"tns:PublicV3Soap\">\r\n <soap12:binding
248
+ transport=\"http://schemas.xmlsoap.org/soap/http\" />\r\n <wsdl:operation
249
+ name=\"ListHcpApprox3\">\r\n <soap12:operation soapAction=\"http://services.cibg.nl/ExternalUser/ListHcpApprox3\"
250
+ style=\"document\" />\r\n <wsdl:input>\r\n <soap12:body use=\"literal\"
251
+ />\r\n </wsdl:input>\r\n <wsdl:output>\r\n <soap12:body use=\"literal\"
252
+ />\r\n </wsdl:output>\r\n </wsdl:operation>\r\n <wsdl:operation
253
+ name=\"GetRibizReferenceData\">\r\n <soap12:operation soapAction=\"http://services.cibg.nl/ExternalUser/GetRibizReferenceData\"
254
+ style=\"document\" />\r\n <wsdl:input>\r\n <soap12:body use=\"literal\"
255
+ />\r\n </wsdl:input>\r\n <wsdl:output>\r\n <soap12:body use=\"literal\"
256
+ />\r\n </wsdl:output>\r\n </wsdl:operation>\r\n </wsdl:binding>\r\n
257
+ \ <wsdl:service name=\"PublicV3\">\r\n <wsdl:port name=\"PublicV3Soap\"
258
+ binding=\"tns:PublicV3Soap\">\r\n <soap:address location=\"http://webservices.cibg.nl/Ribiz/OpenbaarV2.asmx\"
259
+ />\r\n </wsdl:port>\r\n <wsdl:port name=\"PublicV3Soap12\" binding=\"tns:PublicV3Soap12\">\r\n
260
+ \ <soap12:address location=\"http://webservices.cibg.nl/Ribiz/OpenbaarV2.asmx\"
261
+ />\r\n </wsdl:port>\r\n </wsdl:service>\r\n</wsdl:definitions>"
262
+ http_version:
263
+ recorded_at: Wed, 26 Feb 2014 13:48:34 GMT
264
+ - request:
265
+ method: post
266
+ uri: http://webservices.cibg.nl/Ribiz/OpenbaarV2.asmx
267
+ body:
268
+ encoding: UTF-8
269
+ string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><env:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
270
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:tns=\"http://services.cibg.nl/ExternalUser\"
271
+ xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"><env:Body><tns:listHcpApproxRequest><tns:WebSite>Ribiz</tns:WebSite><tns:RegistrationNumber>not-a-big-number</tns:RegistrationNumber></tns:listHcpApproxRequest></env:Body></env:Envelope>"
272
+ headers:
273
+ Soapaction:
274
+ - "\"http://services.cibg.nl/ExternalUser/ListHcpApprox3\""
275
+ Content-Type:
276
+ - text/xml;charset=UTF-8
277
+ Content-Length:
278
+ - '440'
279
+ Accept-Encoding:
280
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
281
+ Accept:
282
+ - "*/*"
283
+ User-Agent:
284
+ - Ruby
285
+ response:
286
+ status:
287
+ code: 500
288
+ message: Internal Server Error
289
+ headers:
290
+ Cache-Control:
291
+ - private
292
+ Content-Type:
293
+ - text/xml; charset=utf-8
294
+ Server:
295
+ - Microsoft-IIS/7.5
296
+ X-Aspnet-Version:
297
+ - 2.0.50727
298
+ X-Powered-By:
299
+ - ASP.NET
300
+ Date:
301
+ - Wed, 26 Feb 2014 13:48:33 GMT
302
+ Content-Length:
303
+ - '2161'
304
+ Proxy-Connection:
305
+ - Keep-Alive
306
+ Connection:
307
+ - Keep-Alive
308
+ body:
309
+ encoding: UTF-8
310
+ string: "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"
311
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><soap:Fault><faultcode>Zorro</faultcode><faultstring>System.Web.Services.Protocols.SoapException:
312
+ Exception\r\n at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyEntry.IntentionalRethrow(Exception
313
+ chainException, Exception originalException)\r\n at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyEntry.RethrowRecommended(Exception
314
+ chainException, Exception originalException)\r\n at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyEntry.Handle(Exception
315
+ exceptionToHandle)\r\n at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyImpl.HandleException(Exception
316
+ exceptionToHandle)\r\n at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicy.HandleException(Exception
317
+ exceptionToHandle, String policyName)\r\n at Vws.Cibg.Zorro.EndPoint.ExternalApplication.PublicV3.ListHcpApprox3(ListHcpApproxRequest
318
+ listHcpApproxRequest)</faultstring><faultactor>http://services.cibg.nl</faultactor><detail
319
+ xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><Title>Exception</Title><Description>If
320
+ this problem persists contact sysadmin with reference: 9507b869-606a-4496-8af8-9abaa42c1384</Description><Message>Wrong
321
+ value for RegistrationNumber</Message><Exception>-- Exception Wednesday, February
322
+ 26, 2014 2:48:34 PM ------------------------------------------------------------
323
+ \r\nType : System.ArgumentException\r\nMessage : Wrong value for
324
+ RegistrationNumber\r\nSource : Vws.Cibg.Zorro.Process\r\nParamName : \r\nStackTrace
325
+ : at Vws.Cibg.Zorro.Process.Aggregation.Search.ListHcpApprox3(ListHcpApproxRequest
326
+ listHcpApproxRequest)\r\n at Vws.Cibg.Zorro.EndPoint.ExternalApplication.PublicV3.ListHcpApprox3(ListHcpApproxRequest
327
+ listHcpApproxRequest)\r\n---------------------------------------------------------------------------
328
+ \r\n</Exception></detail></soap:Fault></soap:Body></soap:Envelope>"
329
+ http_version:
330
+ recorded_at: Wed, 26 Feb 2014 13:48:34 GMT
331
+ recorded_with: VCR 2.8.0
@@ -1,51 +1,52 @@
1
1
  require 'spec_helper'
2
2
 
3
- module BIGRegister
3
+ describe BIGRegister::Client do
4
4
 
5
- describe Client do
5
+ let(:client) { BIGRegister::Client.new }
6
6
 
7
-
8
- before(:each) do
9
- @client = Client.new
7
+ describe "#list_hcp" do
8
+ it "should return a list of healthcare practitioners", :vcr => true do
9
+ # http://nl.wikipedia.org/wiki/Robert_Schoemacher
10
+ result = client.list_hcp("R.", "Schoemacher", "M","")
11
+ result.size.should be > 0
10
12
  end
11
13
 
12
- context "#list_hcp" do
13
- it "should return a list of healthcare practitioners", :vcr => true do
14
- # http://nl.wikipedia.org/wiki/Robert_Schoemacher
15
- result = @client.list_hcp("R.", "Schoemacher", "M","")
16
- result.size.should be > 0
17
- end
18
-
19
- it "should return an empty list", :vcr => true do
20
- # http://www.bigregister.nl/ernstjansensteur.aspx
21
- result = @client.list_hcp("E.N.H.", "Jansen", "M", "")
22
- result.size.should be(0)
23
- end
14
+ it "should return an empty list", :vcr => true do
15
+ # http://www.bigregister.nl/ernstjansensteur.aspx
16
+ result = client.list_hcp("E.N.H.", "Jansen", "M", "")
17
+ result.size.should be(0)
18
+ end
24
19
 
25
- it "returns an array when size == 1", :vcr => true do
26
- result = @client.list_hcp("R.", "Schoemacher", "M", "")
27
- result.size.should be(1)
28
- result.class.should eql Array
29
- end
20
+ it "returns an array when size == 1", :vcr => true do
21
+ result = client.list_hcp("R.", "Schoemacher", "M", "")
22
+ result.size.should be(1)
23
+ result.class.should eql Array
24
+ end
30
25
 
31
- it "only returns doctors in the category 'Artsen' (code: 01)", :vcr => true do
32
- result = @client.list_hcp("J.", "Janssen", "M", "")
33
- result.each do |doctor|
34
- doctor[:article_registration][:article_registration_ext_app][:professional_group_code].should eql "01"
35
- end
26
+ it "only returns doctors in the category 'Artsen' (code: 01)", :vcr => true do
27
+ result = client.list_hcp("J.", "Janssen", "M", "")
28
+ result.each do |doctor|
29
+ doctor[:article_registration][:article_registration_ext_app][:professional_group_code].should eql "01"
36
30
  end
37
31
  end
32
+ end
38
33
 
39
- context "#find_by_big_number", :vcr => true do
40
- it "returns a health care practitioner with an existing big number (29021600101)" do
41
- result = @client.find_by_big_number("29021600101")
42
- result[:mailing_name].should eql "A.M. den Hollander"
43
- end
34
+ describe "#find_by_big_number", :vcr => true do
35
+ it "returns a health care practitioner with an existing big number (29021600101)" do
36
+ result = client.find_by_big_number("29021600101")
37
+ result[:mailing_name].should eql "A.M. den Hollander"
44
38
  end
45
39
 
46
- it "should return a profession" do
47
- BIGRegister::Client::PROFESSION.fetch("01").should eql "Artsen"
40
+ it "raises a NotFoundError for a malformed big number" do
41
+ expect {
42
+ client.find_by_big_number("not-a-big-number")
43
+ }.to raise_error(BIGRegister::NotFoundError)
48
44
  end
49
45
 
50
46
  end
47
+
48
+ it "should return a profession" do
49
+ BIGRegister::Client::PROFESSION.fetch("01").should eql "Artsen"
50
+ end
51
+
51
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: big_register
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -125,6 +125,7 @@ files:
125
125
  - lib/big_register/version.rb
126
126
  - script/bundler
127
127
  - script/ci
128
+ - spec/fixtures/cassettes/BIGRegister_Client/_find_by_big_number/raises_a_NotFoundError_for_a_malformed_big_number.yml
128
129
  - spec/fixtures/cassettes/BIGRegister_Client/_find_by_big_number/returns_a_health_care_practitioner_with_an_existing_big_number_29021600101_.yml
129
130
  - spec/fixtures/cassettes/BIGRegister_Client/_list_hcp/only_returns_doctors_in_the_category_Artsen_code_01_.yml
130
131
  - spec/fixtures/cassettes/BIGRegister_Client/_list_hcp/returns_an_array_when_size_1.yml
@@ -152,11 +153,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
153
  version: '0'
153
154
  requirements: []
154
155
  rubyforge_project:
155
- rubygems_version: 1.8.24
156
+ rubygems_version: 1.8.28
156
157
  signing_key:
157
158
  specification_version: 3
158
159
  summary: A gem to query the BIG register
159
160
  test_files:
161
+ - spec/fixtures/cassettes/BIGRegister_Client/_find_by_big_number/raises_a_NotFoundError_for_a_malformed_big_number.yml
160
162
  - spec/fixtures/cassettes/BIGRegister_Client/_find_by_big_number/returns_a_health_care_practitioner_with_an_existing_big_number_29021600101_.yml
161
163
  - spec/fixtures/cassettes/BIGRegister_Client/_list_hcp/only_returns_doctors_in_the_category_Artsen_code_01_.yml
162
164
  - spec/fixtures/cassettes/BIGRegister_Client/_list_hcp/returns_an_array_when_size_1.yml