Web Servis Mesajında Boş Tag'leri Silme



Web Servis Mesajında Boş Tagleri Silme

Merhaba, outbound web servisler ile ulaştığınız dış sistemlere iletilen boş tag'ler çoğu zaman sorun çıkarmasa da bazen boş tag'leri iletmemeniz gerekir. 

Bunun için çeşitli geçici çözümler olsa da nihai çözüm aşağıdaki gibidir.

Bütün servislerde kullanabilmesi için generic bir workflow tasalaryacağız.

Bunu yaparken XSLT kullanacağız 




Step1: To XML

Business Service Name: EAI XML Converter

Business Service Method : IntObjHierToXMLDoc

Input Argument


Output Argument



Step2: Set XSLT

Business Service Name: Workflow Utilities

Business Service Method : Echo


Output Argument


XSLTEnd :

</xsl:variable><xsl:template match="/"><xsl:apply-templates select="*"><xsl:with-param name="TagNames" select="$TagNames"/></xsl:apply-templates></xsl:template><xsl:template match="*"><xsl:param name="TagNames"/><xsl:if test=". != '' or contains($TagNames,name())"><xsl:copy><xsl:copy-of select="@*"/><xsl:apply-templates><xsl:with-param name="TagNames" select="$TagNames"/></xsl:apply-templates></xsl:copy></xsl:if></xsl:template></xsl:stylesheet>


XSLTBegin:

<?xml version="1.0" encoding="UTF-16"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"><xsl:output method="xml"/><xsl:variable name="TagNames">


Step3: Set Replace

Business Service Name: Workflow Utilities

Business Service Method : Echo


XSLT:

[&XSLTBegin] + [&TagNames] + [&XSLTEnd]

Step4: Transform

Business Service Name: EAI XSLT Service

Business Service Method : Transform

Input Argument



Output Argument



Step4: To IO

Business Service Name: EAI XML Converter

Business Service Method : XMLDocToIntObjHier


Input Argument



Output Argument



Boş tag'ler mesaj içerisinden kaldırıldı. WF'un output'undan "SiebelMessage" ı alarak devam edebilirsiniz.

Yorumlar

Bu blogdaki popüler yayınlar

Siebel OpenUI Presentation Model ve Physical Renderer Yapısı

Long running query'ler için Query Plan fixleme

Profile Attribute Listesi