Was recently working on a project and was surprised ( 😛 did not read fine print in the documentation) late in the project that namespace of XML document in the contract (WSDL) changes when you move from Dev – QA -Prod .
Ammm ! The challenge I had was, the WSDL (bottom up design approach) was used to generate JAXB code for Java Mapping…. 😕 so I was tightly coupled to contract . (too much effort to maintain code per landscape)….
Possible Options :
1. Re Import the WSDL from third party system (QA, Prod..), update reference to Service Interface and mappings …( Effort , Against the Governance , Will not work for my scenario , Additional effort of managing Java Mapping code base per landscape….)
2. Change the namespace at Runtime in Adapter Module … 🙂
option 2 looks good for my problem, resulted in me building this custom adapter module….. it is generic and can be used for any Interface…, configurable component.. can transport your ESR objects … and use adapter module to change the namespace….
* is it good practice ? .. sure it falls under message transformation….. 😏
Attached is adapter module java class ( saved in txt..)… that you can copy paste in adapter module project…..
Adapter Project/Code is dependent on open source jar file JLIBS
Require following jar file and can be downloaded from below link
Jar Files: jlibs-core.jar,jlibs-xml.jar, and jlibs-xmldog.jar
In addition to above, you require standard PI jar files for adapter module development. (Follow below link for adapter module development)
Attached is adapter module configuration steps ..(communication channel)
Adapter module configuration sample