Tokenizing WSDL imports while deploying to mutliple environments
Your BPEL Process might have one or more WSDLs that import another WSDL or an XSD from the server. This might result in hardcoded URLs in your WSDL - for instance
<definitions ....>
<import namespace="http://www.oracle.com/po" location="http://localhost:7779/schemas/xml/createpo.wsdl"/>
. ....
</definitions>
When you are deploying to multiple environments, you might want to change the host and port for the URL that points to this WSDL, so that it points to the current server, or whatever you wish to use.
There is useful task named <customizeWSDL> that allows you to do this.
For this, follow the same instructions I had mentioned in the earlier blog entry for deployment to multiple environments,but with the following difference.
Instead of the <customize> task, use the <customizeWSDL> task
For e.g.
<bpelc>
. . . . .
<customizeWSDL inFile="${process.dir}/bpel/PurchaseOrder.wsdl" outFile="${process.dir}/bpel/PurchaseOrder.wsdl">
<wsdlImport namespace="http://www.oracle.com/po" locationURI="http://${deploy_host}:${deploy_port}/schemas/xml/createpo.wsdl"/>
</customizeWSDL>
</bpelc>