MD5 encoding - Websphere
This is a discussion on MD5 encoding - Websphere ; Hi, We are looking to call a .Net web service from Message Broker 5. This requires an MD5-encoded password. Are there any routines available to provide this, given the plain text password as an input parameter?
Failing that, what's the ...
-
MD5 encoding
Hi, We are looking to call a .Net web service from Message Broker 5. This requires an MD5-encoded password. Are there any routines available to provide this, given the plain text password as an input parameter?
Failing that, what's the best way to implement such as routine?
Thanks, Jon
-
Re: MD5 encoding
Hi Jon,
I'm not sure but I believe you do not have anything built-in to handle
MD5 encription in WBIMB. Considering that you have to build it yourself
I would say a good way to do that is to develop a node in java for you
have the MD5 encoding in the java plataform already so you don't need
to create it manually.

Rogério.
jon_maddison@uk.ibm.com wrote:
> Hi, We are looking to call a .Net web service from Message Broker 5. This requires an MD5-encoded password. Are there any routines available to provide this, given the plain text password as an input parameter?
>
> Failing that, what's the best way to implement such as routine?
>
> Thanks, Jon
-
Re: MD5 encoding
jon_maddison@uk.ibm.com wrote:
> Hi, We are looking to call a .Net web service from Message
> Broker 5. This requires an MD5-encoded password. Are there
> any routines available to provide this, given the plain text
> password as an input parameter?
There is nothing built-in.
> Failing that, what's the best way to implement such as
> routine?
I would probably use a static Java method to implement this (if
using WBIMB v5 FP4 or later).
Or, use a JavaCompute node in WMBv6 :-)
Andy
-
Re: MD5 encoding
**********************************************
CREATE COMPUTE MODULE JAVACALL_SAMPLE
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CREATE PROCEDURE XformEFTTender() BEGIN
DECLARE inRef REFERENCE TO InputBody.eNSEINPUT_TE[IREC];
--@DA20 If you declare and intialize the CHARACTER in one and don't use
a SET
--@DA20 the broker successfully calls java class but on return says
CANNOT CAST TO UNKNOWN TYPE.
--@DA20 The commons-codec-1.3.jar file should be copied to the
\classes directory
--@DA20 DECLARE ENCRYPTED_CARD_NBR CHARACTER NULL;
DECLARE ENCRYPTED_CARD_NBR CHARACTER; --@DA20
SET ENCRYPTED_CARD_NBR = NULL; --@DA20
SET ENCRYPTED_CARD_NBR = md5Encode(inRef.CARD_NBR); --@DA20
END;
-- Perform MD5 encryption for the passed in string
--
-- @param encodeString the string to be encoded as per the MD5
algorithm
-- @return the MD5 encoded string
--
CREATE PROCEDURE md5Encode(IN encodestring CHARACTER)
RETURNS CHARACTER
LANGUAGE JAVA
EXTERNAL NAME "org.apache.commons.codec.digest.DigestUtils.md5Hex";
END MODULE;
************************************************** **********
Dwai
Andy Piper wrote:
> jon_maddison@uk.ibm.com wrote:
> > Hi, We are looking to call a .Net web service from Message
> > Broker 5. This requires an MD5-encoded password. Are there
> > any routines available to provide this, given the plain text
> > password as an input parameter?
>
> There is nothing built-in.
>
> > Failing that, what's the best way to implement such as
> > routine?
>
> I would probably use a static Java method to implement this (if
> using WBIMB v5 FP4 or later).
>
> Or, use a JavaCompute node in WMBv6 :-)
>
> Andy