To test the sample code provided, you must
have a console application.
Create a new application, or open your existing
application in Visual Studio.
Right-click the project node and chooseWSE
Settings 3.0. The app config dialog box appears. IfWSE
Settings 3.0doesnotappear,
proceed as follows:
Reinstall WSE 3.0 by using the Add or Remove
Programs menu.
In the installer, selectModifyand
install the Visual Studio Tools option.
Restart Visual Studio.
Repeat Steps 1 and 2.
In the dialog box under the General tab, checkEnable
this project for Web Services Enhancements.
Click the Policy tab and checkEnable
Policy. ClickAdd. The
Add or Modify Policy Friendly Name dialog box appears.
In theAdd or Modify Policy Friendly
Namefield, enterCyberSource.
If you use a name other than CyberSource, you must modify the value
of thePOLICY_NAMEvariable
in the sample code.ClickOK.
The WSE Security Settings Wizard appears.
In theDo you want to secure a service
or a clientfield, chooseSecure
a client application. In theChoose
Client Authentication Methodfield, chooseUsername.
ClickNext.
On the next page,Specify Username
Token in codeis checked by default. If you
leave this default setting your password appears as plain text in
the wse3policyCache.config policy. However, if you specify the username
and password in the code, you can retrieve the password from a database
or from any other source. ClickNext.
UncheckEnabled WS-Security 1.1 Extensions.
Unchecking this option automatically selectsNone (rely
on transport protection). ClickNext.