Automated deployment of custom web service fails in service management with WSDL endpoint mismatch

Our automated deployment pipeline for custom web services in service management is failing during WSDL endpoint registration. The service deploys successfully to the application server, but integration tests fail because the WSDL endpoint URL doesn’t match the expected production endpoint.

Deployment log shows:

<wsdl:service name="CustomServiceMgmt">
  <wsdl:port binding="tns:ServiceMgmtSOAP" name="ServiceMgmtPort">
    <soap:address location="http://dev-server:7001/agile/services/CustomServiceMgmt"/>

Expected production endpoint: https://prod-agile.company.com/agile/services/CustomServiceMgmt

The WSDL is being generated with the dev server URL hardcoded, even though our Jenkins pipeline sets environment-specific properties. How do you handle WSDL endpoint registration in automated deployments across multiple environments? We need the CI/CD pipeline to dynamically configure endpoints based on target environment without manual WSDL editing.

I recommend implementing a post-deployment verification step that validates the registered endpoint matches expectations. Our pipeline uses a simple curl test that hits the WSDL URL and parses the soap:address location attribute to verify it matches the environment-specific expected value. If validation fails, the deployment is automatically rolled back. This catches endpoint mismatches before they impact integration testing or production traffic.

The WSDL endpoint mismatch occurs because you’re mixing build-time WSDL generation with deployment-time configuration. Here’s a comprehensive solution addressing all three focus areas:

1. Web Service Deployment Automation: Implement environment-aware WSDL processing in your deployment pipeline. Create a WSDL template with placeholders:

<soap:address location="${service.endpoint.url}"/>

Your Jenkins pipeline should use Ant’s ReplaceRegExp task:


// Pseudocode - WSDL endpoint configuration:
1. Load environment-specific properties file (e.g., prod.properties)
2. Read service.endpoint.url property value
3. Parse WSDL template and replace ${service.endpoint.url} token
4. Deploy processed WSDL to Agile service registry
5. Validate deployed endpoint matches expected URL
// See Jenkins Pipeline Examples: Dynamic Configuration

2. WSDL Endpoint Registration: Agile 9.3.5 supports programmatic service registration through the ServiceAdmin API. Instead of relying on auto-generated WSDL, register services explicitly:

ServiceAdmin admin = ServiceFactory.getServiceAdmin(session);
ServiceDescriptor desc = new ServiceDescriptor();
desc.setEndpointURL(System.getProperty("agile.service.endpoint"));
admin.registerService(desc);

This approach allows your deployment script to pass environment-specific endpoint URLs as system properties, completely bypassing hardcoded WSDL values.

3. CI/CD Integration: Structure your pipeline with environment-specific stages:

  • Build Stage: Generate base WSDL with placeholders, package service WAR
  • Deploy Stage: Read target environment config, process WSDL template, deploy to Agile
  • Verify Stage: Query deployed service WSDL, validate endpoint URL, run integration tests
  • Rollback Stage: If verification fails, restore previous service version

Our implementation uses Jenkins shared libraries with environment-specific parameter files:


environments/
  dev.properties:    service.endpoint.url=http://dev-server:7001/agile/services
  prod.properties:   service.endpoint.url=https://prod-agile.company.com/agile/services

The pipeline automatically selects the correct properties file based on the deployment target parameter. We also implemented a WSDL validation utility that runs post-deployment:


// Pseudocode - WSDL endpoint validator:
1. Fetch deployed WSDL from Agile service endpoint
2. Parse XML and extract soap:address location attribute
3. Compare with expected URL from environment properties
4. If mismatch detected, fail deployment and trigger rollback
5. Log detailed comparison for troubleshooting

This solution reduced our web service deployment failures from 40% to less than 5%. The key insight is separating WSDL generation (build-time) from endpoint configuration (deployment-time). Integration tests now consistently pass because the deployed WSDL always reflects the actual runtime environment. The validation step catches configuration errors immediately, preventing incorrect endpoints from reaching production.

For your specific case, implement the WSDL template approach first - it’s the quickest fix. Then gradually migrate to programmatic service registration for more robust control over endpoint configuration.

Check if Agile’s service management configuration allows dynamic endpoint override. In 9.3.5, there’s a service registry configuration where you can specify endpoint URLs independently of the WSDL. This means your WSDL can have a placeholder URL, but the actual runtime endpoint is determined by service registry settings. We configure this through the Agile Admin console under Web Services settings.