Supressing tags at webMethods

Hi,

We have a requirement to supress a xml tag while sending it to destination when we do not receive a feild from source.

Suppose a field SAPID is comming from source and it is to be mapped to SAPID at destination which resides int he parent sturcture.

Please find the destination structure below:

ns0:caseAccount</ns0:case>
678

Where AccountID is of type Dcoument Type, ns0:case is a constant value and SAPID is a field which has to be mapped from source SAPID.

If we do not receive any value from source for SAPID then the whole structure

ns0:caseAccount</ns0:case>
678

has to be stopped at webMethods before sending to destination.

PI/XI 7.1 release offers XML validation and removing empty XML tags. Before that for graphicall mappings - How about wM? Do we have standard or custom functionality?

Thanks

Can you expand a bit on how you are mapping these values and generating your xml document? Is this a substructure within a larger xml document?

Short answer is this can be done pretty easily but need to know more about how you are doing what you are doing. BTW, my two cents is that the receiving application should handle this correctly but I realize that you might not have any control on this.

Can you expand a bit on how you are mapping these values and generating your xml document?

we are doing graphical mapping(mapping the values from source document type to target document type) to map these values and generating our xml document.

Is this a substructure within a larger xml document?

yes, its in the substurcture within a larger xml document.

Short answer is this can be done pretty easily but need to know more about how you are doing what you are doing. BTW, my two cents is that the receiving application should handle this correctly but I realize that you might not have any control on this.

yes, we do not have any control on the receiving application.

branch on SAPID
if null, drop the AccountID element from the document

u can use xslt which will remove all the null tags and will return the same xml but without null tags :slight_smile: