Connecting to the SOAP API Using WSE 3.0 and .NET 2.0
This page contains information on connecting your development environment or other systems to the Marketing Cloud SOAP API using the WSE 3.0 standards. This information contains instructions for connecting using Visual Studio 2005 and Visual Studio 2005 Express. For Visual Studio 2008, connect using WCF.
Why Connect to the SOAP API using WSE 3.0/.NET 2.0
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.
How To Connect to the SOAP API using WSE 3.0/.NET 2.0
You must configure your development environment correctly in order to establish a connection with the SOAP API servers. The SOAP API uses WSS 1.0 message level security to secure communications with Marketing Cloud servers.
Windows 7 and Vista 64-Bit Users
All users of Windows 7 and Vista 64-bit operating systems must complete these steps before proceeding to the steps in the next section.
- 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.
- Make a backup copy of the file and store it in a different location.
- Add the following configuration information to the file:
Visual Studio 2005
Follow these steps to connect your Visual Studio 2005 instance to the SOAP API:
- In Visual Studio 2005, create a new project.
- Right-click on that project and select Add Web Reference.
- Add the appropriate WSDL referencein the URL field.
- In the Web Reference Name field, enter the title Marketing Cloud API.
- Click Add Reference.
- Return to the project window and right-click your project.
- Select WSE Settings 3.0.
- Under the **General **tab, click Enable This Project For Web Services Enhancements.
- Update your web reference to your new reference object.
- 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 Marketing Cloud API, you need to update the web reference.
Visual Studio 2005 Express
Users of Visual Studio Express editions cannot take advantage of the Visual Studio.NET/WSE integration. However, you can usethe following steps to set up WSE with Visual Studio Express editions.
- Create your project.
- Close your project.
- Open project using the WSE client application.
- Click Enable Web Service Enhancements.
- Open your project.
- Create the web reference to the appropriate WSDL URL.
- Begin writing code.
The sample code below demonstrates how to connect and interact with the SOAP API.