Convert Unicode string to Readable String

Novell Identity Manager 3.5.1
RedHat Linux enterprise edition.
SOAP IDM driver..

When I query on an attribute "firstName" from IDM,  the application
returns  value on that atrribute as the  "English\u00c6".  It looks like
the string comes as a Unicode string..  

I need help to reformat that value so that it can be readable for my
rules in my driver..

Any help guys?

Regards,
M.


-- 
love anything that talks binary!
------------------------------------------------------------------------



0
belaie
5/21/2010 8:26:01 AM
novell.id-manager.drivers 10360 articles. 2 followers. Follow

7 Replies
1372 Views

Similar Articles

[PageSpeed] 12

On Fri, 21 May 2010 08:26:01 +0000, belaie wrote:

> Novell Identity Manager 3.5.1
> RedHat Linux enterprise edition.
> SOAP IDM driver..
> 
> When I query on an attribute "firstName" from IDM,  the application
> returns  value on that atrribute as the  "English\u00c6".  It looks like
> the string comes as a Unicode string..

Query to where? To eDir or to the SOAP application?


> I need help to reformat that value so that it can be readable for my
> rules in my driver..

If it's to the SOAP application, show us the return document (or a 
doctored up version of it if the data in it is confidential).


-- 
---------------------------------------------------------------------------
 David Gersic                                            dgersic_@_niu.edu
 Novell Knowledge Partner                         http://forums.novell.com

 Please post questions in the newsgroups.   No support provided via email.

0
David
5/22/2010 1:59:50 AM
dgersic;1978218 Wrote: 
> On Fri, 21 May 2010 08:26:01 +0000, belaie wrote:
> 
> > Novell Identity Manager 3.5.1
> > RedHat Linux enterprise edition.
> > SOAP IDM driver..
> >
> Hello
> 
> Its the Query to the application, yes,
> 
> 
> the soap driver which i'm using is self-developed, which targets not a
> SOAP endpoint but  a REST resource uri.
> 
> the output is the XDS instance document which each attribute and its
> values.
> 
> if the some users have non-english names, the endpoint returns the
> results on  their name attributes as the  javascript escape sequence
> encoded strings,  so the question was how to decode these escape
> sequence encoded strings with the values which are more readable.
> 
> 
> currently, i did a  reformat-operation-attribute with replaceAll token
> hard codded each escape sequence.
> 
> but i wanted a more good solution to this problem..
> 
> do you still need  to see the ouput document ?
> 
> 
> Regards,
> M.
> > When I query on an attribute "firstName" from IDM,  the application
> > returns  value on that atrribute as the  "English\u00c6".  It looks
> like
> > the string comes as a Unicode string..
> 
> Query to where? To eDir or to the SOAP application?
> 
> 
> > I need help to reformat that value so that it can be readable for my
> > rules in my driver..
> 
> If it's to the SOAP application, show us the return document (or a
> doctored up version of it if the data in it is confidential).
> 
> 
> --
> ---------------------------------------------------------------------------
> David Gersic                                           
> dgersic_@_niu.edu
> Novell Knowledge Partner                        
> http://forums.novell.com
> 
> Please post questions in the newsgroups.   No support provided via
> email.


-- 
love anything that talks binary!
------------------------------------------------------------------------
belaie's Profile: http://forums.novell.com/member.php?userid=4368
View this thread: http://forums.novell.com/showthread.php?t=411184

0
belaie
5/22/2010 11:16:01 AM
Hello

Its the Query to the application, yes,


the soap driver which i'm using is self-developed, which targets not a
SOAP endpoint but a REST resource uri.

the output is the XDS instance document which each attribute and its
values.

if the some users have non-english names, the endpoint returns the
results on their name attributes as the javascript escape sequence
encoded strings, so the question was how to decode these escape sequence
encoded strings with the values which are more readable.


currently, i did a reformat-operation-attribute with replaceAll token
hard codded each escape sequence.

but i wanted a more good solution to this problem..

do you still need to see the ouput document ?


Regards,
M.


-- 
love anything that talks binary!
------------------------------------------------------------------------
belaie's Profile: http://forums.novell.com/member.php?userid=4368
View this thread: http://forums.novell.com/showthread.php?t=411184

0
belaie
5/22/2010 11:36:06 AM
It's hard to suggest a solution without knowing more about exactly what 
sorts of things to expect in the string. Assuming that the encoding of 
strings is in full compliance with javascript or javascript strings you 
could use one of the unescape methods from Apache Commons Lang as an 
extension function or use the source code as an example for creating 
your own method. It's also possible that you could use javascript eval() 
function, but that's a little scary because it could open you up to 
injection attacks.

http://commons.apache.org/lang/

http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringEscapeUtils.html#unescapeJavaScript(java.lang.String)



Shon Vella
Developer
iDENTiTYAUTOMATiON
www.identityautomation.com

On 5/22/10 5:16 AM, belaie wrote:
>
> dgersic;1978218 Wrote:
>> On Fri, 21 May 2010 08:26:01 +0000, belaie wrote:
>>
>>> Novell Identity Manager 3.5.1
>>> RedHat Linux enterprise edition.
>>> SOAP IDM driver..
>>>
>> Hello
>>
>> Its the Query to the application, yes,
>>
>>
>> the soap driver which i'm using is self-developed, which targets not a
>> SOAP endpoint but  a REST resource uri.
>>
>> the output is the XDS instance document which each attribute and its
>> values.
>>
>> if the some users have non-english names, the endpoint returns the
>> results on  their name attributes as the  javascript escape sequence
>> encoded strings,  so the question was how to decode these escape
>> sequence encoded strings with the values which are more readable.
>>
>>
>> currently, i did a  reformat-operation-attribute with replaceAll token
>> hard codded each escape sequence.
>>
>> but i wanted a more good solution to this problem..
>>
>> do you still need  to see the ouput document ?
>>
>>
>> Regards,
>> M.
>>> When I query on an attribute "firstName" from IDM,  the application
>>> returns  value on that atrribute as the  "English\u00c6".  It looks
>> like
>>> the string comes as a Unicode string..
>>
>> Query to where? To eDir or to the SOAP application?
>>
>>
>>> I need help to reformat that value so that it can be readable for my
>>> rules in my driver..
>>
>> If it's to the SOAP application, show us the return document (or a
>> doctored up version of it if the data in it is confidential).
>>
>>
>> --
>> ---------------------------------------------------------------------------
>> David Gersic
>> dgersic_@_niu.edu
>> Novell Knowledge Partner
>> http://forums.novell.com
>>
>> Please post questions in the newsgroups.   No support provided via
>> email.
>
>
0
Shon
5/22/2010 11:36:10 AM
Hello

Well this is query output xds document that I get from the
application;


<nds dtdversion="3.0">
<source>
<product build="20070620_0505" instance="DEV"
version="3.5.2">MY_DRIVER_</product>
<contact>My_COMPANY</contact>
</source>
<output>
<instance class-name="APP_USER" event-id="0">
<association>SOME_GUID_ID</association>
* <attr attr-name="firstname">
<value
type="string">\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6</value>
</attr>*
</instance>
<status event-id="0" level="success" type="driver-general"/>
</output>
</nds>

Well I tried to perform eval(), but it didn't work from with policy
builder, but works from the ECMAScript UI from Designer. Here is the
trace;

My Eval function;
function MyEval(AttributeValue){
	//Beware of injection scriptattacks..
	var attributeValue = eval("(AttributeValue)");
	return attributeValue;
}



TRACE:================

361]:DEV ST:    Evaluating selection criteria for rule 'Reformat
firstname attribute'.
361]:DEV ST:      (if-op-attr 'firstname' available) = TRUE.
377]:DEV ST:      (if-op-attr 'firstname' match ".+") = TRUE.
377]:DEV ST:    Rule selected.
377]:DEV ST:    Applying rule 'Reformat firstname attribute'.
377]:DEV ST:      Action:
do-set-local-variable("local.pub.itp.Firstname",scope="policy",token-op-attr("firstname")).
377]:DEV ST:        arg-string(token-op-attr("firstname"))
377]:DEV ST:          token-op-attr("firstname")
377]:DEV ST:            Token Value:
"\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6".
377]:DEV ST:          Arg Value:
"\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6".
377]:DEV ST:      Action:
do-reformat-op-attr("firstname",token-xpath("es:MyEval(string($local.pub.itp.Firstname))")).
377]:DEV ST:       
arg-string(token-xpath("es:UTF162UTF8(string($local.pub.itp.Firstname))"))
377]:DEV ST:         
token-xpath("es:UTF162UTF8(string($local.pub.itp.Firstname))")
377]:DEV ST:            Token Value:
"\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6".
377]:DEV ST:          Arg Value:
"\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6".
377]:DEV ST:    Evaluating selection criteria for rule 'Reformat
lastname attribute'.
377]:DEV ST:      (if-op-attr 'lastname' available) = FALSE.
377]:DEV ST:    Rule rejected.
377]:DEV ST:  Applying to status #2.
377]:DEV ST:    Evaluating selection criteria for rule 'Reformat
LoginDiabled Attribute'.
377]:DEV ST:      (if-op-attr 'state' available) = FALSE.
377]:DEV ST:    Rule rejected.
377]:DEV ST:    Evaluating selection criteria for rule 'Reformat
firstname attribute'.
377]:DEV ST:      (if-op-attr 'firstname' available) = FALSE.
377]:DEV ST:    Rule rejected.
377]:DEV ST:    Evaluating selection criteria for rule 'Reformat
lastname attribute'.
377]:DEV ST:      (if-op-attr 'lastname' available) = FALSE.
377]:DEV ST:    Rule rejected.
377]:DEV ST:Policy returned:
377]:DEV ST:
<nds dtdversion="3.0">
<source>
<product build="20070620_0505" instance="DEV"
version="3.5.2">MY_DRIVER_</product>
<contact>My_COMPANY</contact>
</source>
<output>
<instance class-name="APP_USER" event-id="0">
<association>SOME_GUID_ID</association>
<attr attr-name="firstname">
<value>\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6</value>
</attr>
</instance>
<status event-id="0" level="success" type="driver-general"/>
</output>
</nds>


=====================















svella;1978261 Wrote: 
> It's hard to suggest a solution without knowing more about exactly what
> sorts of things to expect in the string. Assuming that the encoding of
> strings is in full compliance with javascript or javascript strings
> you
> could use one of the unescape methods from Apache Commons Lang as an
> extension function or use the source code as an example for creating
> your own method. It's also possible that you could use javascript
> eval()
> function, but that's a little scary because it could open you up to
> injection attacks.
> 
> 'Lang - Home' (http://commons.apache.org/lang/)
> 
> 'StringEscapeUtils (Commons Lang 2.5 API)'
> (http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringEscapeUtils.html#unescapeJavaScript(java.lang.String))
> 
> 
> 
> Shon Vella
> Developer
> iDENTiTYAUTOMATiON
> 'Identity Automation' (http://www.identityautomation.com)
> 
> On 5/22/10 5:16 AM, belaie wrote:
> >
> > dgersic;1978218 Wrote:
> >> On Fri, 21 May 2010 08:26:01 +0000, belaie wrote:
> >>
> >>> Novell Identity Manager 3.5.1
> >>> RedHat Linux enterprise edition.
> >>> SOAP IDM driver..
> >>>
> >> Hello
> >>
> >> Its the Query to the application, yes,
> >>
> >>
> >> the soap driver which i'm using is self-developed, which targets not
> a
> >> SOAP endpoint but  a REST resource uri.
> >>
> >> the output is the XDS instance document which each attribute and
> its
> >> values.
> >>
> >> if the some users have non-english names, the endpoint returns the
> >> results on  their name attributes as the  javascript escape
> sequence
> >> encoded strings,  so the question was how to decode these escape
> >> sequence encoded strings with the values which are more readable.
> >>
> >>
> >> currently, i did a  reformat-operation-attribute with replaceAll
> token
> >> hard codded each escape sequence.
> >>
> >> but i wanted a more good solution to this problem..
> >>
> >> do you still need  to see the ouput document ?
> >>
> >>
> >> Regards,
> >> M.
> >>> When I query on an attribute "firstName" from IDM,  the
> application
> >>> returns  value on that atrribute as the  "English\u00c6".  It
> looks
> >> like
> >>> the string comes as a Unicode string..
> >>
> >> Query to where? To eDir or to the SOAP application?
> >>
> >>
> >>> I need help to reformat that value so that it can be readable for
> my
> >>> rules in my driver..
> >>
> >> If it's to the SOAP application, show us the return document (or a
> >> doctored up version of it if the data in it is confidential).
> >>
> >>
> >> --
> >>
> ---------------------------------------------------------------------------
> >> David Gersic
> >> dgersic_@_niu.edu
> >> Novell Knowledge Partner
> >> http://forums.novell.com
> >>
> >> Please post questions in the newsgroups.   No support provided via
> >> email.
> >
> >


-- 
love anything that talks binary!
------------------------------------------------------------------------
belaie's Profile: http://forums.novell.com/member.php?userid=4368
View this thread: http://forums.novell.com/showthread.php?t=411184

0
belaie
5/23/2010 8:46:01 AM
var attributeValue = eval('"' + AttributeValue + '"');

would have a much better chance of working.

Your trace also looks a little confused - showing call to es:MyEval in 
the one line and es:UTF162UTF8 on the subordinate line - either there 
are missing lines or you have edited it and missed something.

Shon Vella
Developer
iDENTiTYAUTOMATiON
www.identityautomation.com

On 5/23/10 2:46 AM, belaie wrote:
>
> Hello
>
> Well this is query output xds document that I get from the
> application;
>
>
> <nds dtdversion="3.0">
> <source>
> <product build="20070620_0505" instance="DEV"
> version="3.5.2">MY_DRIVER_</product>
> <contact>My_COMPANY</contact>
> </source>
> <output>
> <instance class-name="APP_USER" event-id="0">
> <association>SOME_GUID_ID</association>
> *<attr attr-name="firstname">
> <value
> type="string">\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6</value>
> </attr>*
> </instance>
> <status event-id="0" level="success" type="driver-general"/>
> </output>
> </nds>
>
> Well I tried to perform eval(), but it didn't work from with policy
> builder, but works from the ECMAScript UI from Designer. Here is the
> trace;
>
> My Eval function;
> function MyEval(AttributeValue){
> 	//Beware of injection scriptattacks..
> 	var attributeValue = eval("(AttributeValue)");
> 	return attributeValue;
> }
>
>
>
> TRACE:================
>
> 361]:DEV ST:    Evaluating selection criteria for rule 'Reformat
> firstname attribute'.
> 361]:DEV ST:      (if-op-attr 'firstname' available) = TRUE.
> 377]:DEV ST:      (if-op-attr 'firstname' match ".+") = TRUE.
> 377]:DEV ST:    Rule selected.
> 377]:DEV ST:    Applying rule 'Reformat firstname attribute'.
> 377]:DEV ST:      Action:
> do-set-local-variable("local.pub.itp.Firstname",scope="policy",token-op-attr("firstname")).
> 377]:DEV ST:        arg-string(token-op-attr("firstname"))
> 377]:DEV ST:          token-op-attr("firstname")
> 377]:DEV ST:            Token Value:
> "\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6".
> 377]:DEV ST:          Arg Value:
> "\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6".
> 377]:DEV ST:      Action:
> do-reformat-op-attr("firstname",token-xpath("es:MyEval(string($local.pub.itp.Firstname))")).
> 377]:DEV ST:
> arg-string(token-xpath("es:UTF162UTF8(string($local.pub.itp.Firstname))"))
> 377]:DEV ST:
> token-xpath("es:UTF162UTF8(string($local.pub.itp.Firstname))")
> 377]:DEV ST:            Token Value:
> "\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6".
> 377]:DEV ST:          Arg Value:
> "\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6".
> 377]:DEV ST:    Evaluating selection criteria for rule 'Reformat
> lastname attribute'.
> 377]:DEV ST:      (if-op-attr 'lastname' available) = FALSE.
> 377]:DEV ST:    Rule rejected.
> 377]:DEV ST:  Applying to status #2.
> 377]:DEV ST:    Evaluating selection criteria for rule 'Reformat
> LoginDiabled Attribute'.
> 377]:DEV ST:      (if-op-attr 'state' available) = FALSE.
> 377]:DEV ST:    Rule rejected.
> 377]:DEV ST:    Evaluating selection criteria for rule 'Reformat
> firstname attribute'.
> 377]:DEV ST:      (if-op-attr 'firstname' available) = FALSE.
> 377]:DEV ST:    Rule rejected.
> 377]:DEV ST:    Evaluating selection criteria for rule 'Reformat
> lastname attribute'.
> 377]:DEV ST:      (if-op-attr 'lastname' available) = FALSE.
> 377]:DEV ST:    Rule rejected.
> 377]:DEV ST:Policy returned:
> 377]:DEV ST:
> <nds dtdversion="3.0">
> <source>
> <product build="20070620_0505" instance="DEV"
> version="3.5.2">MY_DRIVER_</product>
> <contact>My_COMPANY</contact>
> </source>
> <output>
> <instance class-name="APP_USER" event-id="0">
> <association>SOME_GUID_ID</association>
> <attr attr-name="firstname">
> <value>\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6</value>
> </attr>
> </instance>
> <status event-id="0" level="success" type="driver-general"/>
> </output>
> </nds>
>
>
> =====================
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> svella;1978261 Wrote:
>> It's hard to suggest a solution without knowing more about exactly what
>> sorts of things to expect in the string. Assuming that the encoding of
>> strings is in full compliance with javascript or javascript strings
>> you
>> could use one of the unescape methods from Apache Commons Lang as an
>> extension function or use the source code as an example for creating
>> your own method. It's also possible that you could use javascript
>> eval()
>> function, but that's a little scary because it could open you up to
>> injection attacks.
>>
>> 'Lang - Home' (http://commons.apache.org/lang/)
>>
>> 'StringEscapeUtils (Commons Lang 2.5 API)'
>> (http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringEscapeUtils.html#unescapeJavaScript(java.lang.String))
>>
>>
>>
>> Shon Vella
>> Developer
>> iDENTiTYAUTOMATiON
>> 'Identity Automation' (http://www.identityautomation.com)
>>
>> On 5/22/10 5:16 AM, belaie wrote:
>>>
>>> dgersic;1978218 Wrote:
>>>> On Fri, 21 May 2010 08:26:01 +0000, belaie wrote:
>>>>
>>>>> Novell Identity Manager 3.5.1
>>>>> RedHat Linux enterprise edition.
>>>>> SOAP IDM driver..
>>>>>
>>>> Hello
>>>>
>>>> Its the Query to the application, yes,
>>>>
>>>>
>>>> the soap driver which i'm using is self-developed, which targets not
>> a
>>>> SOAP endpoint but  a REST resource uri.
>>>>
>>>> the output is the XDS instance document which each attribute and
>> its
>>>> values.
>>>>
>>>> if the some users have non-english names, the endpoint returns the
>>>> results on  their name attributes as the  javascript escape
>> sequence
>>>> encoded strings,  so the question was how to decode these escape
>>>> sequence encoded strings with the values which are more readable.
>>>>
>>>>
>>>> currently, i did a  reformat-operation-attribute with replaceAll
>> token
>>>> hard codded each escape sequence.
>>>>
>>>> but i wanted a more good solution to this problem..
>>>>
>>>> do you still need  to see the ouput document ?
>>>>
>>>>
>>>> Regards,
>>>> M.
>>>>> When I query on an attribute "firstName" from IDM,  the
>> application
>>>>> returns  value on that atrribute as the  "English\u00c6".  It
>> looks
>>>> like
>>>>> the string comes as a Unicode string..
>>>>
>>>> Query to where? To eDir or to the SOAP application?
>>>>
>>>>
>>>>> I need help to reformat that value so that it can be readable for
>> my
>>>>> rules in my driver..
>>>>
>>>> If it's to the SOAP application, show us the return document (or a
>>>> doctored up version of it if the data in it is confidential).
>>>>
>>>>
>>>> --
>>>>
>> ---------------------------------------------------------------------------
>>>> David Gersic
>>>> dgersic_@_niu.edu
>>>> Novell Knowledge Partner
>>>> http://forums.novell.com
>>>>
>>>> Please post questions in the newsgroups.   No support provided via
>>>> email.
>>>
>>>
>
>
0
Shon
5/23/2010 10:11:55 PM
Thank you very much for your help and guidance.  yes in the trace i
forgot to the remove my original function name as i just removed only
the first occurance of it, good observed :-)

M.

svella;1978396 Wrote: 
> var attributeValue = eval('"' + AttributeValue + '"');
> 
> would have a much better chance of working.
> 
> Your trace also looks a little confused - showing call to es:MyEval in
> the one line and es:UTF162UTF8 on the subordinate line - either there
> are missing lines or you have edited it and missed something.
> 
> Shon Vella
> Developer
> iDENTiTYAUTOMATiON
> 'Identity Automation' (http://www.identityautomation.com)
> 
> On 5/23/10 2:46 AM, belaie wrote:
> >
> > Hello
> >
> > Well this is query output xds document that I get from the
> > application;
> >
> >
> > <nds dtdversion="3.0">
> > <source>
> > <product build="20070620_0505" instance="DEV"
> > version="3.5.2">MY_DRIVER_</product>
> > <contact>My_COMPANY</contact>
> > </source>
> > <output>
> > <instance class-name="APP_USER" event-id="0">
> > <association>SOME_GUID_ID</association>
> > *<attr attr-name="firstname">
> > <value
> > type="string">\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6</value>
> > </attr>*
> > </instance>
> > <status event-id="0" level="success" type="driver-general"/>
> > </output>
> > </nds>
> >
> > Well I tried to perform eval(), but it didn't work from with policy
> > builder, but works from the ECMAScript UI from Designer. Here is the
> > trace;
> >
> > My Eval function;
> > function MyEval(AttributeValue){
> > 	//Beware of injection scriptattacks..
> > 	var attributeValue = eval("(AttributeValue)");
> > 	return attributeValue;
> > }
> >
> >
> >
> > TRACE:================
> >
> > 361]:DEV ST:    Evaluating selection criteria for rule 'Reformat
> > firstname attribute'.
> > 361]:DEV ST:      (if-op-attr 'firstname' available) = TRUE.
> > 377]:DEV ST:      (if-op-attr 'firstname' match ".+") = TRUE.
> > 377]:DEV ST:    Rule selected.
> > 377]:DEV ST:    Applying rule 'Reformat firstname attribute'.
> > 377]:DEV ST:      Action:
> >
> do-set-local-variable("local.pub.itp.Firstname",scope="policy",token-op-attr("firstname")).
> > 377]:DEV ST:        arg-string(token-op-attr("firstname"))
> > 377]:DEV ST:          token-op-attr("firstname")
> > 377]:DEV ST:            Token Value:
> > "\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6".
> > 377]:DEV ST:          Arg Value:
> > "\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6".
> > 377]:DEV ST:      Action:
> >
> do-reformat-op-attr("firstname",token-xpath("es:MyEval(string($local.pub.itp.Firstname))")).
> > 377]:DEV ST:
> >
> arg-string(token-xpath("es:UTF162UTF8(string($local.pub.itp.Firstname))"))
> > 377]:DEV ST:
> > token-xpath("es:UTF162UTF8(string($local.pub.itp.Firstname))")
> > 377]:DEV ST:            Token Value:
> > "\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6".
> > 377]:DEV ST:          Arg Value:
> > "\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6".
> > 377]:DEV ST:    Evaluating selection criteria for rule 'Reformat
> > lastname attribute'.
> > 377]:DEV ST:      (if-op-attr 'lastname' available) = FALSE.
> > 377]:DEV ST:    Rule rejected.
> > 377]:DEV ST:  Applying to status #2.
> > 377]:DEV ST:    Evaluating selection criteria for rule 'Reformat
> > LoginDiabled Attribute'.
> > 377]:DEV ST:      (if-op-attr 'state' available) = FALSE.
> > 377]:DEV ST:    Rule rejected.
> > 377]:DEV ST:    Evaluating selection criteria for rule 'Reformat
> > firstname attribute'.
> > 377]:DEV ST:      (if-op-attr 'firstname' available) = FALSE.
> > 377]:DEV ST:    Rule rejected.
> > 377]:DEV ST:    Evaluating selection criteria for rule 'Reformat
> > lastname attribute'.
> > 377]:DEV ST:      (if-op-attr 'lastname' available) = FALSE.
> > 377]:DEV ST:    Rule rejected.
> > 377]:DEV ST:Policy returned:
> > 377]:DEV ST:
> > <nds dtdversion="3.0">
> > <source>
> > <product build="20070620_0505" instance="DEV"
> > version="3.5.2">MY_DRIVER_</product>
> > <contact>My_COMPANY</contact>
> > </source>
> > <output>
> > <instance class-name="APP_USER" event-id="0">
> > <association>SOME_GUID_ID</association>
> > <attr attr-name="firstname">
> > <value>\u00c4\u00e5\u00c4\u00e4\u00d6\u00f6</value>
> > </attr>
> > </instance>
> > <status event-id="0" level="success" type="driver-general"/>
> > </output>
> > </nds>
> >
> >
> > =====================
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > svella;1978261 Wrote:
> >> It's hard to suggest a solution without knowing more about exactly
> what
> >> sorts of things to expect in the string. Assuming that the encoding
> of
> >> strings is in full compliance with javascript or javascript strings
> >> you
> >> could use one of the unescape methods from Apache Commons Lang as
> an
> >> extension function or use the source code as an example for
> creating
> >> your own method. It's also possible that you could use javascript
> >> eval()
> >> function, but that's a little scary because it could open you up to
> >> injection attacks.
> >>
> >> 'Lang - Home' ('Lang - Home' (http://commons.apache.org/lang/))
> >>
> >> 'StringEscapeUtils (Commons Lang 2.5 API)'
> >> ('StringEscapeUtils (Commons Lang 2.5 API)'
> (http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringEscapeUtils.html#unescapeJavaScript(java.lang.String)))
> >>
> >>
> >>
> >> Shon Vella
> >> Developer
> >> iDENTiTYAUTOMATiON
> >> 'Identity Automation' ('Identity Automation'
> (http://www.identityautomation.com))
> >>
> >> On 5/22/10 5:16 AM, belaie wrote:
> >>>
> >>> dgersic;1978218 Wrote:
> >>>> On Fri, 21 May 2010 08:26:01 +0000, belaie wrote:
> >>>>
> >>>>> Novell Identity Manager 3.5.1
> >>>>> RedHat Linux enterprise edition.
> >>>>> SOAP IDM driver..
> >>>>>
> >>>> Hello
> >>>>
> >>>> Its the Query to the application, yes,
> >>>>
> >>>>
> >>>> the soap driver which i'm using is self-developed, which targets
> not
> >> a
> >>>> SOAP endpoint but  a REST resource uri.
> >>>>
> >>>> the output is the XDS instance document which each attribute and
> >> its
> >>>> values.
> >>>>
> >>>> if the some users have non-english names, the endpoint returns
> the
> >>>> results on  their name attributes as the  javascript escape
> >> sequence
> >>>> encoded strings,  so the question was how to decode these escape
> >>>> sequence encoded strings with the values which are more readable.
> >>>>
> >>>>
> >>>> currently, i did a  reformat-operation-attribute with replaceAll
> >> token
> >>>> hard codded each escape sequence.
> >>>>
> >>>> but i wanted a more good solution to this problem..
> >>>>
> >>>> do you still need  to see the ouput document ?
> >>>>
> >>>>
> >>>> Regards,
> >>>> M.
> >>>>> When I query on an attribute "firstName" from IDM,  the
> >> application
> >>>>> returns  value on that atrribute as the  "English\u00c6".  It
> >> looks
> >>>> like
> >>>>> the string comes as a Unicode string..
> >>>>
> >>>> Query to where? To eDir or to the SOAP application?
> >>>>
> >>>>
> >>>>> I need help to reformat that value so that it can be readable
> for
> >> my
> >>>>> rules in my driver..
> >>>>
> >>>> If it's to the SOAP application, show us the return document (or
> a
> >>>> doctored up version of it if the data in it is confidential).
> >>>>
> >>>>
> >>>> --
> >>>>
> >>
> ---------------------------------------------------------------------------
> >>>> David Gersic
> >>>> dgersic_@_niu.edu
> >>>> Novell Knowledge Partner
> >>>> http://forums.novell.com
> >>>>
> >>>> Please post questions in the newsgroups.   No support provided
> via
> >>>> email.
> >>>
> >>>
> >
> >


-- 
love anything that talks binary!
------------------------------------------------------------------------
belaie's Profile: http://forums.novell.com/member.php?userid=4368
View this thread: http://forums.novell.com/showthread.php?t=411184

0
belaie
5/23/2010 11:06:01 PM
Reply:

Similar Artilces:

string() = string()
this code does not work (not instance of object) Dim Items(), Other() As String Items = New String() {"A","B","C"} Other = New String() {} Other = Items how can I get all the values ? angiras Hi, If I understand your requirement correctly, this should do it Dim Items() As String = {"A", "B", "C"} Dim Other(Items.Length - 1) As String Items.CopyTo(Other, 0) To more closely match you code above, but this will be less efficient Dim Items(), Other() As String ...

String and String[]
What will be the advantage of using myString: String[10] over myString: String Man wrote: > What will be the advantage of using > myString: String[10] > over > myString: String "String[10]" is a fixed-length, statically allocated, Ansi-based ShortString. "String" is a dynamic-length, dynamically allocated, reference counted, Ansi-based or Unicode-based (depening on Delphi version) Long string. Unless you absolutely need the static, fixed length nature of ShortString, such as in records that interact with external systems, you should stay ...

String and string?
Hi guys, I was wondering the difference between small letter string type and a capital letter String type. Does anyone know about this? Highly appreciate for your answers! Thankz! The "proper" version is String, as it references the System.String class of the .NET Framework Class Library. The ability to use string is provided by C#, where it is an alias to String. Similarly, the "proper" version of an integer is Int32, as it references System.Int32.  The ability to use int is provided by C#, and the ability to use Integer is provided by VB.NET, and both int and Integer are aliases...

string to string[]
Hi, I've got this code : string[] Params; string SQL = "SELECT * FROM T_MANAGEMENT_PAGES"; SqlCommand myCommand = new SqlCommand(SQL, myConnection); myConnection.Open(); SqlDataReader myReader = myCommand.ExecuteReader(); try { while (myReader.Read()) { Params_Type = myReader.GetValue(0).ToString(); } } catch { } finally { } myReader.Close(); My problem is to obtain Params_Type. But each time, it says : "impossible to convert '[object]' in 'string[]' &quo...

string and string[]
hello, whats the difference here between string and string[] thanks "string" denotes an item of type String "string[]" denotes an array of type String itemsThanks, EdMicrosoft MVP - ASP/ASP.NET Gracia mon ami...

How to convert a String into a UTF8 String
Hello! I want to convert a normal String into a UTF8 String for example:myString = BüromyUTF8String = Büros  I dont know how to do this. In PHP you can do this with myUTF8String = utf8_encode(myString) Thank you for all hints! try this string test ="ÁÉÍÓÚ áéíóú àèìòù äëïöü Ññ €"; byte[] a= System.Text.Encoding.UTF8.GetBytes(test); string test2= System.Text.Encoding.UTF8.GetString(a);  greetingsBest Regards,Sebastián DopicoBlog Desarrollador Thank you Sebastián! If I make it like that - test2 looks the same as test.But I think my problem is solved. (Someone tol...

Convert string to string array.
Hi, We have a string array argument in datawindow object for 'IN' sql statement. Our user enter a string in a single line edit. How to convert the string to a string array for the argument of datawindow? ex. user input : 'A', 'B', 'C' => str_arr[]={'A', 'B', 'C'} dw_1.retrieve(str_arr) Thanks in advance. Take a look at the n_cst_string object in the pfc. It has a method called of_ParseToArray that does exactly what you're looking for. It's a pretty simple task to 'port' the code ...

Converting a list of string into string
When I try the following code in Prism I get the error "Error 8 (CE15) Type mismatch, cannot assign array of System.String to System.String " ***************************************************************** var mobileNumberList :List<string> mobNumberArray :string Begin mobileNumberList.add('1234567890'); mobNumberArray := mobileNumberList.ToArray();//error here end; *************************************************************** What needs to be done to convert an array of strings to a string Venkatesh Venkatesh VT a écrit : > When I...

convert octet string to string
I'm trying to use IDM 3.5.1 provision an AD environmnet with users from eDir. We wanna provision as much info as possible, but one attribute gives us headaches. This is an auxiliary attribute associated with each user in eDir that has it's syntax set to octet string. Problem is we need to provision this over to another attribute in AD that uses string as its syntax. Is thee a way through XPath or ECMA script to have the value converted during the provisioning? I've no experience with either XPath or ECMA so please be detailed in your replies. Thx -- jdoeconsu...

Convert UPPERCASE string to Upper-Lower Case (ie. THIS IS MY STRING -> This Is My String)
I recently had the need to convert an all capitalized string to upper/lower case, but couldn't find anything to do it in XSLT 1.0.  If it helps anyone out, I wrote the following:   Call it using: <xsl:template match="Ads">  <xsl:call-template name="ToUpperLowerCase">   <xsl:with-param name="inputString" select="YOURSTRINGHERE"/>   <xsl:with-param name="index" select="0"/>   <xsl:with-param name="loopCount" select="st...

a string in a string in a string in my code behind....
I know my title talk about code-behind, but this is really a client-side problem (and surely a newby one too, sorry about that).I have a javascript function that my make a little text appear when the onmouseover event of a link is activated.So, normally, if my link was inside my html code, it would be something like this:<a href = "whocare.com"  onmouseover="poplink('I want to test something');">test</a>BUT, for some reason, I have to write this part in code behind with the LiteralControl function....and that will give something like that:this.Controls.Add(new LiteralCo...

m_AVP As IDictionary(Of String, String) = New Dictionary(Of String, String) ,not defined?
   I am creating a usercontrol (ascx,ascx.vb)   I have used Imports system.Collections Imports system.Collections.Generic     Private m_AttributeValuePair As IDictionary(Of String, String) = New Dictionary(Of String, String)     But I am gettting an error “Type Dictionary is not defined”   And also I am getting intelisense to type the line But what is the reason for my error ? How can I get escape from the error ?         this error is not showing today  ...

converting string to integer, subtracting strings.
Hi,  I have a textbox into which the user will enter a number I then have button that when the user clicks, the number taken from the textbox will be subtracted by one or more(depending on the users situation) and displayed in a label.   The problem i am having at the moment is that when i attempt to do this an error comes up saying that "the operator '-' cannot be used with string or int". String Score1 = txtScore1.Text: String netScore1;   netScore1 = Score1 - 1; lblNetScore1.Text = netScore1;   I have ...

Convert Object/String to a Base64 String
The function below converts a normal string to a Base64 string. This can come in pretty handy ;) public static string getBase64Encoded(string inString) { byte[] inData; char[] charArr; //System.IO.StringReader sr = new System.IO.StringReader(inString); //sr.Read(inData, 0, inString.Length); charArr = inString.ToCharArray(); inData = new byte[charArr.Length]; for(int i = 0; i < charArr.Length; i++) { inData[i] = (byte)charArr[i]; } return System.Convert.ToBase64String(inData, 0 , inData.Length); } ...

Web resources about - Convert Unicode string to Readable String - novell.id-manager.drivers

Machine-readable passport - Wikipedia, the free encyclopedia
A Machine Readable Passport (MRP) is a Machine Readable Travel Document (MRTD) where the data on the identity page is encoded in optical character ...


iOS 7 How-to: Make text more readable/larger on your iPad and iPhone
... for more breaking coverage of iOS Devices , Tips and Tricks , and iOS 7 . What do you think? Discuss "iOS 7 How-to: Make text more readable/larger ...

Readable 2 Features New iOS 7-Inspired Design, New Features And … Tweeticles?
The auto-scrolling reading app Readable has just been updated to version 2.0. Readable 2 introduces a new design based on the visual style of ...

reddit launches new posting format to make breaking news more readable
A reddit live thread in progress about the missing Air Algerie flight. On Wednesday, reddit added a new post format for keeping up with breaking ...

Goodbye Google Reader I'm switching to Readable.cc
... adopt. But with countless options to choose from, where should one even begin looking? An excellent place to start is a website called Readable.cc ...

How to Write More Readable Blog Posts
... that improve readability. Here are six editing tips to help you instantly improve the readability of your blog posts. Tips to write more readable ...

Readable Code
Recently, I needed to change a scalar variable into a stack, as I modified my code to handle a new feature. Here's what I did. First, I looked ...

Human Readable Type
From Ĥ∪ṃαи 尺єαďαӸє Ƭƴρє: Ƭңє Ĥ∪ṃαи 尺єαďα...

Wanted: Developers who can make outdated documents readable again
The Document Foundation is looking for developers who want to help make documents locked in old, outdated and inaccessible file formats readable ...

Resources last updated: 1/22/2016 10:18:44 PM