Service Interface XML Namespace Swap
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
Downloads – jlibs – Common Utilities for Java – Google Project Hosting
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
Hi Gov,
Thanks for sharing this.
We also had faced the same issue when we were integrating Ariba Upstream Solution using SAP PI. At that time, I had used the approach 1 which is obviously is NOT preferable but was quick.
We had recognized the issue later as Dev and QA PI was integrated with Same Ariba Realm(As Ariba have only two tier landscape) so none of the Testing phase has highlighted this issue. Therefore, we had not recognized it until Cutover.
I like your approach of changing(according to respective Ariba Realm) the namespace just before posting the request to Ariba.
I wish if you would have posted this earlier then we could have adopted this approach 🙂 .
Anyways, it will definitely help people for their future such integrations.
Good work 🙂
Regards,
Sami.
Hi Gov,
We're facing this exact same scenario with Ariba now, can you please re-attach the text file?
Regards,
Dennis