Print this page

Configure SoapUI to Run SOAP API Calls

Knowledge Article Number 000231519
Description
The Salesforce Marketing Cloud utilizes multiple APIs that can all be utilized to perform various actions. These APIs use separate WSDLs and Endpoints than the Sales and Service Cloud APIs.  Let's get started with utilizing the most basic interface, SoapUI.
Resolution


Configure the SoapUI

 
1. Download SoapUI Open Source.
2. Paste the WSDL Link that corresponds to your Marketing Cloud Instance.
3. Name your project.
4. Click File | New SOAP Project
5. After installation completes, open SoapUI.

Once the WSDL populates the available Methods, you can expand any of the Methods, open up the default "Request 1" that's available, and begin working with the API.
 

Sample Triggered Send Request


This will utilize the Create method and you'll need to have Triggered Sends setup within your Marketing Cloud account. 

Note: Review the attached screenshot for further clarification on where each segment of code should appear.

 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://exacttarget.com/wsdl/partnerAPI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soap:Header>
      <wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken>
            <wsse:Username>USERNAME</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Options/>
         <Objects xsi:type="TriggeredSend">
            <PartnerKey xsi:nil="true"/>
            <ObjectID xsi:nil="true"/>
            <TriggeredSendDefinition>
               <PartnerKey xsi:nil="true"/>
               <ObjectID xsi:nil="true"/>
               <CustomerKey>TRIGGERED SEND CUSTOMER KEY</CustomerKey>
            </TriggeredSendDefinition>
            <Subscribers>
               <PartnerKey xsi:nil="true"/>
               <ObjectID xsi:nil="true"/>
               <EmailAddress>RECIPIENT EMAIL ADDRESS</EmailAddress>
               <SubscriberKey>RECIPIENT SUBSCRIBER KEY</SubscriberKey>
               <Attributes>
                  <Name>First Name</Name>
                  <Value>Michelangelo</Value>
               </Attributes>
            </Subscribers>
         </Objects>
      </CreateRequest>
   </soap:Body>
</soap:Envelope>

If the steps above were completed properly, testing with the Triggered Send call above should return a Response similar to this next sample: 
 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" 
​xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <soap:Header>
      <wsa:Action>CreateResponse</wsa:Action>
      <wsa:MessageID>urn:uuid:b1a01b6b-55fa-4515-84e4-ba4a05ff3385</wsa:MessageID>
      <wsa:RelatesTo>urn:uuid:63a0cd4e-c30c-49eb-8bb5-df3abb16af37</wsa:RelatesTo>
      <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
      <wsse:Security>
         <wsu:Timestamp wsu:Id="Timestamp-2f5a6c0f-5df4-4326-8dc2-6a413595ba9f">
            <wsu:Created>2015-12-29T15:12:23Z</wsu:Created>
            <wsu:Expires>2015-12-29T15:17:23Z</wsu:Expires>
         </wsu:Timestamp>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <CreateResponse xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Results xsi:type="TriggeredSendCreateResult">
            <StatusCode>OK</StatusCode>
            <StatusMessage>Created TriggeredSend</StatusMessage>
            <OrdinalID>0</OrdinalID>
            <NewID>0</NewID>
         </Results>
         <RequestID>a5fa33dc-43f6-4428-af30-9dc9811dfab0</RequestID>
         <OverallStatus>OK</OverallStatus>
      </CreateResponse>
   </soap:Body>
</soap:Envelope>

This response, if successful, will include an OK and a Status Message indicating the results of the action performed. In this example, you'll see "Created TriggeredSend" noted. 


Important Icon Important: Receiving only an OK response and no status message indicates that the Marketing Cloud system didn't find any Syntax errors with the submitted call, but something required is missing, like a required Attribute, etc. 

 


Getting help from Marketing Cloud Support

 
  • If you need help from Support regarding SOAP API Issues, Support will request the entire SOAP Envelope in order to replicate the issue. This SOAP Envelope should include both the submitted Request, as well as the response received from the MC System.
  • If you're utilizing a PHP, .NET, or Java platform, the SOAP Envelope can be retrieved when requested by Support.  

Want to learn more? Review our Help documentation about Objects and find Technical Articles with code samples.
 




Attachments
Name Type Size
SoapUI.png
170KB

promote demote