on 08-27-2012 5:50 PM
I have a file to SOAP scenario,
Currently I am sending XML to the target system as below.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:mensagemCliente xmlns:ns1="http://bancoconveniado/mensagemCliente">
- <cabecalho>
<dataHoraRequisicao>2012/08/27</dataHoraRequisicao>
</cabecalho>
</ns1:mensagemCliente>
What I need is to send xml to the target system as
<?xml version="1.0" encoding="UTF-8" ?>
- <itg:mensagemCliente xmlns:ns1="http://bancoconveniado/mensagemCliente">
- <cabecalho>
<dataHoraRequisicao>2012/08/27</dataHoraRequisicao>
</cabecalho>
</itg:mensagemCliente>
All I need to do is change the namespace prefix from ns1 to itg.
I have created a message type (mensagemCliente) using the sample xml provide by partner. Partner do not have any wsdl/xsd to share so cannot create external definition.
I have referred to Stefan’s blog and used XMLAnonymizerbean in my received SOAP communication channel module configuration.
Below is my module configuration in receiver SOAP Channel.
But it seems to be not working, as still I am getting the xml with old namespace prefix (ns1).
Also encoding also remains same (UTF-8). I tried to use XMLAnonymizerbean after default module XISOAPAdapterBean as well. But it didn’t work either way.
Is there anything I need to prior to using modules? Or SOAP received does not support XMLAnonymizerbean?
Or any other suggestion how this can be achieved?
Note: we are on PI 7.30
Hi,
Have a look at SAP Note 880173 - XI 3.0 Adapter Framework XML Anonymizer Module, especially Example 3, which covers exactly your requirement of changing namespace prefix and encoding.
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
the module should work.
If you struggle you can use a xsl as alternative.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="*">
<itg:mensagemCliente xmlns:itg="http://bancoconveniado/mensagemCliente">
<cabecalho>
<dataHoraRequisicao>
<xsl:value-of select="//dataHoraRequisicao"/>
</dataHoraRequisicao>
</cabecalho>
</itg:mensagemCliente>
</xsl:template>
</xsl:stylesheet>
Your example has actually a little mistake, the namespace definition should look like:
xmlns:itg="http://bancoconveniado/mensagemCliente"
Regards,
Udo
Can anyone help with why Adapter Framework XML Anonymizer Module is not working on PI 7.3 ?
Audit log in Channel have entry saying Anonymized successfully.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.