So the initial string "JxrHeSl2YX4LunZkWKZqog==" is a base64 encoded
nonce from soapUI. It only contains characters that are valid in a
base64 world, so Marklogic has no problems with it. It's what happens
next when one runs the decode that causes the problems.
In order to calculate a SOAP password digest one needs the original
nonce (base64 decoded of the base64 encoded nonce), the timestamp and
the password. But, in order to base64 decode a nonce with invalid
UTF-8 sequences one must use functions that are not available in
Marklogic. Casting the original base64 encoded string (that is already
valid) to base64 binary then to hexbinary then to a binary document
doesn't get me what I need for calling the base64-decode function that
expects an xs:string.
I think that my colleague will just end up doing simple passwords over
https instead of password digest unless there is another way to do
this.
Steve
That function only works with encoded strings, and I think they have
to be UTF-8 as well. But try this trick:
binary { xs:hexBinary(xs:base64Binary('JxrHeSl2YX4LunZkWKZqog=='))
-- Mike
On Wed, Jun 6, 2012 at 2:25 PM, Steve Spigarelli <[email protected]> wrote:
> How do I tell this code that I don't want it to be UTF-8 encoded?
>
> xquery version "1.0-ml";
>
> xdmp:base64-decode('JxrHeSl2YX4LunZkWKZqog==')
>
> Thanks
> Steve
_______________________________________________
General mailing list
[email protected]
http://community.marklogic.com/mailman/listinfo/general