Connecting to SOAP API Using WSE 3.0 and .NET 2.0

Use sample code and language details here to connect your development environment to SOAP API using the WSE 3.0 standards.

These instructions include connecting using Visual Studio 2005 and Visual Studio 2005 Express. For Visual Studio 2008, connect using WCF.

You can use the connection to the SOAP API to test your calls and perform various tasks, such as sending email and retrieving tracking information.

You must configure your development environment correctly in order to establish a connection with SOAP API. The SOAP API uses WSS 1.0 message level security to secure communications with Marketing Cloud Engagement servers.

All users of Windows 7 and Vista 64-bit operating systems must complete these steps before proceeding to the steps in the next section.

  1. Locate the devenv.exe.config file for your Visual Studio 2005 or Visual Studio 2005 Express instance. You can typically find this file at C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\devenv.exe.config.
  2. Make a backup copy of the file and store it in a different location.
  3. Add the following configuration information to the file:

Follow these steps to connect your Visual Studio 2005 instance to the SOAP API:

  1. In Visual Studio 2005, create a new project.
  2. Right-click on that project and select Add Web Reference.
  3. Add the appropriate WSDL reference in the URL field.
  4. In the Web Reference Name field, enter the title Marketing Cloud Engagement API.
  5. Click Add Reference.
  6. Return to the project window and right-click your project.
  7. Select WSE Settings 3.0.
  8. Under the General tab, click Enable This Project For Web Services Enhancements.
  9. Update your web reference to your new reference object.
  10. Click OK.

If you wish to enable this feature on an existing project, right-click that project andselect WSE 3.0 Settings to get to a screen where you can enable WSE for the project. If you enable WSE after you've added a web reference to the API, you need to update the web reference.

Users of Visual Studio Express editions can’t take advantage of the Visual Studio.NET/WSE integration. However, you can usethe following steps to set up WSE with Visual Studio Express editions.

  1. Create your project.
  2. Close your project.
  3. Open project using the WSE client application.
  4. Click Enable Web Service Enhancements.
  5. Open your project.
  6. Create the web reference to the appropriate WSDL URL.
  7. Begin writing code.

The sample code below demonstrates how to connect and interact with the SOAP API.

Connect Using WCF