-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Normalize method responses (#36) * chore: JSON library (#37) * chore: Add org.json dependency * chore: Add JSON usage example * feat: Config from env vars (#38) * feat: Get conf from env vars * docs: Add CLI.md document * docs: Link docs in README * feat: Add default ENV vars to Dockerfile for convenience * fix: Change worker RMI default port * feat: adding register implementation and some changes in .gitignore (#35) * feat: adding register implementation and some changes in .gitignore * fix: fixing format inconsistencies * feat: changing and upgrading res in success * fix: upgrading requests and responses * fix: changing parameter from pass to password * fix: changing url format * fix: clang format * fix: True on success * fix: Use Config class for env vars --------- Co-authored-by: woynert * Feat login (#40) * Feat login without tests * Apply formatting * docs: SOAP OpenAPI specification (#41) * docs: Add open api specification * docs: Add API definition to README.md * docs: Improve CLI.md examples * refactor: Redesign request / response types * chore: Update python sample client * chore: Update submodule * chore: Use error instead of success * chore: Apply requested changes --------- Co-authored-by: Antonio Donis <[email protected]> Co-authored-by: Silvia Pabón <[email protected]> Co-authored-by: Andres David Bonilla Higuera <[email protected]>
- Loading branch information
1 parent
56ed1d8
commit 0ba73d1
Showing
40 changed files
with
994 additions
and
138 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# CLI | ||
|
||
This document describes how to use the service as a CLI tool. | ||
|
||
## Environment variables | ||
|
||
| Variable | Description | Example | | ||
|--------------------------|-----------------------------|-------------------------| | ||
| `AUTHENTICATION_BASEURL` | Authentication service host | `http://127.0.0.1:8081` | | ||
| `METADATA_BASEURL` | Metadata service host | `http://127.0.0.1:8082` | | ||
| `WORKER_HOST` | Worker service host | `127.0.0.1` | | ||
| `WORKER_PORT` | Worker service RMI port | `1099` | |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,19 @@ | ||
package gateway; | ||
|
||
import capyfile.rmi.interfaces.*; | ||
import gateway.soap.*; | ||
import java.rmi.NotBoundException; | ||
import java.rmi.RemoteException; | ||
import java.rmi.registry.LocateRegistry; | ||
import java.rmi.registry.Registry; | ||
import gateway.config.Config; | ||
import gateway.soap.ServiceImp; | ||
import javax.xml.ws.Endpoint; | ||
|
||
public class App | ||
{ | ||
public static void main (String[] args) | ||
{ | ||
System.out.println ("Gateway: RMI demo"); | ||
|
||
// consume RMI | ||
try { | ||
// get service | ||
|
||
Registry registry = LocateRegistry.getRegistry (1900); | ||
IWorkerService server = (IWorkerService)registry.lookup ("WorkerService"); | ||
|
||
// TODO: Replace me | ||
|
||
File queryUpload = new File ("----", null); | ||
server.uploadFile (queryUpload); | ||
|
||
FileDownload queryDownload = new FileDownload ("----"); | ||
File resultFile = server.downloadFile (queryDownload); | ||
|
||
System.out.println (resultFile.uuid); | ||
|
||
} catch (Exception e) { | ||
System.err.println (e); | ||
} | ||
// init config from env vars | ||
Config.initializeFromEnv (); | ||
|
||
// serve SOAP | ||
System.out.println ("Gateway: Starting SOAP"); | ||
|
||
// serve SOAP | ||
Endpoint.publish ("http://0.0.0.0:8080/service", new ServiceImp ()); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package gateway.config; | ||
|
||
public class Config | ||
{ | ||
private static String authBaseUrl; | ||
private static String metadataBaseUrl; | ||
private static String workerHost; | ||
private static int workerPort; | ||
|
||
public static String getAuthBaseUrl () { return authBaseUrl; } | ||
public static String getMetadataBaseUrl () { return metadataBaseUrl; } | ||
public static String getWorkerHost () { return workerHost; } | ||
public static int getWorkerPort () { return workerPort; } | ||
|
||
public static void initializeFromEnv () | ||
{ | ||
authBaseUrl = | ||
System.getenv ().getOrDefault ("AUTHENTICATION_BASEURL", "http://127.0.0.1:8081"); | ||
metadataBaseUrl = | ||
System.getenv ().getOrDefault ("METADATA_BASEURL", "http://127.0.0.1:8082"); | ||
workerHost = System.getenv ().getOrDefault ("WORKER_HOST", "127.0.0.1"); | ||
workerPort = Integer.parseInt (System.getenv ().getOrDefault ("WORKER_PORT", "1099")); | ||
} | ||
} |
This file contains 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
Oops, something went wrong.