REDUCE SOA DEPLOYMENT DEPENDENCIES
Are SOA deployment dependencies causing unnecessary coordination and headaches? Let’s reduce those dependencies through the use of abstract WSDLs and Metadata Services (MDS). Utilizing abstract WSDLs and MDS will provide compile time isolation from other services that may or may not be deployed. Without using abstract WSDLs and MDS, a called service must be deployed prior to the calling process or there will be build/deploy errors. Another reason we need to utilize abstract WSDLs is server recycles. The order that composites startup is a bit random and if all of the dependencies aren’t started first, the composite will fail to start and can’t be restarted.
An abstract WSDL is a standard WSDL that doesn’t contain the endpoint implementation details. The abstract WSDL for a SOA process can be found in the base composite directory.
The deployment dependency that I will cover is that a CallerProcess service invokes the CalledProcess service. However, the CalledProcess service is deployed by another team and I don’t want to be dependent on when that team deploys.
The first step in reducing the deployment dependencies is to get the abstract wsdl deployed to MDS. In this example, we will deploy the CalledProcess.wsdl file to MDS at the path of /apps/abstract/CalledProcess.wsdl.
The abstract WSDL looks like (note there is no binding):
Now that we have the abstract WSDL deployed, we need to adjust the CallerProcess to utilize the abstract WSDL in MDS. The first file that needs to be adjusted is the composite.xml. There are two lines that require adjustment, the location attribute on the import line for the CalledProcess and the ui:wsdlLocation attribute in the reference for the invocation of CalledProcess. The ui:wsdlLocation attribute is utilized during compile and deploy time and since there are no implementation details, the final endpoint isn’t validated. The location attribute under the binding.ws tags are utilized during runtime.
Now we need to adjust ui:wsdlLocation attribute in the reference section in the CallingProcess.componentType file to also reference the abstract WSDL.
At this point, the CallingProcess service can be deployed with or without the CalledProcess service being deployed. The current SOA partition contains no composites.
After deployment of CallingProcess, the SOA partition shows that the process was deployed without the CalledProcess being deployed.