[wsas-java-dev] WSRequest.js related issue
saminda abeyruwan
saminda at wso2.com
Fri Nov 2 20:11:11 PDT 2007
Hi,
WSAS has encountered a slight issue in WSRequest.js (line 743)
i.e randomToken = Math.floor(Math.random() * 10000000000);
The above line is in the _buildWSAHeaders : function(standardversion,
options, address) {...} of WSRequest.js.
WSAS loads "Try it" inside an iframe which embeds into a div. When an
service is invoked and WSRequest hits the line 747 to build WSA headers,
it will throw an undefined error. Once this line has been removed and
generates the MessageId as follows,
id = "http://identifiers.wso2.com/messageid/" + now + "/" + now;
everything worked fine.
Unfortunately, I could not give much information on why it would cause
such error only I could demonstrate it.
Considering the safe side should it be viable to remove the
"randomToken" variable and generate the message id with
"http://identifiers.wso2.com/messageid/" + now ;
now = (new Date()).valueOf();
because, IMHO the probability of getting the same Id in concurrent
situation is quite small.
Thank you
Saminda
More information about the Wsas-java-dev
mailing list