tyler_efm_client 1.0.0.pre.alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +34 -0
- data/GITHUB_SETUP.md +221 -0
- data/Gemfile +11 -0
- data/LICENSE +21 -0
- data/PUBLICATION_GUIDE.md +146 -0
- data/README.md +298 -0
- data/Rakefile +14 -0
- data/build_gem.rb +73 -0
- data/config.example.json +15 -0
- data/docs/getting_started.md +293 -0
- data/examples/authentication_example.rb +64 -0
- data/examples/complete_workflow_example.rb +149 -0
- data/examples/getcaselist_example.rb +142 -0
- data/lib/tyler_efm_client/client.rb +627 -0
- data/lib/tyler_efm_client/errors.rb +19 -0
- data/lib/tyler_efm_client/result_types.rb +77 -0
- data/lib/tyler_efm_client/version.rb +6 -0
- data/lib/tyler_efm_client.rb +41 -0
- data/publish_gem.rb +155 -0
- data/samples/court_filing_workflow/README.md +332 -0
- data/test_gem.rb +170 -0
- metadata +164 -0
data/README.md
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
# Tyler EFM Client - Ruby SDK
|
|
2
|
+
|
|
3
|
+
[](https://ruby-lang.org)
|
|
4
|
+
[](https://badge.fury.io/rb/tyler_efm_client)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://tylertech.com)
|
|
7
|
+
|
|
8
|
+
A production-ready Ruby SDK for integrating with Tyler Technologies Electronic Filing Manager (EFM) services. This gem simplifies authentication and SOAP service calls for Electronic Court Filing (ECF) systems.
|
|
9
|
+
|
|
10
|
+
## 🚀 Features
|
|
11
|
+
|
|
12
|
+
- **Simple Authentication**: One method to authenticate with Tyler EFM services
|
|
13
|
+
- **Flexible SOAP Operations**: Call any Tyler EFM SOAP operation with automatic security handling
|
|
14
|
+
- **WS-Security Support**: Automatic RSA-SHA1/SHA1 digital signatures (Tyler legacy compatibility)
|
|
15
|
+
- **Certificate Management**: Automatic PFX certificate handling and cleanup
|
|
16
|
+
- **Response Formats**: Choose between XML and JSON response formats
|
|
17
|
+
- **Production Ready**: Built from working Tyler ECF 5.0 integration code
|
|
18
|
+
- **Ruby Idiomatic**: Follows Ruby conventions and best practices
|
|
19
|
+
|
|
20
|
+
## 📦 Installation
|
|
21
|
+
|
|
22
|
+
Add this line to your application's Gemfile:
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
gem 'tyler_efm_client'
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
And then execute:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
bundle install
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Or install it directly:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
gem install tyler_efm_client
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Requirements
|
|
41
|
+
|
|
42
|
+
- Ruby 2.7+
|
|
43
|
+
- Valid Tyler EFM PFX certificate
|
|
44
|
+
- Access to Tyler EFM services (staging or production)
|
|
45
|
+
|
|
46
|
+
## 🔧 Quick Start
|
|
47
|
+
|
|
48
|
+
### Basic Authentication
|
|
49
|
+
|
|
50
|
+
```ruby
|
|
51
|
+
require 'tyler_efm_client'
|
|
52
|
+
|
|
53
|
+
# Initialize client
|
|
54
|
+
client = TylerEfmClient::Client.new
|
|
55
|
+
|
|
56
|
+
# Authenticate
|
|
57
|
+
auth_result = client.authenticate(
|
|
58
|
+
base_url: "https://your-tyler-server.com/EFM/EFMUserService.svc",
|
|
59
|
+
pfx_file: "path/to/certificate.pfx",
|
|
60
|
+
pfx_password: "certificate_password",
|
|
61
|
+
user_email: "your-email@example.com",
|
|
62
|
+
user_password: "your_password"
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
if auth_result.success?
|
|
66
|
+
puts "Password Hash: #{auth_result.password_hash}"
|
|
67
|
+
puts "User: #{auth_result.first_name} #{auth_result.last_name}"
|
|
68
|
+
else
|
|
69
|
+
puts "Error: #{auth_result.error_message}"
|
|
70
|
+
end
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Service Operations
|
|
74
|
+
|
|
75
|
+
```ruby
|
|
76
|
+
# Call GetCaseList operation
|
|
77
|
+
soap_body = <<~SOAP
|
|
78
|
+
<wrappers:GetCaseListRequest xmlns:wrappers="https://docs.oasis-open.org/legalxml-courtfiling/ns/v5.0/wrappers">
|
|
79
|
+
<!-- Your SOAP body content -->
|
|
80
|
+
</wrappers:GetCaseListRequest>
|
|
81
|
+
SOAP
|
|
82
|
+
|
|
83
|
+
response = client.call_service(
|
|
84
|
+
base_url: "https://your-tyler-server.com/efm/v5/CourtRecordService.svc",
|
|
85
|
+
password_hash: auth_result.password_hash,
|
|
86
|
+
operation: "GetCaseList",
|
|
87
|
+
soap_body: soap_body,
|
|
88
|
+
user_email: "your-email@example.com",
|
|
89
|
+
return_json: true # Get JSON response instead of XML
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
if response.success?
|
|
93
|
+
puts "Service call successful!"
|
|
94
|
+
if response.json_data
|
|
95
|
+
# Work with JSON data
|
|
96
|
+
pp response.json_data
|
|
97
|
+
else
|
|
98
|
+
# Work with raw XML
|
|
99
|
+
puts response.raw_xml
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## 📚 API Reference
|
|
105
|
+
|
|
106
|
+
### TylerEfmClient::Client
|
|
107
|
+
|
|
108
|
+
The main client class for Tyler EFM operations.
|
|
109
|
+
|
|
110
|
+
#### #authenticate(base_url:, pfx_file:, pfx_password:, user_email:, user_password:)
|
|
111
|
+
|
|
112
|
+
Authenticate with Tyler EFM User Service.
|
|
113
|
+
|
|
114
|
+
**Parameters:**
|
|
115
|
+
- `base_url` (String): Base URL for the EFM User Service
|
|
116
|
+
- `pfx_file` (String): Path to the PFX certificate file
|
|
117
|
+
- `pfx_password` (String): Password for the PFX certificate
|
|
118
|
+
- `user_email` (String): User's email address
|
|
119
|
+
- `user_password` (String): User's password
|
|
120
|
+
|
|
121
|
+
**Returns:** `TylerEfmClient::AuthenticationResult` object with:
|
|
122
|
+
- `success?` (Boolean): Whether authentication succeeded
|
|
123
|
+
- `password_hash` (String): Password hash for subsequent service calls
|
|
124
|
+
- `user_id` (String): User's unique identifier
|
|
125
|
+
- `first_name` (String): User's first name
|
|
126
|
+
- `last_name` (String): User's last name
|
|
127
|
+
- `email` (String): User's email
|
|
128
|
+
- `expiration_date` (String): Token expiration date
|
|
129
|
+
- `error_code` (String): Error code if authentication failed
|
|
130
|
+
- `error_message` (String): Error message if authentication failed
|
|
131
|
+
|
|
132
|
+
#### #call_service(base_url:, password_hash:, operation:, soap_body:, **options)
|
|
133
|
+
|
|
134
|
+
Call any Tyler EFM SOAP service operation.
|
|
135
|
+
|
|
136
|
+
**Parameters:**
|
|
137
|
+
- `base_url` (String): Base URL for the EFM service
|
|
138
|
+
- `password_hash` (String): Password hash from authentication
|
|
139
|
+
- `operation` (String): Name of the SOAP operation
|
|
140
|
+
- `soap_body` (String): SOAP body content as XML string
|
|
141
|
+
- `user_email` (String, optional): User's email (required for Court Record Service)
|
|
142
|
+
- `pfx_file` (String, optional): Path to PFX certificate if not from authentication
|
|
143
|
+
- `pfx_password` (String, optional): PFX password if not from authentication
|
|
144
|
+
- `return_json` (Boolean, optional): Return JSON instead of XML (default: false)
|
|
145
|
+
- `soap_action` (String, optional): Custom SOAP action header
|
|
146
|
+
|
|
147
|
+
**Returns:** `TylerEfmClient::ServiceResponse` object with:
|
|
148
|
+
- `success?` (Boolean): Whether the service call succeeded
|
|
149
|
+
- `status_code` (Integer): HTTP status code
|
|
150
|
+
- `raw_xml` (String): Raw XML response
|
|
151
|
+
- `json_data` (Hash, optional): JSON representation of response if requested
|
|
152
|
+
- `error_message` (String, optional): Error message if call failed
|
|
153
|
+
|
|
154
|
+
## 🏗️ Architecture
|
|
155
|
+
|
|
156
|
+
This SDK implements Tyler's exact ECF 5.0 requirements:
|
|
157
|
+
|
|
158
|
+
### Authentication (User Service)
|
|
159
|
+
- **WS-Security**: Digital signatures using RSA-SHA1/SHA1 (Tyler legacy requirement)
|
|
160
|
+
- **Certificate Auth**: Mutual TLS using PFX certificates
|
|
161
|
+
- **SOAP Structure**: Exact Tyler-compatible XML namespace handling
|
|
162
|
+
|
|
163
|
+
### Court Record Service Operations
|
|
164
|
+
- **UserNameHeader**: Special header structure required by Court Record Service
|
|
165
|
+
- **No Namespace Prefix**: Critical requirement - UserNameHeader must not have namespace prefix
|
|
166
|
+
- **Header Order**: UserNameHeader must be first header element
|
|
167
|
+
- **Password Hash**: Uses hashed password from authentication, not plain password
|
|
168
|
+
|
|
169
|
+
## 🔒 Security Features
|
|
170
|
+
|
|
171
|
+
- **Automatic Certificate Handling**: PFX files are processed and cleaned up automatically
|
|
172
|
+
- **WS-Security Signatures**: RSA-SHA1 digital signatures for message integrity
|
|
173
|
+
- **Legacy Algorithm Support**: SHA1 and RSA-SHA1 for Tyler compatibility
|
|
174
|
+
- **HTTPS Only**: All communications use HTTPS with certificate verification
|
|
175
|
+
|
|
176
|
+
## 📖 Examples
|
|
177
|
+
|
|
178
|
+
The `examples/` directory contains complete working examples:
|
|
179
|
+
|
|
180
|
+
- `authentication_example.rb` - Basic authentication
|
|
181
|
+
- `getcaselist_example.rb` - GetCaseList operation
|
|
182
|
+
- `complete_workflow_example.rb` - Full workflow with multiple operations
|
|
183
|
+
|
|
184
|
+
Run examples:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
cd examples
|
|
188
|
+
ruby authentication_example.rb
|
|
189
|
+
ruby getcaselist_example.rb
|
|
190
|
+
ruby complete_workflow_example.rb
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## 🐛 Error Handling
|
|
194
|
+
|
|
195
|
+
The SDK provides specific exception types:
|
|
196
|
+
|
|
197
|
+
```ruby
|
|
198
|
+
begin
|
|
199
|
+
auth_result = client.authenticate(...)
|
|
200
|
+
rescue TylerEfmClient::AuthenticationError => e
|
|
201
|
+
puts "Authentication failed: #{e.message}"
|
|
202
|
+
rescue TylerEfmClient::CertificateError => e
|
|
203
|
+
puts "Certificate error: #{e.message}"
|
|
204
|
+
rescue TylerEfmClient::ServiceError => e
|
|
205
|
+
puts "Service error: #{e.message}"
|
|
206
|
+
rescue TylerEfmClient::Error => e
|
|
207
|
+
puts "EFM client error: #{e.message}"
|
|
208
|
+
end
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## 🧪 Testing
|
|
212
|
+
|
|
213
|
+
The SDK is built from working Tyler ECF integration code and tested against:
|
|
214
|
+
|
|
215
|
+
- Tyler Georgia staging environment
|
|
216
|
+
- Production Tyler ECF 5.0 systems
|
|
217
|
+
- Multiple certificate types and configurations
|
|
218
|
+
|
|
219
|
+
Run tests:
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
bundle exec rake spec
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Run linting:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
bundle exec rake rubocop
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## 📋 Requirements
|
|
232
|
+
|
|
233
|
+
### System Requirements
|
|
234
|
+
- Ruby 2.7 or higher
|
|
235
|
+
- OpenSSL for certificate processing
|
|
236
|
+
- Network access to Tyler EFM services
|
|
237
|
+
|
|
238
|
+
### Tyler Requirements
|
|
239
|
+
- Valid Tyler EFM account and credentials
|
|
240
|
+
- PFX certificate file from Tyler Technologies
|
|
241
|
+
- Appropriate service URLs (staging or production)
|
|
242
|
+
|
|
243
|
+
## 🔧 Development
|
|
244
|
+
|
|
245
|
+
After checking out the repo, run:
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
bin/setup
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
To install dependencies. Then, run:
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
rake spec
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
To run the tests. You can also run:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
bin/console
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
For an interactive prompt that will allow you to experiment.
|
|
264
|
+
|
|
265
|
+
To install this gem onto your local machine, run:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
bundle exec rake install
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
To release a new version:
|
|
272
|
+
|
|
273
|
+
1. Update the version number in `lib/tyler_efm_client/version.rb`
|
|
274
|
+
2. Run `bundle exec rake release`
|
|
275
|
+
|
|
276
|
+
This will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
277
|
+
|
|
278
|
+
## 🤝 Contributing
|
|
279
|
+
|
|
280
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/tyler-technologies/cj-esol-efm-client-ruby.
|
|
281
|
+
|
|
282
|
+
1. Fork it
|
|
283
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
284
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
285
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
286
|
+
5. Create new Pull Request
|
|
287
|
+
|
|
288
|
+
## 📄 License
|
|
289
|
+
|
|
290
|
+
This gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
291
|
+
|
|
292
|
+
## 🏢 About Tyler Technologies
|
|
293
|
+
|
|
294
|
+
Tyler Technologies is a leading provider of integrated software and technology services to the public sector. Learn more at [tylertech.com](https://www.tylertech.com).
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
**Built with ❤️ for the Tyler ECF community**
|
data/Rakefile
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'bundler/gem_tasks'
|
|
4
|
+
require 'rspec/core/rake_task'
|
|
5
|
+
|
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
7
|
+
|
|
8
|
+
require 'rubocop/rake_task'
|
|
9
|
+
|
|
10
|
+
RuboCop::RakeTask.new do |task|
|
|
11
|
+
task.requires << 'rubocop-performance'
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
task default: %i[spec rubocop]
|
data/build_gem.rb
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require 'fileutils'
|
|
5
|
+
|
|
6
|
+
##
|
|
7
|
+
# Build script for Tyler EFM Client Ruby gem
|
|
8
|
+
def run_command(command, description)
|
|
9
|
+
puts "🔄 #{description}..."
|
|
10
|
+
result = system(command)
|
|
11
|
+
if result
|
|
12
|
+
puts "✅ #{description} completed"
|
|
13
|
+
true
|
|
14
|
+
else
|
|
15
|
+
puts "❌ #{description} failed"
|
|
16
|
+
false
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def clean_build
|
|
21
|
+
puts '🧹 Cleaning build artifacts...'
|
|
22
|
+
|
|
23
|
+
files_to_clean = ['*.gem', 'Gemfile.lock']
|
|
24
|
+
files_to_clean.each do |pattern|
|
|
25
|
+
Dir.glob(pattern).each do |file|
|
|
26
|
+
File.delete(file)
|
|
27
|
+
puts " Removed: #{file}"
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
puts '✅ Build artifacts cleaned'
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def build_gem
|
|
35
|
+
puts 'Tyler EFM Client - Ruby Gem Build Script'
|
|
36
|
+
puts '=' * 45
|
|
37
|
+
|
|
38
|
+
# Clean previous builds
|
|
39
|
+
clean_build
|
|
40
|
+
|
|
41
|
+
# Install dependencies
|
|
42
|
+
unless run_command('bundle install', 'Installing dependencies')
|
|
43
|
+
return false
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Build the gem
|
|
47
|
+
unless run_command('gem build tyler_efm_client.gemspec', 'Building gem')
|
|
48
|
+
return false
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List built gems
|
|
52
|
+
puts "\n🎉 Gem built successfully!"
|
|
53
|
+
puts '📦 Distribution files:'
|
|
54
|
+
|
|
55
|
+
Dir.glob('*.gem').each do |gem_file|
|
|
56
|
+
size = File.size(gem_file)
|
|
57
|
+
puts " #{gem_file} (#{size} bytes)"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
puts "\n📋 Next steps:"
|
|
61
|
+
puts ' 1. Test the built gem:'
|
|
62
|
+
puts ' gem install tyler_efm_client-1.0.0.gem'
|
|
63
|
+
puts ' 2. Push to RubyGems (test):'
|
|
64
|
+
puts ' gem push --host https://test.rubygems.org tyler_efm_client-1.0.0.gem'
|
|
65
|
+
puts ' 3. Push to RubyGems (production):'
|
|
66
|
+
puts ' gem push tyler_efm_client-1.0.0.gem'
|
|
67
|
+
puts ' 4. Run tests:'
|
|
68
|
+
puts ' bundle exec rake spec'
|
|
69
|
+
|
|
70
|
+
true
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
exit(build_gem ? 0 : 1) if __FILE__ == $0
|
data/config.example.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"service": {
|
|
3
|
+
"endpoint": "https://georgia-stage.tylertech.cloud/EFM/EFMUserService.svc",
|
|
4
|
+
"wsdl_url": "https://georgia-stage.tylertech.cloud/EFM/EFMUserService.svc?wsdl",
|
|
5
|
+
"court_service_url": "https://georgia-stage.tylertech.cloud/efm/v5/CourtRecordService.svc"
|
|
6
|
+
},
|
|
7
|
+
"certificate": {
|
|
8
|
+
"pfx_file": "YOUR_CERTIFICATE.pfx",
|
|
9
|
+
"pfx_password": "YOUR_PFX_PASSWORD"
|
|
10
|
+
},
|
|
11
|
+
"credentials": {
|
|
12
|
+
"email": "your-email@domain.com",
|
|
13
|
+
"password": "your-password"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
# Getting Started with Tyler EFM Client - Ruby SDK
|
|
2
|
+
|
|
3
|
+
Welcome to the Tyler EFM Client Ruby SDK! This guide will help you get up and running with Tyler Technologies Electronic Filing Manager (EFM) services quickly.
|
|
4
|
+
|
|
5
|
+
## 📋 Prerequisites
|
|
6
|
+
|
|
7
|
+
Before you begin, ensure you have:
|
|
8
|
+
|
|
9
|
+
1. **Ruby Environment**: Ruby 2.7 or higher
|
|
10
|
+
2. **Tyler EFM Account**: Valid credentials from Tyler Technologies
|
|
11
|
+
3. **PFX Certificate**: Client certificate file from Tyler Technologies
|
|
12
|
+
4. **Service Access**: URLs for Tyler EFM services (staging or production)
|
|
13
|
+
|
|
14
|
+
## 🚀 Installation
|
|
15
|
+
|
|
16
|
+
### Using Bundler (Recommended)
|
|
17
|
+
|
|
18
|
+
Add to your Gemfile:
|
|
19
|
+
```ruby
|
|
20
|
+
gem 'tyler_efm_client'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then run:
|
|
24
|
+
```bash
|
|
25
|
+
bundle install
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Direct Installation
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
gem install tyler_efm_client
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 🔧 Basic Setup
|
|
35
|
+
|
|
36
|
+
### 1. Require the Gem
|
|
37
|
+
|
|
38
|
+
```ruby
|
|
39
|
+
require 'tyler_efm_client'
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 2. Initialize the Client
|
|
43
|
+
|
|
44
|
+
```ruby
|
|
45
|
+
client = TylerEfmClient::Client.new
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 3. Authenticate
|
|
49
|
+
|
|
50
|
+
```ruby
|
|
51
|
+
auth_result = client.authenticate(
|
|
52
|
+
base_url: "https://georgia-stage.tylertech.cloud/EFM/EFMUserService.svc",
|
|
53
|
+
pfx_file: "path/to/your/certificate.pfx",
|
|
54
|
+
pfx_password: "your_certificate_password",
|
|
55
|
+
user_email: "your-email@example.com",
|
|
56
|
+
user_password: "your_password"
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
if auth_result.success?
|
|
60
|
+
puts "✅ Authentication successful!"
|
|
61
|
+
puts "Password Hash: #{auth_result.password_hash}"
|
|
62
|
+
puts "User: #{auth_result.first_name} #{auth_result.last_name}"
|
|
63
|
+
else
|
|
64
|
+
puts "❌ Authentication failed: #{auth_result.error_message}"
|
|
65
|
+
end
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## 🎯 Your First Service Call
|
|
69
|
+
|
|
70
|
+
Once authenticated, you can call any Tyler EFM service:
|
|
71
|
+
|
|
72
|
+
```ruby
|
|
73
|
+
# Example: GetCaseList operation
|
|
74
|
+
soap_body = <<~SOAP
|
|
75
|
+
<wrappers:GetCaseListRequest xmlns:wrappers="https://docs.oasis-open.org/legalxml-courtfiling/ns/v5.0/wrappers">
|
|
76
|
+
<wrappers:GetCaseListRequestMessage>
|
|
77
|
+
<nc:Case xmlns:nc="http://niem.gov/niem/niem-core/2.0">
|
|
78
|
+
<nc:CaseTitleText>*</nc:CaseTitleText>
|
|
79
|
+
</nc:Case>
|
|
80
|
+
</wrappers:GetCaseListRequestMessage>
|
|
81
|
+
</wrappers:GetCaseListRequest>
|
|
82
|
+
SOAP
|
|
83
|
+
|
|
84
|
+
response = client.call_service(
|
|
85
|
+
base_url: "https://georgia-stage.tylertech.cloud/efm/v5/CourtRecordService.svc",
|
|
86
|
+
password_hash: auth_result.password_hash,
|
|
87
|
+
operation: "GetCaseList",
|
|
88
|
+
soap_body: soap_body,
|
|
89
|
+
user_email: "your-email@example.com",
|
|
90
|
+
return_json: true # Get JSON instead of XML
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
if response.success?
|
|
94
|
+
puts "✅ Service call successful!"
|
|
95
|
+
if response.json_data
|
|
96
|
+
puts "Cases found: #{response.json_data['cases']&.length || 0}"
|
|
97
|
+
else
|
|
98
|
+
puts "Raw XML response: #{response.raw_xml}"
|
|
99
|
+
end
|
|
100
|
+
else
|
|
101
|
+
puts "❌ Service call failed: #{response.error_message}"
|
|
102
|
+
end
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## 🔒 Configuration Best Practices
|
|
106
|
+
|
|
107
|
+
### Environment Variables
|
|
108
|
+
|
|
109
|
+
Store sensitive information in environment variables:
|
|
110
|
+
|
|
111
|
+
```ruby
|
|
112
|
+
require 'tyler_efm_client'
|
|
113
|
+
|
|
114
|
+
client = TylerEfmClient::Client.new
|
|
115
|
+
|
|
116
|
+
auth_result = client.authenticate(
|
|
117
|
+
base_url: ENV['TYLER_EFM_BASE_URL'],
|
|
118
|
+
pfx_file: ENV['TYLER_EFM_CERT_FILE'],
|
|
119
|
+
pfx_password: ENV['TYLER_EFM_CERT_PASSWORD'],
|
|
120
|
+
user_email: ENV['TYLER_EFM_USER_EMAIL'],
|
|
121
|
+
user_password: ENV['TYLER_EFM_USER_PASSWORD']
|
|
122
|
+
)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Configuration Class
|
|
126
|
+
|
|
127
|
+
Create a configuration class for better organization:
|
|
128
|
+
|
|
129
|
+
```ruby
|
|
130
|
+
class TylerConfig
|
|
131
|
+
ENVIRONMENTS = {
|
|
132
|
+
staging: {
|
|
133
|
+
user_service: "https://georgia-stage.tylertech.cloud/EFM/EFMUserService.svc",
|
|
134
|
+
court_service: "https://georgia-stage.tylertech.cloud/efm/v5/CourtRecordService.svc"
|
|
135
|
+
},
|
|
136
|
+
production: {
|
|
137
|
+
user_service: "https://georgia-prod.tylertech.cloud/EFM/EFMUserService.svc",
|
|
138
|
+
court_service: "https://georgia-prod.tylertech.cloud/efm/v5/CourtRecordService.svc"
|
|
139
|
+
}
|
|
140
|
+
}.freeze
|
|
141
|
+
|
|
142
|
+
def self.get_urls(environment = :staging)
|
|
143
|
+
ENVIRONMENTS[environment]
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## 🐛 Error Handling
|
|
149
|
+
|
|
150
|
+
Always implement proper error handling:
|
|
151
|
+
|
|
152
|
+
```ruby
|
|
153
|
+
require 'tyler_efm_client'
|
|
154
|
+
|
|
155
|
+
client = TylerEfmClient::Client.new
|
|
156
|
+
|
|
157
|
+
begin
|
|
158
|
+
auth_result = client.authenticate(
|
|
159
|
+
base_url: "https://your-tyler-server.com/EFM/EFMUserService.svc",
|
|
160
|
+
pfx_file: "certificate.pfx",
|
|
161
|
+
pfx_password: "password",
|
|
162
|
+
user_email: "user@example.com",
|
|
163
|
+
user_password: "password"
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
unless auth_result.success?
|
|
167
|
+
puts "Authentication failed: #{auth_result.error_message}"
|
|
168
|
+
exit(1)
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
rescue TylerEfmClient::AuthenticationError => e
|
|
172
|
+
puts "Authentication error: #{e.message}"
|
|
173
|
+
rescue TylerEfmClient::CertificateError => e
|
|
174
|
+
puts "Certificate error: #{e.message}"
|
|
175
|
+
rescue TylerEfmClient::Error => e
|
|
176
|
+
puts "EFM service error: #{e.message}"
|
|
177
|
+
rescue StandardError => e
|
|
178
|
+
puts "Unexpected error: #{e.message}"
|
|
179
|
+
end
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## 📖 Ruby-Specific Features
|
|
183
|
+
|
|
184
|
+
### Blocks and Yield
|
|
185
|
+
|
|
186
|
+
```ruby
|
|
187
|
+
def with_tyler_client(config)
|
|
188
|
+
client = TylerEfmClient::Client.new
|
|
189
|
+
|
|
190
|
+
auth_result = client.authenticate(**config)
|
|
191
|
+
|
|
192
|
+
if auth_result.success?
|
|
193
|
+
yield client, auth_result.password_hash
|
|
194
|
+
else
|
|
195
|
+
raise TylerEfmClient::AuthenticationError, auth_result.error_message
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Usage
|
|
200
|
+
config = {
|
|
201
|
+
base_url: "https://georgia-stage.tylertech.cloud/EFM/EFMUserService.svc",
|
|
202
|
+
pfx_file: "cert.pfx",
|
|
203
|
+
pfx_password: "password",
|
|
204
|
+
user_email: "user@example.com",
|
|
205
|
+
user_password: "password"
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
with_tyler_client(config) do |client, password_hash|
|
|
209
|
+
response = client.call_service(
|
|
210
|
+
base_url: "https://georgia-stage.tylertech.cloud/efm/v5/CourtRecordService.svc",
|
|
211
|
+
password_hash: password_hash,
|
|
212
|
+
operation: "GetCaseList",
|
|
213
|
+
soap_body: soap_body,
|
|
214
|
+
user_email: "user@example.com"
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
puts "Response received: #{response.success?}"
|
|
218
|
+
end
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Hash-Based Configuration
|
|
222
|
+
|
|
223
|
+
```ruby
|
|
224
|
+
class TylerEfmWrapper
|
|
225
|
+
def initialize(config = {})
|
|
226
|
+
@config = config
|
|
227
|
+
@client = TylerEfmClient::Client.new
|
|
228
|
+
@password_hash = nil
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
def authenticate
|
|
232
|
+
auth_result = @client.authenticate(**@config)
|
|
233
|
+
|
|
234
|
+
if auth_result.success?
|
|
235
|
+
@password_hash = auth_result.password_hash
|
|
236
|
+
auth_result
|
|
237
|
+
else
|
|
238
|
+
raise TylerEfmClient::AuthenticationError, auth_result.error_message
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
def call_court_service(operation, soap_body)
|
|
243
|
+
raise "Must authenticate first" unless @password_hash
|
|
244
|
+
|
|
245
|
+
@client.call_service(
|
|
246
|
+
base_url: @config[:court_service_url],
|
|
247
|
+
password_hash: @password_hash,
|
|
248
|
+
operation: operation,
|
|
249
|
+
soap_body: soap_body,
|
|
250
|
+
user_email: @config[:user_email],
|
|
251
|
+
return_json: true
|
|
252
|
+
)
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## 📋 Next Steps
|
|
258
|
+
|
|
259
|
+
Now that you have the basics working:
|
|
260
|
+
|
|
261
|
+
1. **Explore Examples**: Check the `examples/` directory for complete working examples
|
|
262
|
+
2. **Review Samples**: Look at `samples/` for real-world integration patterns
|
|
263
|
+
3. **Read API Reference**: See `docs/api_reference.md` for detailed method documentation
|
|
264
|
+
4. **Check Troubleshooting**: Review `docs/troubleshooting.md` for common issues
|
|
265
|
+
|
|
266
|
+
## 🔗 Quick Links
|
|
267
|
+
|
|
268
|
+
- [Authentication Guide](authentication_guide.md) - Detailed authentication setup
|
|
269
|
+
- [API Reference](api_reference.md) - Complete method documentation
|
|
270
|
+
- [Tyler ECF Requirements](tyler_ecf_requirements.md) - Understanding Tyler's system
|
|
271
|
+
- [Troubleshooting](troubleshooting.md) - Common issues and solutions
|
|
272
|
+
|
|
273
|
+
## 💎 Ruby Conventions
|
|
274
|
+
|
|
275
|
+
This SDK follows Ruby conventions:
|
|
276
|
+
- Method names use `snake_case`
|
|
277
|
+
- Classes use `PascalCase`
|
|
278
|
+
- Modules use `::` namespace separation
|
|
279
|
+
- Boolean methods end with `?`
|
|
280
|
+
- Destructive methods end with `!`
|
|
281
|
+
|
|
282
|
+
## 📞 Support
|
|
283
|
+
|
|
284
|
+
If you encounter issues:
|
|
285
|
+
|
|
286
|
+
1. Check the troubleshooting guide
|
|
287
|
+
2. Review your certificate and credentials
|
|
288
|
+
3. Verify service URLs are correct
|
|
289
|
+
4. Check Tyler ECF 5.0 documentation
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
**Ready to integrate with Tyler EFM using Ruby? Let's build something amazing!** 💎
|