cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting Message Type from payload

Former Member
0 Kudos

Hi Experts,

I am coming across an issue while sending data to MQ through JMS Receiver Adapter.

I have to remove the Message Type node before sending it to MQ. I have used the below modules and respective module keys in the sequence.

AF_Modules/XMLAnonymizerBean - 0

SAP XI JMS Adapter/ConvertMessageToBinary - convert_XI2Bin

SAP XI JMS Adapter/SendBinarytoXIJMSService - exit

Parameter name and module key valule used in Module Configuration.

anonymizer.acceptNamespaces - 0

By this setting I am able to remove the namespace from the payload.But still Message Type tag is going . I want to eliminate that even from the payload.

Payload being generated..

<?xml version="1.0" encoding="UTF-8"?>

<ns0:Message Type xmlns:ns0="namespace">

<Target>

<Ele1> .....</Ele1>

<DATA>

</ele2>

</ele3>

</DATA>

</Target>

</ns0:Message Type>

Now the data is being sent as the following.

<?xml version="1.0" encoding="UTF-8"?>

<Message Type>

<Target>

<Ele1> .....</Ele1>

<DATA>

</ele2>

</ele3>

</DATA>

</Target>

<Message Type>

I would like to delete <Message Type> tag even while sending it to receiving system.

Please help me out in resolving this issue.

Thanks,

Karuna.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hey

Please have a look at the following blog

I guess you should be able to remove it in IR itself.

Thanx

Aamir

Former Member
0 Kudos

Hi Aamir,

Thanks for the quick response.

My requirement is different.

I want to remove the message type tag even from the payload.

Right now this is the output am getting.

<?xml version="1.0" encoding="UTF-8"?>

<Message Type>

<Target>

<Ele1> .....</Ele1>

<DATA>

</ele2>

</ele3>

</DATA>

</Target>

<Message Type>

I would like to get the output as below

<?xml version="1.0" encoding="UTF-8"?>

<Target>

<Ele1> .....</Ele1>

<DATA>

</ele2>

</ele3>

</DATA>

</Target>

Thanks,

Karuna.

stefan_grube
Active Contributor
0 Kudos

You can achieve this only with mapping. The XMLAnonymizerBean does not help for your request.

Regards

Stefan

former_member187563
Contributor
0 Kudos

hi,

you can use java maping or xslt mapping for that.

for further reference you can use this:

https://www.sdn.sap.com/irj/sdn/forums

regards,

ujjwal kumar

Former Member
0 Kudos

Hi,

Create Target message type and name it <Target> instead of <Message Type>.

In the target message type remove the namespace name.

Redo the mapping .

Save & Activate everything.

This will make to avoid the Message type to be send to receiver system.

Thanks

Swarup

Former Member
0 Kudos

Hi Swarup,

I just wanted to know whether we can achieve this without recreating the messsage type.

Thanks,

Karuna.