
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
org.simple4j:WSClient
Advanced tools
This is a simple Web Service Client library to call wide variety of web service behind HTTP. In theory it can support any interface or payload. On the request side, to convert java object to HTTP request components (URL, headers, body), templating is used which allows it to call XML, JSON, SOAP, REST or anyother custom interface. On the response side, it uses pluggable parser and a mapper to only extract the fields that are of interest for the client program. The parser currently supports JSON and XML and returns a collections tree.
Simple4j WSClient is a generic web service client that can be used for all types of data exchanges (XML, JSON, SOAP, REST and more) over both http and https protocols. Many of the data marshallers and parsers adds heavier dependency between client and server components for stricter type. This can result in tight coupling of web services and its client, defeating the purpose of the creation of web service technology.
WSClient focuses on loose coupling by using templating on the request marshaling side opening up the possibility to even any non-standard format. On the response side, it uses generic parsing of XML and JSON to nested Java Collections object tree. It also support custom parsing of any non-standard response formats other than XML and JSON. This flexible and configurable design allows easy adaptability and maintainability of client application without making any code change even if the interface changes on the server side.
Currently, Freemarker, Velocity and a custom simple templates are being supported. This can be extended from IFormatter class if other template engines are needed. The IFormatter instance can be used for generation of HTTP request URL, headers and body.
On the response parsing side, XML and JSON are supported and it can be extended from IParser for any additional support. If the response body has lot of nested attributes, custom retrieval can be configured (Caller.responseBodyToCustomFieldMapping) using nested wildcardable paths.
The entry point for the client code is org.simple4j.wsclient.caller.Caller.call
Sample code showing how to configure and use various capabilities of the framework can be found in test cases. The test cases use WireMock to have a mock web service. The client code is configured and executed from the test cases.
Test cases from simple to complex case.
We strongly believe that the binary and configuration should be physically separate after application deployment. The configuration files should be kept a plain file structure for easy manual updates and not be bundled in an archive. This gives tremendous flexibility to modify application behaviour just by doing simpler configuration changes. Because of the above belief, this project is and will be free of Spring annotations. This also removes strong widespread dependency on Spring framework.
FAQs
This is a simple Web Service Client library to call wide variety of web service behind HTTP. In theory it can support any interface or payload. On the request side, to convert java object to HTTP request components (URL, headers, body), templating is used which allows it to call XML, JSON, SOAP, REST or anyother custom interface. On the response side, it uses pluggable parser and a mapper to only extract the fields that are of interest for the client program. The parser currently supports JSON and XML and returns a collections tree.
We found that org.simple4j:WSClient demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.