Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
cache-dependency-path: |
EfspCommons/pom.xml
TylerEfmClient/pom.xml
TrueFilingEcf4/pom.xml
TylerEcf4/pom.xml
TylerEcf5/pom.xml
proxyserver/pom.xml
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,8 @@ google-java-format_*
# MKDocs Output
site

.jqwik-database
.jqwik-database

# Eclipse

.factorypath
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ARG CI_COMMIT_SHA
LABEL git-commit=$CI_COMMIT_SHA
COPY pom.xml /app/
COPY EfspCommons /app/EfspCommons/
COPY TrueFilingEcf4 /app/TrueFilingEcf4/
COPY TylerEcf4 /app/TylerEcf4/
COPY TylerEcf5 /app/TylerEcf5/
COPY TylerEfmClient /app/TylerEfmClient/
Expand Down
1 change: 0 additions & 1 deletion EfspCommons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<artifactId>efspserver-parent</artifactId>
<version>1.4.0</version>
</parent>
<groupId>edu.suffolk.litlab</groupId>
<artifactId>efsp-commons</artifactId>
<name>EFSP Common code</name>
<description>Code that is used in all other modules of this Efile proxy server project.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public enum Jurisdiction {
ILLINOIS("illinois", Api.ECF_4_Schedule, Vendor.TYLER),
MASSACHUSETTS("massachusetts", Api.ECF_4, Vendor.TYLER),
TEXAS("texas", Api.ECF_4, Vendor.TYLER),
VERMONT("vermont", Api.ECF_4, Vendor.TYLER);
VERMONT("vermont", Api.ECF_4, Vendor.TYLER),
ALASKA("alaska", Api.ECF_4, Vendor.TRUE_FILING);

public enum Api {
ECF_4,
Expand All @@ -25,7 +26,8 @@ public enum Api {
}

public enum Vendor {
TYLER;
TYLER,
TRUE_FILING;
}

private String name;
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ This project is written in Java, using Maven as a build system. The Java code is
different modules for better defined interfaces. Those modules include:

* [TylerEfmClient](TylerEfmClient/README.md)
* [Ecf4](Ecf4/README.md)
* [Ecf5](Ecf5/README.md)
* [TylerEcf4](TylerEcf4/README.md)
* [TylerEcf4](TylerEcf4/README.md)
* [TylerEcf5](TylerEcf5/README.md)
* [TrueFilingEcf4](TrueFilingEcf4/README.md)
151 changes: 151 additions & 0 deletions TrueFilingEcf4/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>edu.suffolk.litlab</groupId>
<artifactId>efspserver-parent</artifactId>
<version>1.4.0</version>
</parent>
<artifactId>truefiling-ecf4</artifactId>
<name>TrueFiling ECF 4</name>
<description>Generated Java files for TrueFiling's ECF 4 Schemas</description>

<dependencies>
<dependency>
<groupId>edu.suffolk.litlab</groupId>
<artifactId>efsp-commons</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>jakarta.jws</groupId>
<artifactId>jakarta.jws-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf.xjc-utils</groupId>
<artifactId>cxf-xjc-runtime</artifactId>
</dependency>

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-features-logging</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>4.0.2</version>
<!--$NO-MVN-MAN-VER$-->
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>3.1.0</version>
</dependency>

</dependencies>
<build>
<plugins>

<!-- run with mvn resources:resources, run before generate-sources-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>

<executions>
<execution>
<id>copy-wsdl</id>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<outputDirectory>target/classes/wsdl/xsd</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>../Niem/src/main/resources/xsd</directory>
<includes>
<include>**/*.xsd</include>
<include>**/**/*.xsd</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>4.1.3</version>
<configuration/>
<executions>
<execution>
<id>generate-sources</id>
<goals>
<goal>wsdl2java</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>target/classes/wsdl/WebServices/dev/ECF-4.0-FilingReviewMDEService.wsdl</wsdl>
</wsdlOption>
<wsdlOption>
<wsdl>target/classes/wsdl/WebServices/dev/ECF-4.0-CourtRecordMDEService.wsdl</wsdl>
</wsdlOption>
<wsdlOption>
<wsdl>target/classes/wsdl/WebServices/dev/ECF-4.0-ServiceMDEService.wsdl</wsdl>
</wsdlOption>
<wsdlOption>
<wsdl>target/classes/wsdl/WebServices/dev/ECF-4.0-FilingAssemblyMDEService.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
<additionalJvmArgs>-Djavax.xml.accessExternalDTD=all</additionalJvmArgs>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package edu.suffolk.litlab.efsp.truefiling;

import edu.suffolk.litlab.efsp.Jurisdiction;
import gov.niem.niem.domains.jxdm._4.CourtType;
import gov.niem.niem.niem_core._2.EntityType;
import gov.niem.niem.niem_core._2.IdentificationType;
import gov.niem.niem.niem_core._2.TextType;
import jakarta.xml.bind.JAXBElement;
import jakarta.xml.ws.BindingProvider;
import oasis.names.tc.legalxml_courtfiling.schema.xsd.commontypes_4.ObjectFactory;
import oasis.names.tc.legalxml_courtfiling.schema.xsd.commontypes_4.PersonType;
import oasis.names.tc.legalxml_courtfiling.schema.xsd.courtpolicyquerymessage_4.CourtPolicyQueryMessageType;
import org.apache.cxf.ext.logging.LoggingFeature;

public class PrintVersions {

public static void main(String args[]) {
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
// TODO(brycew): add easy checks to look for client-sign.properties, Suffolk.pfx, and
// X509_PASSWORD in env.
System.out.println("Getting versions for all truefile servers");
try {
var review =
SoapClientChooser.getFilingReviewFactory(Jurisdiction.ALASKA).getFilingReviewMDEPort();
SoapClientChooser.setupServicePort((BindingProvider) review);
// ClientProxy.getClient(review).getInInterceptors().add(test);

var query = new CourtPolicyQueryMessageType();
var court = new CourtType();
var niemCoreObjFac = new gov.niem.niem.niem_core._2.ObjectFactory();
var adamsId = niemCoreObjFac.createIdentificationType();
var adamsStr = new gov.niem.niem.proxy.xsd._2.String();
adamsStr.setValue("55da5b11-2bc4-4881-abd1-b0dfdb506bb1");
adamsId.setIdentificationID(adamsStr);
court.setOrganizationIdentification(adamsId);
var text = new TextType();
text.setValue("55da5b11-2bc4-4881-abd1-b0dfdb506bb1");
court.setCourtName(text);
query.setCaseCourt(court);
var id = new IdentificationType();
EntityType typ = new EntityType();
var commonObjFac = new ObjectFactory();
JAXBElement<PersonType> elem2 = commonObjFac.createEntityPerson(new PersonType());
typ.setEntityRepresentation(elem2);
query.setQuerySubmitter(typ);
var string = new gov.niem.niem.proxy.xsd._2.String();
string.setValue("http://localhost");
id.setIdentificationID(string);
query.setSendingMDELocationID(id);
query.setSendingMDEProfileCode(
"urn:oasis:names:tc:legalxml-courtfiling:schema:xsd:WebServicesMessaging-2.0");
review.getPolicy(query);
} catch (Exception ex) {
System.err.println("Error making call: " + ex.getLocalizedMessage() + ", " + ex.toString());
// continue
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
package edu.suffolk.litlab.efsp.truefiling;

import edu.suffolk.litlab.efsp.ConfigurationLoader;
import edu.suffolk.litlab.efsp.Jurisdiction;
import edu.suffolk.litlab.efsp.ServerEnv;
import edu.suffolk.litlab.efsp.stdlib.StdLib;
import imagesoft.ecf.wsdl.webservicesprofile_implementation_4_0.CourtRecordMDEService;
import imagesoft.ecf.wsdl.webservicesprofile_implementation_4_0.FilingReviewMDEService;
import jakarta.xml.ws.BindingProvider;
import java.net.URL;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import org.apache.cxf.ext.logging.LoggingFeature;
import org.apache.cxf.message.Message;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/** The TrueFiling version of the Tyler class */
public class SoapClientChooser {

private static final Logger log = LoggerFactory.getLogger(SoapClientChooser.class);

private static final String REVIEW_SUFFIX = "-ECF-4.0-FilingReviewMDEService.wsdl";
private static final String RECORD_SUFFIX = "-ECF-4.0-CourtRecordMDEService.wsdl";

private static Optional<Boolean> shouldLogRequests;

private static URL getRes(TrueFilingDomain domain, String suffix) {
String wsdlPath =
"wsdl/WebServices"
+ "/"
+ domain.env().getName()
+ "/"
+ domain.jurisdiction().getName()
+ suffix;
URL url = SoapClientChooser.class.getClassLoader().getResource(wsdlPath);
if (url == null) {
log.error("Can not initialize the default wsdl from pclass path: {}", wsdlPath);
throw new RuntimeException("Can't load Bad WSDL Path: " + wsdlPath);
}
return url;
}

public static final TrueFilingEnv getTrueFilingEnv() {
return TrueFilingEnv.from(ServerEnv.fromEnvVar());
}

public static boolean shouldLogRequests() {
if (shouldLogRequests.isEmpty()) {
shouldLogRequests = Optional.of(ConfigurationLoader.shouldLogRequests());
}
return shouldLogRequests.orElse(false);
}

public static FilingReviewMDEService getFilingReviewFactory(Jurisdiction jurisdiction) {
var domain = new TrueFilingDomain(jurisdiction, getTrueFilingEnv());
URL url = getRes(domain, REVIEW_SUFFIX);
if (shouldLogRequests()) {
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
return new FilingReviewMDEService(url, loggingFeature);
}
return new FilingReviewMDEService(url);
}

public static CourtRecordMDEService getCourtRecordFactory(Jurisdiction jurisdiction) {
var domain = new TrueFilingDomain(jurisdiction, getTrueFilingEnv());
URL url = getRes(domain, RECORD_SUFFIX);
if (shouldLogRequests()) {
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
return new CourtRecordMDEService(url, loggingFeature);
}
return new CourtRecordMDEService(url);
}

/** Should be called on the "Port" objects made from the services. */
public static void setupServicePort(BindingProvider bp) {
Map<String, Object> ctx = bp.getRequestContext();
var integratorId = StdLib.GetEnv("TRUEFILING_INTEGRATOR_ID");
if (integratorId.isPresent()) {
ctx.put(Message.PROTOCOL_HEADERS, Map.of("IntegratorId", integratorId.get()));
} else {
log.error("True filing integrator id not an environment var, calls will fail");
ctx.put(Message.PROTOCOL_HEADERS, Map.of("IntegratorId", List.of()));
}
ctx.put("set-jaxb-validation-event-handler", "false");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package edu.suffolk.litlab.efsp.truefiling;

import edu.suffolk.litlab.efsp.Jurisdiction;

public record TrueFilingDomain(Jurisdiction jurisdiction, TrueFilingEnv env) {
public String getName() {
return jurisdiction.getName() + "-" + env.getName();
}
}
Loading
Loading