Example
Prerequisites
- Install JDK/JRE 17
- download file-server-1.0.0 into directory file-server
- download file-client-1.0.0 into directory file-client
Or use the Docker example.
Start the File Server
java -cp file-server-1.0.0.jar dev.luin.file.server.StartGB -hsqldb
Start the File Server
java -cp file-client-1.0.0.jar dev.luin.file.client.StartGB -hsqldb -port 8000
Example
Preparation
- Use SoapUI to manage the File Server and File Client or use VSCode
- import file-server and file-client into SoapUI (these projects already contain some predefined SOAP Requests) or download file-server and file-client for REST Client
- Start the File Server and File Client
Usage
-
create user
user(using certificatelocalhost.pem) on the File Server
run in SoapUIfile-server -> UserServiceSoapBinding -> createUser -> Create User user -
upload file
Lorem Ipsum.txtfor useruserto the File Server
run in SoapUIfile-server -> FileServiceSoapBinding -> uploadFile -> Upload Lorem Ipsum.txt
The response contains thepathof the file download inxpath://Envelope/Header/Body/uploadFileResponse/path -
download Grote Berichten external-data-reference
run in SoapUI usingpathfrom step 2 infile-server -> GBServiceSoapBinding -> getExternalDataReference -> Request 1
The response contains theURLof the file download inxpath://Envelope/Header/Body/getExternalDataReferenceResponse/external-data-reference/data-reference/transport/location/senderUrl -
download the file
Lorem Ipsum.txtfrom the File Server using the File Client
run in SoapUI usingURLfrom step 3 infile-client -> FileServiceSoapBinding -> downloadFile -> Request 1 -
download the file
Lorem Ipsum.txtfrom the File Client
run in SoapUIfile-client -> FileServiceSoapBinding -> getFile -> Request 1 -
upload the file
Mauris nisl.txtto the File Server using the File Client
run in SoapUIfile-client -> FileServiceSoapBinding -> uploadFile -> Upload Mauris nisl.txt -
download Grote Berichten external-data-reference
run in SoapUIfile-client -> GBServiceSoapBinding -> getExternalDataReference -> Request 1
The response contains theURLof the file download inxpath://Envelope/Header/Body/getExternalDataReferenceResponse/external-data-reference/data-reference/transport/location/receiverUrl -
download the file
Mauris nisl.txtfrom the File Server
run in SoapUI using the path portion fromURL(so minus the base upload portion https://localhost:8443/files/upload) from step 7 aspathinfile-server -> FileServiceSoapBinding -> downloadFile -> Request 1