xWeb Integration Tips
This topic outlines various xWeb integration tips.
Building your Application
See SoapUI and Fiddler for two third-party developer tools that are essential tools for development in xWeb. Abila has worked with both of these tools extensively and on these pages we share some tips for how to use these tools to get your integration working faster and more successfully.
Manually Generating a Token
This is a tip to help you generate an Authentication Token with a specific value.
Note that you can do this only if you have access to the netFORUM SQL Server database. If you do not have this level of access, then you will not be able to do this.
The benefit of doing this is that you might have a number of saved SoapUI web method calls, and each of these must pass a Token value in the SOAP header. Instead of needing to get a new token over and over, and copying-and-pasting that value over and over, you can just use the same GUID value, and whenever you want to run your SoapUI web methods, you can just insert that Token with the specific value.
You should do this only for development/diagnostics/troubleshooting. You should not incorporate something like this into the actual application.
Here is the SQL command to do this. You should save this as a script that you can run when needed. You will need to re-run this script every time you start your diagnostics because the token lasts only 20 minutes.
/*Script inserts a magic xWeb Authentication token*/ -- Declare magic Token and name of the xWeb User declare @magicToken uniqueidentifier, @xWebUser sysnameSET @magicToken = 'cfe3f524-2add-42b8-9e73-426a46465d4e' -- Option 1, will work for most sites where there is only one xWeb user:SELECT top 1 @xWebUser = usr_code FROM fw_user WHERE usr_pwd IS NOT NULL -- Option 2: set it to a specific user, if you want to authenticate as a specific user:SET @xWebUser = 'AvxWebUser' -------- YOU DO NOT NEED TO CHANGE ANYTHING BELOW THIS LINE ---------- Clear out any existing TokensDELETE ws_security WHERE xws_current_token = @magicToken -- Insert the new Token:INSERT ws_security (xws_usr_code, xws_current_token, xws_expiration, xws_expiration_policy)VALUES ( @xWebUser , @magicToken , dateadd(mi, 20, getdate()), 'Absolute')