AnsweredAssumed Answered

XOG in quotes

Question asked by Endyno on Jul 18, 2013
Latest reply on Jul 19, 2013 by Endyno
Hello all,

I have a gel script/custom process which send information about project by SOAP message to anothoer system.
<gel:script xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:core="jelly:core"
    xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
    xmlns:new="http://AFPOC1/Process.tws"
    xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"
    xmlns:sql="jelly:sql" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <gel:parameter var="ClarityServerUrl"/>
.
.
.
<sql:query dataSource="${dataSource}" escapeText="False" var="request_data"><![CDATA[
    SELECT
        inv.code ID
      , inv.name projectName
.
.
.
</sql:query>
    <core:forEach items="${request_data.rowsByIndex}" trim="false" var="row">
        <core:set value="${row[0]}" var="id"/>
        <core:set value="${row[1]}" var="projectName"/>
.
.
.
<soap:invoke
            endpoint="http://......../webservices/AFPOC1/Process.tws"
            soapAction="http://AFPOC1/Process.tws/startProcess" var="request">    
            <soap:message>
                <soapenv:Envelope
                    xmlns:new="http://AFPOC1/Process.tws" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
                    <soapenv:Header/>
                    <soapenv:Body>
                        <new:startProcess>
                            <new:clarityData>
                                <new:id>${id}</new:id>
                                <new:projectName>${projectName}</new:projectName>
                        </new:clarityData>
                        </new:startProcess>
                    </soapenv:Body>
                </soapenv:Envelope>
            </soap:message>
        </soap:invoke>
       
        <gel:parse var="soapMessage">
            <soapMessage>
                <soapenvEnvelope
                    xmlns:new="http://AFPOC1/Process.tws" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">   
                    <soapenvHeader/>
                    <soapenvBody>
                        <new:startProcess>
                            <new:clarityData>
                                <new:id>${id}</new:id>
                                <new:projectName>${projectName}</new:projectName>
                            </new:clarityData>
                        </new:startProcess>
                    </soapenvBody>
                </soapenvEnvelope>
            </soapMessage>
        </gel:parse>
       
        <gel:log>
            <gel:expr select="$soapMessage"/>
        </gel:log>
       
        <gel:log>
            <gel:expr select="$request"/>
        </gel:log>
    </core:forEach>
   
</gel:script>
If in name of project there are Quotes this file is sent using this process to another system without any problem. But when data are sent back to clarity, there is an error in XOGing-in as name of project contains quotes. This caused failing.

If project name contains Ampersad it is transformed in the proces to
&amp;
and when it is sent back from another system to Clarity it works OK. I have just problem with quotes.

I tried to use replace statement in select:
rep lace(column_name,' " ','&'||'quot;')
Let say name of project is:
This is " Project " name.
Result in database is
This is &quot; Project &quot ; name 
But after process run it replace Ampersand, so result is
This is &amp;quot ; Project &amp;quot; name
and this is not the correct name.

Does any know hove to solve issue with XOGing-in quotes.

Thanks

Outcomes