xqueryosb

Generating a random hexadecimal number in Xquery


i would like to have a random hexadecimal number generated for one of the field in the Xquery(which is used in OSB).

Previous mapping which we have,

<ns0:EmployeeID>{ data($EmployeeDetails/ns1:Employee/ns1:EmployeeID) }</ns0:EmployeeID>

Any help here?

Thanks


Solution

  • i think, i have figured it out instead of the below

    <ns0:EmployeeID>{ data($EmployeeDetails/ns1:Employee/ns1:EmployeeID) }</ns0:EmployeeID>
    

    i have used like below and it worked

    <ns0:EmployeeID>{fn-bea:uuid()}</ns0:EmployeeID>