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.