Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 

Was recently working on a project and was surprised ( :razz: 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 ... :smile:

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