cancel
Showing results for 
Search instead for 
Did you mean: 

Remove Empty XML Tags using module parameters

Former Member
0 Kudos

Hi All,

In my lanscape I have two PI Systems.

My scenario is an IDOC reaches 1st PI system gets converted into an EDIFACT and then goes to the 2nd PI and from there it gets routed to the respective AS2 Party.

I am using SOAP to pass message between the PI systems and B2B Toolkit's AS2 Adapter for the communication with AS2 party.

The issue is when the message is getting converted from IDOC to EDIFACT there are a few feilds with occurence 1..1 and due to these fields i get an empty XML tag at the output. These empty XML tags give me an error in the B2B Toolkit's AS2 Adapter Receiver Channel

I cannot change the occurence in the structure of the EDIFACT nor can I use an XSLT mapping to remove empty tags before the message reaches the Communication Channel.

I want to know if there are any module parameters which i can use either in SOAP Channel or the AS2 Channel to remove the XML Tags.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member220103
Active Participant
0 Kudos

Hi,

The target system expects that values, that is why the occurrence of the field is set to 1..1 (mandatory). If the system does not consider the fields as not mandatory means, you can change the occurrence in the DTD.

So best way to handle this case, change the schema. If you are trying to remove the empty XML values in the Adapter module, it will remove the empty XML tags. But the message will be failing when it tries to load the data in the receiver EDI system.

Thanks,

Kanda

Former Member
0 Kudos

Hi Kanda,

I cannot change the occurence as the XSD is a standard XSD provided by SAP.

"If you are trying to remove the empty XML values in the Adapter module, it will remove the empty XML tags"

I want to remove the tags itself.

Thanks,

Farhaan.

former_member220103
Active Participant
0 Kudos

Hi Farhan,

In that case, you can refer this link

http://stackoverflow.com/questions/12524727/remove-empty-nodes-from-a-xml-recursively

Thanks,

Kanda

former_member191435
Contributor
0 Kudos

Hi Abdul,

try to use mapwid default function for those 1.1 fields.... In edifact it accepts blank fields also.

Thanks,

Sreenivas

Muniyappan
Active Contributor
0 Kudos

Hi,

1..1 means, you must send some values for that fields. try to find out why these are not getting any values.

if you want to stop sending(the fields which are not needed in target) you can you can disable the fields in the message mapping.

Regards,

Muni.

Former Member
0 Kudos

Hi Muni,

"1..1 means, you must send some values for that fields. try to find out why these are not getting any values."

This empty tag is expected. Before using B2B Toolkit's AS2 Adapter we used to use Seeburger's AS2 Adpater and the message used to get executed successfully with these empty tags.The issue is coming only when we are using B2B Toolkit's AS2 Adapter.

"if you want to stop sending(the fields which are not needed in target) you can you can disable the fields in the message mapping."

I cannot disable the feild in the mapping as some other message may use this field.

Thanks,

Farhaan