Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Anonymous_User Absent Member.
Absent Member.
454 views

XSLT and emailing possibility


For creating unique accountnames (new), we are using a xslt stylesheet.

In case of a failure when generation the unique accountname, i'd like to
send a email.

Is this possible with XSLT code (instead of doing this by a
policy/DIRXML script)?

G. Schouten


--
gschouten32
------------------------------------------------------------------------
gschouten32's Profile: https://forums.netiq.com/member.php?userid=2546
View this thread: https://forums.netiq.com/showthread.php?t=47867

Labels (1)
0 Likes
11 Replies
jtl1 Absent Member.
Absent Member.

Re: XSLT and emailing possibility

I would add an operation property to the original event and use policy builder to send the email.

Best regards,
Tobias

On 2013-05-30 14:14, gschouten32 wrote:
>
> For creating unique accountnames (new), we are using a xslt stylesheet.
>
> In case of a failure when generation the unique accountname, i'd like to
> send a email.
>
> Is this possible with XSLT code (instead of doing this by a
> policy/DIRXML script)?
>
> G. Schouten
>
>


0 Likes
Knowledge Partner
Knowledge Partner

Re: XSLT and emailing possibility

gschouten32 wrote:

> Is this possible with XSLT code (instead of doing this by a
> policy/DIRXML script)?


I'd go with Tobias' recommendation, too, but if you really prefer XSLT, have a
look at
https://www.novell.com/documentation/developer/dirxml/dirxmlbk/ref/javadocs/com/novell/nds/dirxml/util/mail/package-summary.html
______________________________________________
https://www.is4it.de/identity-access-management
0 Likes
Knowledge Partner
Knowledge Partner

Re: XSLT and emailing possibility

On 5/30/2013 9:15 AM, Lothar Haeger wrote:
> gschouten32 wrote:
>
>> Is this possible with XSLT code (instead of doing this by a
>> policy/DIRXML script)?

>
> I'd go with Tobias' recommendation, too, but if you really prefer XSLT, have a
> look at
> https://www.novell.com/documentation/developer/dirxml/dirxmlbk/ref/javadocs/com/novell/nds/dirxml/util/mail/package-summary.html


I like the add op-prop, and handle it in policy better after reading
that. 🙂

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: XSLT and emailing possibility


Thanks,

Actually I would achieve this by doing it into the XSLT.
I'm now playing with sendmail but getting the error:
<xsl:value-of>: expression evaluation error: function 'ncs:sendMail' not
found

I declared
xmlns:ncs="http://www.novell.com/nxsl/java/com.novell.ncs.dirxml.utilities.Utils"


What do I miss? Should I import a jar file


--
gschouten32
------------------------------------------------------------------------
gschouten32's Profile: https://forums.netiq.com/member.php?userid=2546
View this thread: https://forums.netiq.com/showthread.php?t=47867

0 Likes
Knowledge Partner
Knowledge Partner

Re: XSLT and emailing possibility

gschouten32 wrote:

>

xmlns:ncs="http://www.novell.com/nxsl/java/com.novell.ncs.dirxml.utilities.Utils"

java is case- and amount-sensitive, try

xmlns:ncs="http://www.novell.com/nxsl/java/com.novell.ncs.dirxml.utilities.util"
______________________________________________
https://www.is4it.de/identity-access-management
0 Likes
Knowledge Partner
Knowledge Partner

Re: XSLT and emailing possibility

Lothar Haeger wrote:

>

xmlns:ncs="http://www.novell.com/nxsl/java/com.novell.ncs.dirxml.utilities.util"

well, better use:

xmlns:ncs="http://www.novell.com/nxsl/java/com.novell.ncs.dirxml.utilities.util.
mail" and call the function with "ncs:SendMail"
______________________________________________
https://www.is4it.de/identity-access-management
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: XSLT and emailing possibility

On 5/31/13 10:51 AM, Lothar Haeger wrote:
> Lothar Haeger wrote:
>
>>

> xmlns:ncs="http://www.novell.com/nxsl/java/com.novell.ncs.dirxml.utilities.util"
>
> well, better use:
>
> xmlns:ncs="http://www.novell.com/nxsl/java/com.novell.ncs.dirxml.utilities.util.
> mail" and call the function with "ncs:SendMail"
>


ncs -> nds ?

--
Shon
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: XSLT and emailing possibility

On 5/31/13 11:12 AM, Shon Vella wrote:
> On 5/31/13 10:51 AM, Lothar Haeger wrote:
>> Lothar Haeger wrote:
>>
>>>

>> xmlns:ncs="http://www.novell.com/nxsl/java/com.novell.ncs.dirxml.utilities.util"
>>
>>
>> well, better use:
>>
>> xmlns:ncs="http://www.novell.com/nxsl/java/com.novell.ncs.dirxml.utilities.util.
>>
>> mail" and call the function with "ncs:SendMail"
>>

>
> ncs -> nds ?
>

Taking another look, the namespace you want is:

xmlns:SendMail="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.util.mail.SendMail"

and call:

SendMail:generateEMail(sGateway, sFrom, sReply, toAddrs, String
sSubject, sMessage, sUserID, sPassword, sEncoding, bHtml)

but the big gotcha is that toAddrs is an array of
com.novell.nds.dirxml.util.mail.SendMail.EmailAddress so you'll also
have to map that class to be able to create one or more of those, and
then there isn't a simple way to create an array other than using java
introspection which would cause you to have to map a bunch of other
classes and make a bunch of other calls. All in all, I think I'd
recommend calling the sendMail from the ecmascript versino of AJC instead.

http://www.novell.com/communities/files/lib-AJC.txt

--
Shon
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: XSLT and emailing possibility


Thanks for the all suggestions. Unfortunately it’s not working.
It looks like that the
http://www.novell.com/nxsl/java/com.novell.ncs.dirxml.utilities.util is
not working
I tried this with a new xslt policy and a simple function:
<xsl:value-of select="ncs:getTimeString()"/>

Still the error <xsl:value-of>: expression evaluation error: function
'ncs:getTimeString' not found


--
gschouten32
------------------------------------------------------------------------
gschouten32's Profile: https://forums.netiq.com/member.php?userid=2546
View this thread: https://forums.netiq.com/showthread.php?t=47867

0 Likes
Knowledge Partner
Knowledge Partner

Re: XSLT and emailing possibility

gschouten32 wrote:

> Still the error <xsl:value-of>: expression evaluation error: function
> 'ncs:getTimeString' not found


Re-read Shons post and correct the typo...
______________________________________________
https://www.is4it.de/identity-access-management
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: XSLT and emailing possibility


I followed Shons suggestions, and implemented an integrated ecma script
for the array. It working fine now.
Thanks for the support.


--
gschouten32
------------------------------------------------------------------------
gschouten32's Profile: https://forums.netiq.com/member.php?userid=2546
View this thread: https://forums.netiq.com/showthread.php?t=47867

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.