2 Replies Latest reply: Feb 28, 2013 4:11 AM by fSobreiro RSS

    OSB XSLT expression from database column

    fSobreiro
      Hi

      I have a database table with one column reserved for xslt templates. I need to execute this expression in one OSB proxy Service. Any sugestion?

      I've tried this:

      In my OSB proxy service I can obtain the column template content using a service callout to a business service (database adapter) and for example replace de body with the database response using a xquery transformation.
      At this point I have the process body this information:

      <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <EaiEventDefinitionCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
      <EaiEventDefinition>
      <errorCode>-700</errorCode>
      <domain>a</domain>
      <service>b</service>
      <serviceVersion>1</serviceVersion>
      <target>c</target>
      <event>sendEmail</event>
      <eventVersion>1</eventVersion>
      <active>Y</active>
      <template><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
           <!-- Created by abc -->
      <xsl:template match="//Client">
      <test><xsl:value-of select="test"/></test>
      </xsl:template>
      </xsl:stylesheet>
      </template>
      <destination xsi:nil="true"/>
      </EaiEventDefinition>
      </EaiEventDefinitionCollection>
      </soapenv:Body>

      I need to execute the xslt template in osb proxy service, the problem is that when I put in the assign expression
      $body/EaiEvetDefinitionCollection/EaiEventDefinition/template
      or
      $body/EaiEvetDefinitionCollection/EaiEventDefinition/template/text()

      the assign recognize the expression in the template column of the database as a string instead of a xslt expression.

      Is it possible to force him execute it as a xslt expression?
      Is there any function for that?
      Or any workaround?

      Thanks in advace.