{"id":20996165,"url":"https://github.com/stefan-kolb/jaxws-samples","last_synced_at":"2025-05-14T21:32:00.840Z","repository":{"id":8036310,"uuid":"9446272","full_name":"stefan-kolb/jaxws-samples","owner":"stefan-kolb","description":"Small example projects using JAX-WS technologies.","archived":false,"fork":false,"pushed_at":"2021-05-01T04:18:52.000Z","size":4109,"stargazers_count":15,"open_issues_count":6,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-02T23:51:12.664Z","etag":null,"topics":["examples","gradle","java","jax-ws","web-services","wsdl"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefan-kolb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-15T10:30:11.000Z","updated_at":"2023-12-04T06:20:56.000Z","dependencies_parsed_at":"2022-09-02T11:40:49.782Z","dependency_job_id":null,"html_url":"https://github.com/stefan-kolb/jaxws-samples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-kolb%2Fjaxws-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-kolb%2Fjaxws-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-kolb%2Fjaxws-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefan-kolb%2Fjaxws-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefan-kolb","download_url":"https://codeload.github.com/stefan-kolb/jaxws-samples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254231077,"owners_count":22036294,"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":["examples","gradle","java","jax-ws","web-services","wsdl"],"created_at":"2024-11-19T07:28:20.357Z","updated_at":"2025-05-14T21:31:59.801Z","avatar_url":"https://github.com/stefan-kolb.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JAX-WS Samples\n\n*Sample projects using JAX-WS technologies.*\n\nAlmost all sample projects can be run as standalone projects using `gradle run` and are ready to use with JDK 11 or higher.\nThis is also the recommended way.\n\nFurthermore, the build files use the [Gradle Cargo plugin](https://github.com/bmuschko/gradle-cargo-plugin) for auto-deployment to Glassfish 4.\nFor the available Gradle tasks see [the documentation](https://github.com/bmuschko/gradle-cargo-plugin#tasks).\nPlease see the [cargo documentation](https://codehaus-cargo.github.io/cargo/Glassfish+4.x.html) for the default configuration of the used application server.\nThe plugin will download and install the server automatically for each project. The admin interface can be found at `http://admin:adminadmin@localhost:4848`.\nHowever, the plugin currently works reliably only with JDK 8.\n\nWhen Gradle is installed on your system all tasks can be run directly from the sub-project's root folder, e.g. `gradle war`. Otherwise you can use the Gradle wrapper from the root and use an absolute path like `gradlew java-first:minimal:war`.\n\nUse `gradlew eclipse` to generate Eclipse project files for all of the modules.\nThis also works for IntelliJ IDEA with `gradlew idea`.\n\n## Contents\n- [Java-first Web Services](#java-first)\n- [Deployment Styles](#deployment-styles)\n- [WSDL-first Web Services \u0026 Client Generation](#ws-client)\n- [Data Type Mapping](#type-mapping)\n- [Method Overloading](#method-overloading)\n- [Exceptions](#exceptions)\n- [WSDL Styles](#wsdl-styles)\n\n## Java-first\nSimple bottom-up JAX-WS example. The Web service returns German chancellors that reigned in a given period of time.\n\n### Minimal\nMinimal example for exposing a Web service with JAX-WS annotations.\nThe project can be run as a standalone service via `gradlew java-first:minimal:run`.\nThe Web service should be available at `http://localhost:8080/minimal/HistoryService`.\n\n### Custom\nIn this example more annotations are used to override default conventions of JAX-WS, e.g. the naming of parameters or return types.\nThe project can be run as a standalone service via `gradlew java-first:custom:run`.\nThe Web service should be available at `http://localhost:8080/custom/HistoryService`.\n\n\n## Deployment-styles\nDemonstrates several JAX-WS deployments as a standalone application, on JSR 109-compatible application servers (e.g. Glassfish) and Tomcat.\n\n### Standalone\nThe standalone project uses `javax.xml.ws.Endpoint` to run a server instance. It is the simplest way to expose an experimental JAX-WS Web service.\nRun the project via `gradlew deployment-styles:standalone:run`.\nThe Web service should be available at `http://localhost:8080/standalone/GreetingsService`.\n\n### JSR 109\n**Notice**: The plugin used in this example only runs reliably with JDK 8. With a newer JDK, there might be problems.  \nTo deploy the sample to Glassfish run `gradle cargoRunLocal`.\nThe Web service should be available at `http://localhost:8080/jsr109/GreetingsService`.\nAs an alternative, you can setup a local Glassfish sever manually, and deploy the `war`-file there.\n\n### Tomcat\nTomcat needs additional deployment descriptors and the JAX-WS implementation in order to run JAX-WS Web services.\nBuild with `gradle war` and manually deploy to a Tomcat instance.\n\n\n## WS-client\nDemonstrates the usage of the *wsimport* tool to generate Web Services interfaces and clients using a top-down approach. First run the [*java-first:custom*](#java-first) project in order to be able to access the service with the wsimport client. Use `gradle run` to run the web services test client.\n\n### Dynamic WS Client\nDemonstrates the creation of a Web service client without additional code generation.\n\n### Wrapper-style vs. Plain-style\nSee [this blog](http://myarch.com/wrappernon-wrapper-web-service-styles-things-you-need-to-know/) for an explanation.\n\n\n## Type-mapping\nDemonstrates type mappings from Java to WSDL/XSD and vice versa.\n\n### Java2Wsdl\nThe project can be run as a standalone service via `gradlew type-mapping:java2wsdl:run`.\nThe mapped WSDL should be available at `http://localhost:8080/wsdl2java/Wsdl2JavaService?wsdl`.\n\n### Wsdl2Java\nThe Java artifacts can be generated via `gradle wsimport`.\n\n\n## Method-overloading\nDemonstrates the mapping of overloaded Java methods via custom mappings.\nThe project can be run as a standalone service via `gradlew method-overloading:run`.\nThe Web service should be available at `http://localhost:8080/method-overloading/VolumeService`.\n\n\n## Exceptions\nDemonstrates the mapping of standard Java exceptions and soap-style exceptions with JAX-WS. Each Exception type has a corresponding client project to demonstrate the WSDL mapping to Java stubs.\n\n### Java Exception \u0026 Java Exception client\nDemonstrates the problem of mapping a standard-like Java Exception to SOAP faults.\nIf the Exception does not follow this style, JAX-WS will generate a wrapper class and the Exception will be put in the FaultBean class.\nThe project can be run as a standalone service via `gradlew exceptions:java-exception:run`.\nThe Web service should be available at `http://localhost:8080/java-exception/FaultService`.\nThe Java artifacts can be generated via `gradle wsimport`.\n\n### Custom fault \u0026 Custom fault client\nDemonstrates a custom Java Exception implementation that maps the SOAP fault structure.\nThe project can be run as a standalone service via `gradlew exceptions:custom-fault:run`.\nThe Web service should be available at `http://localhost:8080/custom-fault/FaultService`.\nThe Java artifacts can be generated via `gradle wsimport`.\n\n### SOAP fault\nUses the `SOAPFaultException` implementation. More information about SOAP faults can be found [here](http://docs.oracle.com/cd/E19159-01/819-3669/bnbin/index.html).\n\n\n## Wsdl-styles\nDemonstrates the several WSDL styles rpc-encoded, rpc-literal, document-literal and document-literal wrapped.\nSee [this blog](http://www.ibm.com/developerworks/library/ws-whichwsdl/) for a detailed explanation.\n\n### Document-literal\nThe Web service should be available at `http://localhost:8080/document-literal/GreetingsService`.\n\n### Document-literal-wrapped\nThe Web service should be available at `http://localhost:8080/document-literal-wrapped/GreetingsService`.\n\n### Rpc-encoded\nNo longer supported by JAX-WS 2.\n\n### Rpc-literal\nThe Web service should be available at `http://localhost:8080/rpc-literal/GreetingsService`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefan-kolb%2Fjaxws-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefan-kolb%2Fjaxws-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefan-kolb%2Fjaxws-samples/lists"}