{"id":22772351,"url":"https://github.com/pactflow/example-provider-java-soap","last_synced_at":"2025-04-13T07:36:06.385Z","repository":{"id":42519934,"uuid":"285277439","full_name":"pactflow/example-provider-java-soap","owner":"pactflow","description":"Example Java SOAP/XML Provider","archived":false,"fork":false,"pushed_at":"2024-10-07T16:28:55.000Z","size":151,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-11T17:08:13.419Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/pactflow.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":"2020-08-05T12:10:41.000Z","updated_at":"2024-10-07T16:28:59.000Z","dependencies_parsed_at":"2023-02-13T01:45:23.956Z","dependency_job_id":null,"html_url":"https://github.com/pactflow/example-provider-java-soap","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/pactflow%2Fexample-provider-java-soap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-provider-java-soap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-provider-java-soap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-provider-java-soap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pactflow","download_url":"https://codeload.github.com/pactflow/example-provider-java-soap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237311361,"owners_count":19289257,"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":[],"created_at":"2024-12-11T17:08:12.864Z","updated_at":"2025-02-05T14:17:17.481Z","avatar_url":"https://github.com/pactflow.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example Java XML Provider\n\n![Build](https://github.com/pactflow/example-provider-java-soap/workflows/Build/badge.svg)\n\n![Can I deploy Status](https://testdemo.pactflow.io/pacticipants/pactflow-example-provider-java-soap/branches/master/latest-version/can-i-deploy/to-environment/production/badge)\n\n![Pact Status](https://testdemo.pactflow.io/pacts/provider/pactflow-example-provider-java-soap/consumer/pactflow-example-consumer-java-soap/latest/badge) (latest pact)\n\n![Pact Status](https://testdemo.pactflow.io/pacts/provider/pactflow-example-provider-java-soap/consumer/pactflow-example-consumer-java-soap/latest/master/badge) (master/master pact)\n\n\nThis is an example of a Java XML provider that uses Pact, [PactFlow](https://pactflow.io) and GitHub Actions to ensure that it is compatible with the expectations its consumers have of it.\n\nThe project uses a Makefile to simulate a very simple build pipeline with two stages - test and deploy.\n\n## Pact verifications\n\nWhen using Pact in a CI/CD pipeline, there are two reasons for a pact verification task to take place:\n\n   * When the provider changes (to make sure it does not break any existing consumer expectations)\n   * When a pact changes (to see if the provider is compatible with the new expectations)\n\nWhen the provider changes, the pact verification task runs as part the provider's normal build pipeline, generally after the unit tests, and before any deployment takes place. This pact verification task is configured to dynamically fetch all the relevant pacts for the specified provider from PactFlow, verify them, and publish the results back to PactFlow.\n\nTo ensure that a verification is also run whenever a pact changes, we create a webhook in PactFlow that triggers a provider build, and passes in the URL of the changed pact. Ideally, this would be a completely separate build from your normal provider pipeline, and it should just verify the changed pact.\n\nBecause GitHub Actions only allows us to have one build configuration per repository, we switch between the main pipeline mode and the webhook-triggered mode based on the presence of an environment variable that is only set via the webhook. Keep in mind that this is just a constraint of the tools we're using for this example, and is not necessarily the way you would implement Pact your own pipeline.\n\n## Usage\n\nYou will need PactFlow credentials to run the examples and have them exported into your environment.\n\n```\nexport PACT_BROKER_TOKEN=\u003cyour token\u003e\nexport PACT_BROKER_BASE_URL=https://dius.pactflow.io\nexport PACT_BROKER_HOST=dius.pactflow.io\n\nmake test # runs the local tests\nmake fake_ci # pretends to show what you would do in a CI/CD through GitHub Actions\n```\n\nSee the [PactFlow CI/CD Workshop](https://github.com/pactflow/ci-cd-workshop) for further details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpactflow%2Fexample-provider-java-soap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpactflow%2Fexample-provider-java-soap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpactflow%2Fexample-provider-java-soap/lists"}