{"id":22157841,"url":"https://github.com/mmilk23/wscaller","last_synced_at":"2025-06-20T01:06:16.130Z","repository":{"id":187909030,"uuid":"475236030","full_name":"mmilk23/wsCaller","owner":"mmilk23","description":"Implements generic calls to any webservice, whitout generate stubs o any other bullshit","archived":false,"fork":false,"pushed_at":"2025-05-04T04:48:02.000Z","size":139,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-04T05:26:13.632Z","etag":null,"topics":["axis","java","webservices"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmilk23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-03-29T01:22:45.000Z","updated_at":"2025-03-31T13:04:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"105e1dbd-b850-4f8f-8255-9cf54fc9cf5d","html_url":"https://github.com/mmilk23/wsCaller","commit_stats":null,"previous_names":["mmilk23/wscaller"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mmilk23/wsCaller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmilk23%2FwsCaller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmilk23%2FwsCaller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmilk23%2FwsCaller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmilk23%2FwsCaller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmilk23","download_url":"https://codeload.github.com/mmilk23/wsCaller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmilk23%2FwsCaller/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260857364,"owners_count":23073435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axis","java","webservices"],"created_at":"2024-12-02T03:15:44.384Z","updated_at":"2025-06-20T01:06:11.103Z","avatar_url":"https://github.com/mmilk23.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# wsCaller\n\n[![Build Status](https://github.com/mmilk23/wsCaller/actions/workflows/maven.yml/badge.svg)](https://github.com/mmilk23/wsCaller/actions)\n[![codecov](https://codecov.io/gh/mmilk23/wsCaller/branch/main/graph/badge.svg)](https://codecov.io/gh/mmilk23/wsCaller)\n[![Coverage Status](https://coveralls.io/repos/github/mmilk23/wsCaller/badge.svg)](https://coveralls.io/github/mmilk23/wsCaller)\n![Dependabot](https://img.shields.io/badge/Dependabot-enabled-brightgreen)\n[![Known Vulnerabilities](https://snyk.io/test/github/mmilk23/wsCaller/badge.svg)](https://snyk.io/test/github/mmilk23/wsCaller)\n[![Last Updated](https://img.shields.io/github/last-commit/mmilk23/wsCaller.svg)](https://github.com/mmilk23/wsCaller/commits/main)\n\n\n\n\n**wsCaller** is a lightweight Java library for making secure and generic web service calls without the need to generate stubs or rely on complex frameworks. It is designed to streamline interactions with SOAP-based web services while providing a customizable and testable architecture.\n\n---\n\n## Features\n\n- **Generic Web Service Calls**: Supports secure, synchronous SOAP-based service calls.\n- **Customizable Authentication**: Allows secure headers with username and password.\n- **Testability**: Includes extensible mechanisms to mock or stub service calls for unit testing.\n- **Minimal Dependencies**: Built with simplicity and maintainability in mind.\n\n---\n\n## Getting Started\n\n### Prerequisites\n\nTo use **wsCaller**, ensure you have the following installed:\n\n- Java 8 or later\n- Apache Maven\n- Access to a SOAP-based web service\n\n---\n\n### Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/mmilk23/wsCaller.git\n   cd wsCaller\n   ```\n\n2. Build the project using Maven:\n   ```bash\n   mvn clean install\n   ```\n\n---\n\n## Usage\n\n### Example: Making a Secure Web Service Call\n\nBelow is an example of how to use **wsCaller** to make a secure SOAP request:\n\n```java\nimport com.milklabs.wscall.SecureWebServiceCaller;\nimport org.apache.axis2.addressing.EndpointReference;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic class Main {\n    public static void main(String[] args) {\n        try {\n            // Create a web service caller\n            SecureWebServiceCaller caller = new SecureWebServiceCaller(\n                    new EndpointReference(\"http://example.com/service\"),\n                    \"http://example.com/namespace\",\n                    \"prefix\"\n            );\n\n            // Define parameters for the service call\n            Map\u003cString, Object\u003e params = new HashMap\u003c\u003e();\n            params.put(\"param1\", \"value1\");\n\n            // Make the web service call\n            String response = caller.chamarWebService(\"methodName\", params, \"username\", \"password\");\n\n            // Process the response\n            System.out.println(\"Response: \" + response);\n\n        } catch (Exception e) {\n            e.printStackTrace();\n        }\n    }\n}\n```\n\n---\n\n## Testing\n\nThe project includes unit tests for key components. Tests are written using **JUnit 5**.\n\nTo run the tests, execute:\n\n```bash\nmvn test\n```\n\n### Mocking and Stubs\n\nThe library includes a `ServiceClientWrapperStub` class to facilitate testing without connecting to a live web service. This enables testing various scenarios, such as exceptions or specific responses.\n\n---\n\n## Project Structure\n\n```\nwsCaller/\n├── src/main/java/com/milklabs/wscall\n│   ├── SecureWebServiceCaller.java       # Core class for making web service calls\n│   ├── ServiceClientWrapper.java         # Wrapper for the Axis2 ServiceClient\n│   └── util                              # Utility classes\n├── src/test/java/com/milklabs/wscall\n│   ├── SecureWebServiceCallerTest.java   # Unit tests for the core functionality\n│   ├── ServiceClientWrapperStub.java     # Stub class for testing\n```\n\n---\n\n## Dependencies\n\n- **Apache Axis2**: Core dependency for SOAP-based web service calls.\n- **JUnit 5**: Testing framework.\n- **Log4j**: For logging.\n\nAdd the following dependencies to your Maven `pom.xml`:\n\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.apache.axis2\u003c/groupId\u003e\n        \u003cartifactId\u003eaxis2\u003c/artifactId\u003e\n        \u003cversion\u003e1.8.2\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.junit.jupiter\u003c/groupId\u003e\n        \u003cartifactId\u003ejunit-jupiter\u003c/artifactId\u003e\n        \u003cversion\u003e5.10.0\u003c/version\u003e\n        \u003cscope\u003etest\u003c/scope\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003elog4j\u003c/groupId\u003e\n        \u003cartifactId\u003elog4j\u003c/artifactId\u003e\n        \u003cversion\u003e1.2.17\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n---\n\n## Contributing\n\nContributions are welcome! Please fork the repository, make changes, and submit a pull request.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\n## Contact\n\nFor any inquiries or support, feel free to contact the project maintainer:\n- **GitHub**: [@mmilk23](https://github.com/mmilk23)\n\nIf you found this project helpful, please consider giving it a star ⭐️.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmilk23%2Fwscaller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmilk23%2Fwscaller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmilk23%2Fwscaller/lists"}