This project returns Queried value from SOAP(XML) in form of JSON.

Overview

About

This is project by team SSDD for HachNUThon (TechHolding).

This project stores and allows updating SOAP(xml) data and responds to various queries in form of JSON.

Advantages

We recognised that at some period of time, there are either too many requests from individual clients or there are very less amount of requests.

So we decided to use WebSockets over HTTP. We also cache queries for 2 minutes, so this prevents unnecessary sterilizing and deserializing data.

Usage

Prerequisites:

Latest version of cargo (nightly) and some websocket client to use it.

Usage

cargo run --package stj --bin stj -- -p <foo>/pw.txt -d <foo>

where pw.txt contains password and foo is path to the directory where xml will be stored.

Example files:

File Value
password file pw.txt
SOAP xml file file.xml

To insert values/update the xml file:

{
  "id": "xml",
  "pw": "<password>",
  "value": "<xml>"
}

Example:

{
  "id": "xml",
  "pw": "tmppw",
  "value": "<?xml version = \"1.0\"?>\n<SOAP-ENV:Envelope\n        xmlns:SOAP-ENV = \"http://www.w3.org/2001/12/soap-envelope\"\n        SOAP-ENV:encodingStyle = \"http://www.w3.org/2001/12/soap-encoding\">\n\n  <SOAP-ENV:Body xmlns:m = \"http://www.xyz.org/quotations\">\n    <m:GetQuotation>\n      <m:QuotationsName>MiscroSoft</m:QuotationsName>\n    </m:GetQuotation>\n  </SOAP-ENV:Body>\n</SOAP-ENV:Envelope>"
}

To query value:

{
  "id": "qry",
  "path": "path/to/value"
}

Example:

{
  "id": "qry",
  "path": "Body/GetQuotation/QuotationsName/$value"
}

and to get full xml as JSON, just pass empty value in path i.e.:

{
  "id": "qry",
  "path": ""
}

Security

To prevent unauthorised people from updating the xml, we protected it by storing password in the linux/macos keyring.

You might also like...
A reconciliation service to sync a key-value map over multiple instances.

reconcile-rs Docs This crate provides a key-data map structure HRTree that can be used together with the reconciliation Service. Different instances c

Dynamic, Type-Erased Key-Value Maps in Rust

Dynamic Objects in Rust Do you love Rust but are tired of being constrained by static typing when you need a map to hold values of different types? Do

An ultra-fast CLI app that fixes JSON files in large codebase or folders

minosse An ultra fast CLI app that fixes json files in large codebase or folders USAGE: minosse [OPTIONS] input-dir FLAGS: -h, --help Prints

A simple CLI for combining json and yaml files

A simple CLI for combining json and yaml files

A Rust CLI to provide last publish dates for packages in a package-lock.json file

NPM Package Age A Rust CLI which if you provide a npm lockfile (package-lock.json to start), it will give you a listing of all of the packages & the l

This is a simple command line application to convert bibtex to json written in Rust and Python

bibtex-to-json This is a simple command line application to convert bibtex to json written in Rust and Python. Why? To enable you to convert very big

hj is a command line tool to convert HTTP/1-style text into JSON

hj hj is a command line tool to convert HTTP/1-style text into JSON. This command is inspired by yusukebe/rj, which is a standalone HTTP client that s

CLI application to run clang-format on a set of files specified using globs in a JSON configuration file.
CLI application to run clang-format on a set of files specified using globs in a JSON configuration file.

run_clang_format CLI application for running clang-format for an existing .clang-format file on a set of files, specified using globs in a .json confi

A small CLI tool to query ArcGIS REST API services, implemented in Rust. The server response is returned as pretty JSON.

A small CLI tool to query ArcGIS REST API services, implemented in Rust. The server response is returned as pretty JSON.

Owner
Sandipsinh Rathod
Base 2, that's how we do! My personal git server for stupid projects: https://git.ssdd.dev/ssdd
Sandipsinh Rathod
Add CLI & form interface to your program

Add CLI & form interface to your program

null 292 Nov 4, 2022
Anglosaxon is a command line tool to parse XML files using SAX

anglosaxon - Convert large XML files to other formats anglosaxon is a command line tool to parse XML files using SAX. You can do simple transformation

Amanda 8 Oct 7, 2022
dovi_meta is a CLI tool for creating Dolby Vision XML metadata from an encoded deliverable with binary metadata.

dovi_meta dovi_meta is a CLI tool for creating Dolby Vision XML metadata from an encoded deliverable with binary metadata. Building Toolchain The mini

Rainbaby 12 Dec 14, 2022
Language server for Odoo Python/JS/XML

odoo-lsp Features Completion, definition and references for models, XML IDs and model fields Works for records, templates, env.ref() and other structu

Viet Dinh 5 Aug 31, 2023
SKYULL is a command-line interface (CLI) in development that creates REST API project structure templates with the aim of making it easy and fast to start a new project.

SKYULL is a command-line interface (CLI) in development that creates REST API project structure templates with the aim of making it easy and fast to start a new project. With just a few primary configurations, such as project name, you can get started quickly.

Gabriel Michaliszen 4 May 9, 2023
Valq - macros for querying and extracting value from structured data by JavaScript-like syntax

valq   valq provides a macro for querying and extracting value from structured data in very concise manner, like the JavaScript syntax. Look & Feel: u

Takumi Fujiwara 24 Dec 21, 2022
Execute Javascript code in the Dioxus, and get the return value ( for Dioxus )

Golde Dioxus Execute Javascript code in the Dioxus, and get the return value. This demo can help use Javascript to calc the + operator formula. use di

YuKun Liu 15 Dec 27, 2022
A crate providing a MemoryCell struct, which stores a current and previous value.

memcell What is a MemoryCell? A MemoryCell is a struct containing both a current and optional previous value. Definition #[derive(Debug, Clone)] pub s

Imajin 9 Nov 21, 2022
A lightweight, embedded key-value database for mobile clients (i.e., iOS, Android), written in Rust.

A lightweight, embedded key-value database for mobile clients (i.e., iOS, Android), written in Rust. ⚠️ Still in testing, not yet ready for production

Tangent 6 Sep 25, 2023
A reliable key-value storage for modern software

Quick-KV A reliable key-value storage for modern software Features Binary Based Data-Store Serde Supported Data Types Thread Safe Links Documentation

null 3 Oct 11, 2023