Skip to content
Open
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
12 changes: 6 additions & 6 deletions .cursor/rules/mhr-b2b-project.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ alwaysApply: true

# mhr-b2b-client-java (Java 8 / javax)

My Health Record **PCEHR B2B** client **not** Healthcare Identifiers (HI). Do **not** reference **`myhr-b2b-client-java`** or other aggregator/unified client projects in docs or comments. End-user docs: **`README.md`**, **`ADHA-THIRD-PARTY-SCOPE.md`**, **`MAINTAINERS.md`**. Agent WSDL/facade matrix: **`.cursor/WSDL-CLIENT-PURPOSES.md`** (gitignored).
My Health Record **PCEHR B2B** client - **not** Healthcare Identifiers (HI). Do **not** reference **`myhr-b2b-client-java`** or other aggregator/unified client projects in docs or comments. End-user docs: **`README.md`**, **`ADHA-THIRD-PARTY-SCOPE.md`**, **`MAINTAINERS.md`**. Agent WSDL/facade matrix: **`.cursor/WSDL-CLIENT-PURPOSES.md`** (gitignored).

## Release line (integrator docs use Maven Central versions only)

| Version | Java | APIs | Facades |
| ---- | ---- | ---- | ---- |
| **1.6.3** | 8 | javax | **15** (12 WSDLs; three WSDLs each used by two facades) |
| **8.0.0** | 8 | javax | **15** (12 WSDLs; three WSDLs each used by two facades) |

**This checkout:** **`1.6.3-SNAPSHOT`** **`au.gov.nehta:pcehr-compiled-wsdl`** at **`${project.version}`**; Java **8** / **`javax.*`**.
**This checkout:** **`8.0.0-SNAPSHOT`** - **`au.gov.nehta:mhr-wsdl`** at **`${project.version}`**; Java **8** / **`javax.*`**.

## WSDL/XSD (committed in Git)

PCEHR B2B WSDL/XSD under `wsdls/src/main/resources/` are **not** separate ADHA-licensed artefacts (unlike HI in hi-b2b-client-java). **Keep them in Git** for reference and for **`pcehr-compiled-wsdl-java`**. Compile against **`au.gov.nehta:pcehr-compiled-wsdl`** at **`pcehr.wsdl.version`** = **`${project.version}`** install matching **`pcehr-compiled-wsdl-java`** first. **Six** view facades under `clients.view`; seven **`getView`** types **`ADHA-THIRD-PARTY-SCOPE.md`**. Optional Ant **`wsimport`** under **`wsdls/`** (not part of default **`mvn verify`**).
PCEHR B2B WSDL/XSD under `wsdls/src/main/resources/` are **not** separate ADHA-licensed artefacts (unlike HI in hi-b2b-client-java). **Keep them in Git** for reference and for **`mhr-wsdl-java`**. Compile against **`au.gov.nehta:mhr-wsdl`** at **`mhr.wsdl.version`** = **`${project.version}`** - install matching **`mhr-wsdl-java`** first. **Six** view facades under `clients.view`; seven **`getView`** types - **`ADHA-THIRD-PARTY-SCOPE.md`**. Optional Ant **`wsimport`** under **`wsdls/`** (not part of default **`mvn verify`**).

## Build

- JDK **8**: install sibling **`pcehr-compiled-wsdl-java`** at the same version, then `mvn -B "-Dgpg.skip=true" clean verify`
- JAX-WS: **`com.sun.xml.ws:jaxws-rt` 2.3.7** not legacy Metro **`webservices-*`**
- JDK **8**: install siblings at **8.0.0** / **`${project.version}`** in order: **`mhr-wsdl`**, **`smi-xsp`**, **`smi-common-utils`**, **`common-library`**, then `mvn -B "-Dgpg.skip=true" clean verify`
- JAX-WS: **`com.sun.xml.ws:jaxws-rt` 2.3.7** - not legacy Metro **`webservices-*`**
- Enforcer bans Metro **`webservices-*`** (application code uses **`javax.*`** only)
- Default Surefire: offline tests; **`-Pintegration`** for mutual-TLS suite
- Strict Javadoc: **`doclint=all`**, **`failOnWarnings=true`**
Expand Down
23 changes: 12 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Runs default offline unit tests + Javadoc/sources (verify), then compiles sample sources.
name: CI

on:
push:
branches: [ java-8 ]
pull_request:
branches: [ java-8 ]

permissions:
contents: read
Expand All @@ -12,21 +13,21 @@ jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v5
- uses: actions/checkout@v7
- uses: actions/checkout@v7
with:
repository: AuDigitalHealth/pcehr-compiled-wsdl-java
ref: java-8-javax-full-wsdl
path: pcehr-compiled-wsdl-java
repository: AuDigitalHealth/mhr-wsdl-java
ref: java-8
path: mhr-wsdl-java
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "8"
cache: maven
- name: Install pcehr-compiled-wsdl (1.6.3-SNAPSHOT)
working-directory: pcehr-compiled-wsdl-java
run: mvn -B -Dgpg.skip=true clean install -DskipTests
- name: Install mhr-wsdl (8.0.0-SNAPSHOT)
working-directory: mhr-wsdl-java
run: mvn -B "-Dgpg.skip=true" clean install -DskipTests
- name: Maven verify
run: mvn -B -Dgpg.skip=true clean verify
run: mvn -B "-Dgpg.skip=true" clean verify
- name: Compile sample sources (sample profile)
run: mvn -B -Psample -Dgpg.skip=true -DskipTests=true clean compile
run: mvn -B -Psample "-Dgpg.skip=true" -DskipTests=true clean compile
7 changes: 5 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ Rules: `.cursor/rules/*.mdc`. Do not duplicate in README or CONTRIBUTING.

| Concern | Rule / reference |
|---------|------------------|
| ASCII only in authored files | `ascii-source.mdc` |
| Documentation and build scripts (implementor-first, Central, local, OS, paths, no secrets) | `documentation-standards.mdc` |
| MHR scope, WSDL, build, Java 8 / javax | `mhr-b2b-project.mdc` |
| Worktrees local only; versions in integrator docs | `worktrees.mdc` |
| Multi-branch edits in one repo - use worktree, not checkout/stash | `multi-branch-worktrees.mdc` |
| WSDL-to-facade matrix (agent only) | `.cursor/WSDL-CLIENT-PURPOSES.md` |
| Multi-branch edits in one repo — use worktree, not checkout/stash | `multi-branch-worktrees.mdc` |

Contributors (humans): README, CONTRIBUTING.md, MAINTAINERS.md, ADHA-THIRD-PARTY-SCOPE.md, wsdls/readme.txt.
Contributors (humans): README, CONTRIBUTING.md, MAINTAINERS.md, SECURITY.md, CHANGELOG.md, ADHA-THIRD-PARTY-SCOPE.md, wsdls/readme.txt.
38 changes: 24 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# Change Log/Revision History

= 1.6.3-SNAPSHOT =
==================
- Java 8 / javax public-release line: EE4J jaxws-rt 2.3.7, pcehr-compiled-wsdl at ${project.version}, modernized Maven build and CI.
= 8.0.0 =
=======
- Maven **`au.gov.nehta:mhr-b2b-client`** **8.0.0** (Java **8** / **`javax`**, **15** facades). The first number of the Maven version is the targeted Java SE version. Pair with **`au.gov.nehta:mhr-wsdl`** at the same coordinate.
- Java packages and types use **`mhr`** names (`vendorlibrary.mhr`, **`DoesMHRExistClient`**, **`MHRHeader`**, **`RegisterMHRClient`**). SOAP namespaces and element names remain the B2B **`pcehr`** wire contract (**`PCEHRHeader`**, **`registerPCEHR`**).
- Runtime: **`com.sun.xml.ws:jaxws-rt` 2.3.7**. **`maven-enforcer-plugin`** bans Metro **`webservices-*`** and **`jakarta.xml.bind-api`**, **`jakarta.xml.ws-api`**, **`jakarta.xml.soap-api`**, **`jakarta.jws-api`**.
- POM: Sonatype Central Portal (**`central-publishing-maven-plugin`**; server id **`central`**).
- Offline smoke tests: **`JaxwsRuntimeSmokeTest`**, **`MhrWsdlArtifactSmokeTest`** (loads **`MHRProfileService`**).
- Documentation: README, CONTRIBUTING, MAINTAINERS, SECURITY.

= 1.6.3 =
=========
Historical past release (superseded by **8.0.0** on this line).
- Java 8 / javax public-release line: EE4J jaxws-rt 2.3.7, mhr-wsdl at ${project.version}, modernized Maven build and CI.
- Strict Javadoc (doclint=all, failOnWarnings); enforcer bans Metro webservices-*.
- Optional Ant wsimport under wsdls/: EE4J tooling in lib/provided (not Metro webservices-*); sync-lib + ant generate-src; WsdlsCodegenToolingTest guards layout.
- Removed stale resources.zip duplicate; dropped optional codegen wrapper scripts.
Expand Down Expand Up @@ -36,7 +46,7 @@

= 1.1.1 =
=========
- Updated PCEHR wsdl jar to nehta-vendorlibrary-java-pcehr-compiled-wsdl-2.4.1.jar
- Updated PCEHR wsdl jar to nehta-vendorlibrary-java-mhr-wsdl-2.4.1.jar
- added new DocumentTypeCodes for Pathology and DI
- modified XDS Metadata service start stop time for pathology/di

Expand Down Expand Up @@ -91,7 +101,7 @@

= 0.7.8 (DRAFT) =
=========
- Modifications To RegisterPCEHRClient and Client.javato fix a bug with MTOM.
- Modifications To RegisterMHRClient and Client.javato fix a bug with MTOM.
NB:this release is backward-compatible with Java 6.

= 0.7.7 (DRAFT) =
Expand Down Expand Up @@ -207,7 +217,7 @@ PCEHR client libraries and properties will need to be updated and re-compiled ac

Change History:
- Enhancement to allow client properties to be set using 'setProperty' method. For instance:
DoesPCEHRExistClient client = ... // constructor call
DoesMHRExistClient client = ... // constructor call
client.setProperty(JAXWSProperties.CONNECT_TIMEOUT, 180000); // Timeout of three minutes.
- Abstraction of client code to improve manageability.
- Accessor method for 'Client' port.
Expand Down Expand Up @@ -270,7 +280,7 @@ Pre-Requisites:
- SVT 5.11 (or greater) environment required for support of:
1) CDA document <id> root value of type UUID in document uploads.
2) Signature verification
3) 'GetRepresentativeList' and 'RegisterPCEHR' clients.
3) 'GetRepresentativeList' and 'RegisterMHR' clients.

Change History:
- Fix for 'UploadDocument' submission set metadata association for document replacement.
Expand All @@ -291,17 +301,17 @@ Pre-Requisites:
- SVT 5.11 (or greater) environment required for support of:
1) CDA document <id> root value of type UUID in document uploads.
2) Signature verification
3) 'GetRepresentativeList' and 'RegisterPCEHR' clients.
3) 'GetRepresentativeList' and 'RegisterMHR' clients.

Change History:
- Modified 'RegisterPCEHR' sample code to provide an correct example for:
- Modified 'RegisterMHR' sample code to provide an correct example for:
1) registering a PCEHR with an IHI (child-specific sample code, with parent assertion details)
2) registering a PCEHR with demographics (individual-specific code)
- Inclusion of generated code JAR files supporting the deprecation of the 'GetIndividualDetails'
operation:
1) nehta-vendorlibrary-java-pcehr-compiled-wsdl-2.1.0-docs.jar
2) nehta-vendorlibrary-java-pcehr-compiled-wsdl-2.1.0-sources.jar
3) nehta-vendorlibrary-java-pcehr-compiled-wsdl-2.1.0.jar
1) nehta-vendorlibrary-java-mhr-wsdl-2.1.0-docs.jar
2) nehta-vendorlibrary-java-mhr-wsdl-2.1.0-sources.jar
3) nehta-vendorlibrary-java-mhr-wsdl-2.1.0.jar

= 0.6.0 (DRAFT) =
=========
Expand All @@ -312,12 +322,12 @@ Pre-Requisites:
- SVT 5.11 (or greater) environment required for support of:
1) CDA document <id> root value of type UUID in document uploads.
2) Signature verification
3) 'GetRepresentativeList' and 'RegisterPCEHR' clients.
3) 'GetRepresentativeList' and 'RegisterMHR' clients.

Change History:
- Abstraction of some common client behaviour to improve manageability.
- Updated 'license.txt' with new license text for vendor library usage.
- Added 'RegisterPCEHR' client and sample code.
- Added 'RegisterMHR' client and sample code.
- Added 'GetRepresentativeList' client and sample code.
- Added response signature verification to 'SecurityHandler', utilising XSP libraries. For further detail
on the verification process, please see the '/lib/provided/nehta-smi-xsp-1.0.3*.jar' libraries.
Expand Down
91 changes: 82 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,84 @@
# Contributing

**Audience:** people submitting patches or running this repository's CI locally.

- **Build:** **JDK 8** and **Apache Maven 3.6.3+**. From the repo root: **`mvn -B -Dgpg.skip=true clean verify`**. Optional faster local **`verify`** without Javadoc: **`mvn -B -Pdev-javadoc-off -Dgpg.skip=true clean verify`**. Integration tests: **`mvn -B -Pintegration -Dgpg.skip=true clean test`**. Sample compile: **`mvn -B -Psample -Dgpg.skip=true -DskipTests=true clean compile`**. Shaded JAR: **`mvn -B -Pfat-jar -Dgpg.skip=true clean verify`**. Optional **`./build.sh`**, **`build.ps1`**.
- **Dependencies:** **`au.gov.nehta:pcehr-compiled-wsdl`** at **`pcehr.wsdl.version`** = **`${project.version}`** (**`1.6.3-SNAPSHOT`** during development). **Local SNAPSHOT:** **`mvn install`** in **[pcehr-compiled-wsdl-java](https://github.com/AuDigitalHealth/pcehr-compiled-wsdl-java)** at the **matching version** before **`verify`** here.
- **CI:** **`.github/workflows/ci.yml`** installs **`pcehr-compiled-wsdl-java`** then runs **`verify`** on **Temurin 8**.
- **Do not commit:** **`local.properties`**, real keystores, passwords, API tokens, or production URLs. See **`SECURITY.md`**.
- **Line endings:** configure Git **`core.autocrlf false`** on Windows before committing.
- **Optional WSDL codegen:** **`cd wsdls`**, **`./sync-lib.ps1`**, then **`ant -f build.xml generate-src`** (Apache Ant on PATH; see **`MAINTAINERS.md`**). **`WsdlsCodegenToolingTest`** (default Surefire) verifies **`wsdls/lib/provided/`** contains EE4J tooling and no Metro bundles.
- **Internals:** **`MAINTAINERS.md`**.
**Audience:** developers building or changing **this repository**. Integrators should use **README.md** and Maven Central coordinates. See **SECURITY.md** before committing.

## Prerequisites

- **JDK 8** with **`JAVA_HOME`** set (see **`maven.compiler.release`** in **`pom.xml`**).
- **Maven 3.6.3+** on **`PATH`**.

Dependencies resolve from **[Maven Central](https://central.sonatype.com/)** unless you are installing a **local SNAPSHOT** (below).

## Versioning

The **first number** of **`au.gov.nehta:mhr-b2b-client`** is the **Java SE** version that this client targets. **8.0.0** is **`javax`** with **15** facades; **11.0.0.1** and later are **Jakarta** with **15** facades. See **`README.md`**.

**`mhr-b2b-client`** pins **`mhr-wsdl`** to **`${project.version}`**. Use the **same** version for both artifacts.

## Build

From the project root, after **`mhr-wsdl`** is resolvable:

```text
mvn -B "-Dgpg.skip=true" clean verify
```

| Goal | Command |
| ---- | ------- |
| Compile + attach sources/Javadoc | `mvn -B "-Dgpg.skip=true" clean verify` |
| Skip tests | `mvn -B "-Dgpg.skip=true" clean verify "-DskipTests=true"` |
| Skip Javadoc | `mvn -B -Pdev-javadoc-off "-Dgpg.skip=true" clean verify` |
| Integration tests | `mvn -B -Pintegration "-Dgpg.skip=true" clean test` |
| Sample compile | `mvn -B -Psample "-Dgpg.skip=true" -DskipTests=true clean compile` |
| Shaded JAR | `mvn -B -Pfat-jar "-Dgpg.skip=true" clean verify` |

GPG signing is skipped by default (**`-Dgpg.skip=true`**). Release builds: **`-Dgpg.skip=false`**. Optional **`./build.sh`**, **`build.ps1`**.

## Dependencies

- Types: **`au.gov.nehta:mhr-wsdl`** at **`${project.version}`**.
- Shared libs: **`au.gov.nehta:smi-xsp`**, **`au.gov.nehta:smi-common-utils`**, and **`au.gov.nehta:common-library`** at **`${project.version}`** (**8.0.0**).
- Runtime SOAP stack: **`com.sun.xml.ws:jaxws-rt`** **2.3.7**.
- **`maven-enforcer-plugin`** rejects Metro **`webservices-*`** and **`jakarta.xml.bind-api`**, **`jakarta.xml.ws-api`**, **`jakarta.xml.soap-api`**, **`jakarta.jws-api`**.

## Local builds (unpublished artifacts)

Install matching siblings first (same Java line: **`8.0.0-SNAPSHOT`**):

```text
# in mhr-wsdl-java
mvn -B "-Dgpg.skip=true" clean install

# in smi-xsp-java
mvn -B "-Dgpg.skip=true" clean install

# in smi-common-utils-java
mvn -B "-Dgpg.skip=true" clean install

# in common-library-java
mvn -B "-Dgpg.skip=true" clean install

# in mhr-b2b-client-java
mvn -B "-Dgpg.skip=true" clean verify
```

Integrators using GA versions from Maven Central do not need a source checkout.

Maintainer notes: **MAINTAINERS.md**.

## Optional WSDL codegen

The default lifecycle does **not** run **`wsimport`**. To regenerate from **`wsdls/`**:

```text
cd wsdls
./sync-lib.ps1
ant -f build.xml generate-src
```

Apache Ant must be on **`PATH`**. **`WsdlsCodegenToolingTest`** (default Surefire) verifies **`wsdls/lib/provided/`** contains EE4J tooling and no Metro bundles.

## Repository hygiene

- **Do not commit** **`local.properties`**, real keystores, passwords, API tokens, or production URLs. See **SECURITY.md**.
- **Line endings:** the repository uses **LF** (see **`.gitattributes`**). On **Windows**, run **`git config core.autocrlf false`** in your clone before committing.
Loading
Loading