Hi All,

I'm trying to integrate with an inhouse developed application. The
password that need to be synchronized should be encrypted with MS SQL
pwdencrypt function, but I'm always getting missing end-tag error. My
XML looks fine. Here is the policy file that I have.

<actions>
<do-set-local-variable name="sql-statement" scope="policy">
<arg-string>
<token-text xml:space="preserve">select
pwdencrypt('hello')</token-text>
</arg-string>
</do-set-local-variable>
<do-trace-message color="green" disabled="true" level="3">
<arg-string>
<token-local-variable name="sql-statement"/>
</arg-string>
</do-trace-message>
<do-set-local-variable name="query" scope="policy">
<arg-node-set>
<token-xml-parse>
<token-text xml:space="preserve">&lt;input
xmlns:jdbc='urn:dirxml:jdbc'>&lt;jdbc:statement>&l t;jdbc:sql></token-text>
<token-xml-serialize>
<token-local-variable name="sql-statement"/>
<token-text
xml:space="preserve">&lt;/jdbc:sql>&lt;/jdbc:statement>&lt;/input></token-text>
</token-xml-serialize>
</token-xml-parse>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="result" scope="policy">
<arg-node-set>
<token-xpath expression="query:query($destQueryProcessor, $query)"/>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="encrypted_pwd" scope="policy">
<arg-string>
<token-xpath
expression="$result//jdbc:result-set[1]/jdbc:row[1]/jdbc:column[1]/jdbc:value[1]"/>
</arg-string>
</do-set-local-variable>
<do-trace-message color="red" level="3">
<arg-string>
<token-text xml:space="preserve">Encrypted Password</token-text>
<token-local-variable name="encrypted_pwd"/>
</arg-string>
</do-trace-message>

The trace is:

09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Applying output
transformation policies.
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Applying policy: Output
Transformation.
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Applying to query #1.
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Evaluating selection
criteria for rule 'Encrypting the password using pwdencrypt();'.
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: (if-class-name equal
"dbo.DirectUserView") = TRUE.
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Rule selected.
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Applying rule
'Encrypting the password using pwdencrypt();'.
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Action:
do-set-local-variable("sql-statement",scope="policy","select
pwdencrypt('hello')").
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: arg-string("select
pwdencrypt('hello')")
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: token-text("select
pwdencrypt('hello')")
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Arg Value: "select
pwdencrypt('hello')".
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Action:
do-set-local-variable("query",scope="policy",arg-node-set(token-xml-parse("<input
xmlns:jdbc='urn:dirxml:jdbc'><jdbc:statement><jdbc :sql>"+token-xml-serialize(token-local-variable("sql-statement")+"</jdbc:sql></jdbc:statement></input>")))).
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST:
arg-node-set(token-xml-parse("<input
xmlns:jdbc='urn:dirxml:jdbc'><jdbc:statement><jdbc :sql>"+token-xml-serialize(token-local-variable("sql-statement")+"</jdbc:sql></jdbc:statement></input>")))
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: token-xml-parse("<input
xmlns:jdbc='urn:dirxml:jdbc'><jdbc:statement><jdbc :sql>"+token-xml-serialize(token-local-variable("sql-statement")+"</jdbc:sql></jdbc:statement></input>"))
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: token-xml-parse("<input
xmlns:jdbc='urn:dirxml:jdbc'><jdbc:statement><jdbc :sql>"+token-xml-serialize(token-local-variable("sql-statement")+"</jdbc:sql></jdbc:statement></input>"))
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: token-text("<input
xmlns:jdbc='urn:dirxml:jdbc'><jdbc:statement><jdbc :sql>")
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST:
token-xml-serialize(token-local-variable("sql-statement")+"</jdbc:sql></jdbc:statement></input>")
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST:
token-xml-serialize(token-local-variable("sql-statement")+"</jdbc:sql></jdbc:statement></input>")
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST:
token-local-variable("sql-statement")
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Token Value: "select
pwdencrypt('hello')".
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST:
token-text("</jdbc:sql></jdbc:statement></input>")
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Token Value:
"</jdbc:sql></jdbc:statement></input>".
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Arg Value: {"select
pwdencrypt(&apos;hello&apos","</jdbc:sql></jdbc:statement></..."}.
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Token Value: "select
pwdencrypt('hello')</jdbc:sql></jdbc:statement></input>".
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST: Arg Value: "<input
xmlns:jdbc='urn:dirxml:jdbc'><jdbc:statement><jdbc :sql>select
pwdencrypt('hello')</jdbc:sql></jdbc:statement></input>".
09:59:02 9A26DBA0 00000000 Drvrs: HROnline ST:
DirXML Log Event -------------------
Driver: \IDMDEMO\idmdemo\services\Production\HROnline
Channel: Subscriber
Object: \IDMDEMO\gasco\Users\Active\koko
Status: Warning
Message: Code(-8034) Error in
vnd.nds.stream://IDMDEMO/idmdemo/services/Production/HROnline/Output+Transformation#XmlData:22:
Couldn't get XML document 'token-xml-parse': '': (1): missing end-tag

Any idea?

Thanks in advance
tari


--
jabertarek
------------------------------------------------------------------------
jabertarek's Profile: http://forums.novell.com/member.php?userid=85025
View this thread: http://forums.novell.com/showthread.php?t=409881