Skip to content

Commit 4f3841b

Browse files
Implement changes for mock server to test locally
Co-authored-by: BryceStevenWilley <Bryce.Steven.Willey@gmail.com>
1 parent 1a5b428 commit 4f3841b

File tree

9 files changed

+7983
-3
lines changed

9 files changed

+7983
-3
lines changed

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,34 @@ To format all of your files.
1717

1818
(Note: this command might change slightly! If anything unexpected happens, see if the command in the [GitHub Action workflow](.github/workflows/formatting.yml) has changed first.)
1919

20+
## Transforming `.wsdl` mock files
21+
22+
We need to modify newly downloaded `.wsdl` files to allow them to be tested with a mock server and to make them more readable. We hope to eventually automate this.
23+
24+
**Copy**
25+
26+
Duplicate the updated "illinois" `.wsdl` files in `/src/main/resources/wsdl/test`. Replace "illinois" with "mock" and delete any additional text that the duplication may have added (like "copy" or "(1)").
27+
28+
**Format**
29+
30+
<!-- Discuss: what do we want the indentation to be for attributes? 1 indent or extra indentation? -->
31+
32+
This assumes you're using a dedicated code editor, like VSCode or SublimeText.
33+
34+
* Copy and paste the current code into https://toolboxfy.com/tool/wsdl-beautifier.
35+
* Replace the text of the current file with the result of the beautifier.
36+
* Put attributes on new lines:
37+
* "Find all" with a regular expression: `[^=\s]+:?[^=\s]+="`.
38+
* Select the space before all found items and replace with a new line.
39+
* Some editors may indent correctly. For SublimeText use cmd/ctrl+shift+p, type in "reindent", and choose to "Reindent lines".
40+
41+
Now the changes you need to make will be easier to see.
42+
43+
**Modify values**
44+
45+
* If you're copying the `illinois` files, replace `https://illinois-test.tylertech.cloud` with http://host.docker.internal:8080 (find regex that patterns "illinois-text")
46+
* Remove all `Policy` elements
47+
2048
## Linting the code
2149

2250
We use [Spotbugs](https://spotbugs.readthedocs.io/en/latest/introduction.html#) as a java linter. To find linter errors, run this:

env.example

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,9 @@ JEFFERSON_KEY=
9494
#DISABLE_SCHEDULE_FOR_CODE_UPDATE=false
9595
# Leave commented out or set to false to have the CodeUpdater run daily at around 2:15 am.
9696
# Set to true to immediately run the Tyler EFM CodeUpdater upon startup. This is useful for testing.
97-
#SCHEDULE_CODE_UPDATE_IMMEDIATELY=false
97+
#SCHEDULE_CODE_UPDATE_IMMEDIATELY=false
98+
99+
##### Development #####
100+
# The server which the proxy server calls. By default, it's a Tyler server.
101+
# During development, it's your test server. Discuss: test where this is used?
102+
ENDPOINT_ROOT=http://host.docker.internal:8080/

src/main/java/edu/suffolk/litlab/efspserver/tyler/TylerUrls.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ public class TylerUrls {
2020
"massachusetts-prod", "wsdl/prod/massachusetts-EFMUserServiceSingle.svc.wsdl",
2121
"california-stage", "wsdl/stage/california-EFMUserServiceSingle.svc.wsdl",
2222
"texas-stage", "wsdl/stage/texas-EFMUserServiceSingle.svc.wsdl",
23-
"indiana-stage", "wsdl/stage/indiana-EFMUserServiceSingle.svc.wsdl");
23+
"indiana-stage", "wsdl/stage/indiana-EFMUserServiceSingle.svc.wsdl",
24+
"mock-test", "wsdl/test/mock-EFMUserServiceSingle.svc.wsdl");
2425

2526
static final Map<String, String> efmFirmWsdls =
2627
Map.of(
@@ -31,7 +32,8 @@ public class TylerUrls {
3132
"massachusetts-prod", "wsdl/prod/massachusetts-EFMFirmServiceSingle.svc.wsdl",
3233
"california-stage", "wsdl/stage/california-EFMFirmServiceSingle.svc.wsdl",
3334
"texas-stage", "wsdl/stage/texas-EFMFirmServiceSingle.svc.wsdl",
34-
"indiana-stage", "wsdl/stage/indiana-EFMFirmServiceSingle.svc.wsdl");
35+
"indiana-stage", "wsdl/stage/indiana-EFMFirmServiceSingle.svc.wsdl",
36+
"mock-test", "wsdl/test/mock-EFMUserServiceSingle.svc.wsdl");
3537

3638
/**
3739
* Gets the EfmUserService if the provided domain is present and correct.
@@ -64,6 +66,11 @@ public static Optional<EfmFirmService> getEfmFirmFactory(String jurisdiction, St
6466
}
6567

6668
public static String getCodeEndpointRootUrl(String jurisdiction, String env) {
69+
String endpoint = System.getenv("ENDPOINT_ROOT");
70+
if (endpoint != null && !endpoint.trim().isEmpty()) {
71+
log.info("getCodeEndpointRootUrl() will return ENDPOINT_ROOT as a String:", endpoint);
72+
return endpoint;
73+
}
6774
if (jurisdiction.equalsIgnoreCase("california")) {
6875
return "https://california-efm-" + env + ".tylertech.cloud/";
6976
}
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
<?xml
2+
version="1.0"
3+
encoding="UTF-8"
4+
standalone="no"?>
5+
<definitions
6+
xmlns="http://schemas.xmlsoap.org/wsdl/"
7+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
8+
xmlns:tns="https://docs.oasis-open.org/legalxml-courtfiling/ns/v5.0/WSDL/CourtSchedulingMDE"
9+
xmlns:wrapper="https://docs.oasis-open.org/legalxml-courtfiling/ns/v5.0/MessageWrappers"
10+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
11+
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
12+
xmlns:wsrmp="http://docs.oasis-open.org/ws-rx/wsrmp/200702"
13+
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-361-wssecurity-utility-1.0.xsd"
14+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
15+
targetNamespace="https://docs.oasis-open.org/legalxml-courtfiling/ns/v5.0/WSDL/CourtSchedulingMDE">
16+
<wsdl:types>
17+
<xsd:schema>
18+
<xsd:import
19+
namespace="https://docs.oasis-open.org/legalxml-courtfiling/ns/v5.0/MessageWrappers"
20+
schemaLocation="../stage/ecf-v5-1.xsd"></xsd:import>
21+
</xsd:schema>
22+
</wsdl:types>
23+
<message
24+
name="GetCourtScheduleRequest">
25+
<part
26+
element="wrapper:GetCourtScheduleRequest"
27+
name="body"></part>
28+
</message>
29+
<message
30+
name="GetCourtScheduleResponse">
31+
<part
32+
element="wrapper:GetCourtScheduleResponse"
33+
name="body"></part>
34+
</message>
35+
<message
36+
name="NotifyCourtDateRequest">
37+
<part
38+
element="wrapper:NotifyCourtDateRequest"
39+
name="body"></part>
40+
</message>
41+
<message
42+
name="NotifyCourtDateResponse">
43+
<part
44+
element="wrapper:NotifyCourtDateResponse"
45+
name="body"></part>
46+
</message>
47+
<message
48+
name="ReserveCourtDateRequest">
49+
<part
50+
element="wrapper:ReserveCourtDateRequest"
51+
name="body"></part>
52+
</message>
53+
<message
54+
name="ReserveCourtDateResponse">
55+
<part
56+
element="wrapper:ReserveCourtDateResponse"
57+
name="body"></part>
58+
</message>
59+
<message
60+
name="ReserveCourtDateSyncResponse">
61+
<part
62+
element="wrapper:ReserveCourtDateSyncResponse"
63+
name="body"></part>
64+
</message>
65+
<message
66+
name="GetReturnDateRequest">
67+
<part
68+
element="wrapper:ReturnDateRequest"
69+
name="body"></part>
70+
</message>
71+
<message
72+
name="GetReturnDateResponse">
73+
<part
74+
element="wrapper:ReturnDateResponse"
75+
name="body"></part>
76+
</message>
77+
<portType
78+
name="CourtSchedulingMDE">
79+
<operation
80+
name="GetCourtSchedule">
81+
<input
82+
message="tns:GetCourtScheduleRequest"></input>
83+
<output
84+
message="tns:GetCourtScheduleResponse"></output>
85+
</operation>
86+
<operation
87+
name="NotifyCourtDate">
88+
<input
89+
message="tns:NotifyCourtDateRequest"></input>
90+
<output
91+
message="tns:NotifyCourtDateResponse"></output>
92+
</operation>
93+
<operation
94+
name="ReserveCourtDateSync">
95+
<input
96+
message="tns:ReserveCourtDateRequest"></input>
97+
<output
98+
message="tns:ReserveCourtDateSyncResponse"></output>
99+
</operation>
100+
<operation
101+
name="GetReturnDate">
102+
<input
103+
message="tns:GetReturnDateRequest"></input>
104+
<output
105+
message="tns:GetReturnDateResponse"></output>
106+
</operation>
107+
</portType>
108+
<binding
109+
name="CourtSchedulingMDESoap"
110+
type="tns:CourtSchedulingMDE">
111+
<soap:binding
112+
style="document"
113+
transport="http://schemas.xmlsoap.org/soap/http"></soap:binding>
114+
<operation
115+
name="GetCourtSchedule">
116+
<soap:operation
117+
soapAction="https://docs.oasis-open.org/legalxml-courtfiling/ns/v5.0/WSDL/CourtSchedulingMDE/GetCourtSchedule"></soap:operation>
118+
<input>
119+
<soap:body
120+
use="literal"></soap:body>
121+
</input>
122+
<output>
123+
<soap:body
124+
use="literal"></soap:body>
125+
</output>
126+
</operation>
127+
<operation
128+
name="NotifyCourtDate">
129+
<soap:operation
130+
soapAction="https://docs.oasis-open.org/legalxml-courtfiling/ns/v5.0/WSDL/CourtSchedulingMDE/NotifyCourtDate"></soap:operation>
131+
<input>
132+
<soap:body
133+
use="literal"></soap:body>
134+
</input>
135+
<output>
136+
<soap:body
137+
use="literal"></soap:body>
138+
</output>
139+
</operation>
140+
<operation
141+
name="ReserveCourtDate">
142+
<soap:operation
143+
soapAction="https://docs.oasis-open.org/legalxml-courtfiling/ns/v5.0/WSDL/CourtSchedulingMDE/ReserveCourtDate"></soap:operation>
144+
<input>
145+
<soap:body
146+
use="literal"></soap:body>
147+
</input>
148+
<output>
149+
<soap:body
150+
use="literal"></soap:body>
151+
</output>
152+
</operation>
153+
<operation
154+
name="ReserveCourtDateSync">
155+
<soap:operation
156+
soapAction="https://docs.oasis-open.org/legalxml-courtfiling/ns/v5.0/WSDL/CourtSchedulingMDE/ReserveCourtDateSync"></soap:operation>
157+
<input>
158+
<soap:body
159+
use="literal"></soap:body>
160+
</input>
161+
<output>
162+
<soap:body
163+
use="literal"></soap:body>
164+
</output>
165+
</operation>
166+
<operation
167+
name="GetReturnDate">
168+
<soap:operation
169+
soapAction="https://docs.oasis-open.org/legalxml-courtfiling/ns/v5.0/WSDL/CourtSchedulingMDE/GetReturnDate"></soap:operation>
170+
<input>
171+
<soap:body
172+
use="literal"></soap:body>
173+
</input>
174+
<output>
175+
<soap:body
176+
use="literal"></soap:body>
177+
</output>
178+
</operation>
179+
</binding>
180+
<service
181+
name="CourtSchedulingMDE">
182+
<port
183+
binding="tns:CourtSchedulingMDESoap"
184+
name="CourtSchedulingMDEPort">
185+
<soap:address
186+
location="http://hOst.docker.internal:8080/efm/CourtSchedulingMDE.svc"></soap:address>
187+
</port>
188+
</service>
189+
</definitions>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<definitions
2+
xmlns:wsmp="urn:oasis:names:tc:legalxml-courtfiling:wsdl:WebServicesProfile-Definitions-4.0"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
5+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
6+
xmlns="http://schemas.xmlsoap.org/wsdl/"
7+
targetNamespace="urn:tyler:efm:wsdl:WebServicesProfile-Implementation-4.0">
8+
<import
9+
namespace="urn:oasis:names:tc:legalxml-courtfiling:wsdl:WebServicesProfile-Definitions-4.0"
10+
location="../stage/ecf-1.xsd"></import>
11+
<service
12+
name="CourtRecordMDEService">
13+
<port
14+
name="CourtRecordMDEPort"
15+
binding="wsmp:CourtRecordMDEPortSOAPBinding">
16+
<soap:address
17+
location="http://host.docker.internal:8080/efm/CourtRecordMDEPort.svc"></soap:address>
18+
</port>
19+
</service>
20+
</definitions>
21+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml
2+
version="1.0"
3+
encoding="UTF-8"
4+
standalone="no"?>
5+
<definitions
6+
xmlns="http://schemas.xmlsoap.org/wsdl/"
7+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
8+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
9+
xmlns:wsmp="urn:oasis:names:tc:legalxml-courtfiling:wsdl:WebServicesProfile-Definitions-4.0"
10+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
11+
targetNamespace="urn:tyler:efm:wsdl:WebServicesProfile-Implementation-4.0">
12+
<import
13+
location="../stage/ecf-1.xsd"
14+
namespace="urn:oasis:names:tc:legalxml-courtfiling:wsdl:WebServicesProfile-Definitions-4.0"></import>
15+
<service
16+
name="FilingReviewMDEService">
17+
<port
18+
binding="wsmp:FilingReviewMDEPortSOAPBinding"
19+
name="FilingReviewMDEPort">
20+
<soap:address
21+
location="http://host.docker.internal:8080/efm/FilingReviewMDEPort.svc"></soap:address>
22+
</port>
23+
</service>
24+
</definitions>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<definitions
2+
xmlns:wsmp="urn:oasis:names:tc:legalxml-courtfiling:wsdl:WebServicesProfile-Definitions-4.0"
3+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
5+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
6+
xmlns="http://schemas.xmlsoap.org/wsdl/"
7+
targetNamespace="urn:tyler:efm:wsdl:WebServicesProfile-Implementation-4.0">
8+
<import
9+
namespace="urn:oasis:names:tc:legalxml-courtfiling:wsdl:WebServicesProfile-Definitions-4.0"
10+
location="../stage/ecf-1.xsd"></import>
11+
<service
12+
name="ServiceMDEService">
13+
<port
14+
name="ServiceMDEPort"
15+
binding="wsmp:ServiceMDEPortSOAPBinding">
16+
<soap:address
17+
location="http://host.docker.internal:8080/efm/ServiceMDEPort.svc"></soap:address>
18+
</port>
19+
</service>
20+
</definitions>

0 commit comments

Comments
 (0)