A working example of calling TrueFiling - #440
Merged
Merged
Conversation
BryceStevenWilley
force-pushed
the
truefiling
branch
from
August 7, 2026 16:19
cdb1f74 to
db107c0
Compare
Makes some changes to how WSDLs are generated:
* uses the cxf-codegen-plugin to actually generate the XSD / WSDL Java objects. Runs automatically
on `mvn compile` and can run individually with `mvn generate-sources`.
* Doesn't have a prefixed namespace, since the codegen plugin can't handle that. At least it shouldn't confluct with
the Tyler generated objects, with doe have the prefixed namespace.
This doesn't include the several attempts to improve this situation that didn't work at all.
* Make all Niem related schemas a separate package, and just include them
* ECF is often substituted / extended by implementors, but Niem isn't as much.
* There's another plugin, called https://github.com/highsource/jaxb-tools that can generate 'episode' files,
essentially binding files that when included in a build, will stop xjc from re-generating those files. This
works with Niem in a separate package making the episode files, and then TrueFiling's ECF implementation using
those episode files.
However, it doesn't prevent codegen from re-generating ObjectFactories that override the Niem-generated
ObjectFactories and have significantly fewer methods. That's annoying, but work-aroundable, but...
* There are actually substitutions in Niem, and even if an ObjectFactory method is generated, it might
return the wrong value (i.e. something JAXBElement wrapped instead of just the value)
* ciscoo/cxf-codegen-gradle#40 (comment) is the best summary I've
seen of this general issue. It comes down to the fact that this proxy server is made to call multiple WSDL
endpoints (both with the same types but slightly different versions, or completely different implementations),
and JAXB is not built to handle that, as it'll generate "invalid XML according to the schema".
This in general caused me to give up most of my efforts to make this code generation sane.
BryceStevenWilley
force-pushed
the
truefiling
branch
from
August 7, 2026 16:29
db107c0 to
042935c
Compare
Collaborator
Author
|
Pulling out the chunk of pom.xml that worked, but ran into issues with XSD at runtime: In NIEM: <plugin>
<groupId>org.jvnet.jaxb</groupId>
<artifactId>jaxb-maven-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaDirectory>target/classes/xsd/</schemaDirectory>
<schemaIncludes>
<include>constraint/niem/niem-core/2.0/niem-core.xsd</include>
<include>constraint/niem/domains/jxdm/4.0/jxdm.xsd</include>
<include>constraint/niem/domains/screening/2.0/screening.xsd</include>
</schemaIncludes>
<episode>true</episode>
</configuration>
</execution>
</executions>
</plugin>In TrueFilingEcf4: <plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>4.1.3</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>target/classes/wsdl/WebServices/ECF-4.0-FilingReviewMDEService.wsdl</wsdl>
<bindingFiles>
<bindingFile>../Niem/target/generated-sources/xjc/META-INF/sun-jaxb.episode</bindingFile>
</bindingFiles>
</wsdlOption>
<wsdlOption>
<wsdl>target/classes/wsdl/WebServices/ECF-4.0-CourtRecordMDEService.wsdl</wsdl>
<bindingFiles>
<bindingFile>../Niem/target/generated-sources/xjc/META-INF/sun-jaxb.episode</bindingFile>
</bindingFiles>
</wsdlOption>
<wsdlOption>
<wsdl>target/classes/wsdl/WebServices/ECF-4.0-ServiceMDEService.wsdl</wsdl>
<bindingFiles>
<bindingFile>../Niem/target/generated-sources/xjc/META-INF/sun-jaxb.episode</bindingFile>
</bindingFiles>
</wsdlOption>
<wsdlOption>
<wsdl>target/classes/wsdl/WebServices/ECF-4.0-FilingAssemblyMDEService.wsdl</wsdl>
<bindingFiles>
<bindingFile>../Niem/target/generated-sources/xjc/META-INF/sun-jaxb.episode</bindingFile>
</bindingFiles>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes some changes to how WSDLs are generated:
mvn compileand can run individually withmvn generate-sources.This doesn't include the several attempts to improve this situation that didn't work at all.