Learn how to use and test SugarCRM web services WSDL-API via SOAPSonar Enterprise Edition, a .NET-based stand-alone testing tool.
SugarCRM provides an extensive web services SOAP API for integration with external applications. This article introduces how to use .NET-based SOAPSonar Enterprise Edition for invoking SugarCRM SOAP-API. The following simple steps are required to get started:
▪ Install SOAPSonar Enterprise Edition published by Crosscheck Networks.
▪ Sign-up for SugarCRM evaluation License.
▪ Load WSDL published by SugarCRM
▪ Setup Operations, e.g., List Module Fields.
With these simple steps, you will be ready to integrate SugarCRM with any web services-aware application. The web services API provided by SugarCRM is extensive, easy-to-use, and flexible.
To explore SugarCRM’s web services functionality, as shown in Figure 1, a simple test environment is setup with SOAPSonar installed on a client machine. SOAPSonar consumes the WSDL-based API definition published by SugarCRM On-Demand hosted service. This WSDL file provides all the necessary constructs for SOAPSonar
to send SOAP requests to SugarCRM over HTTP protocol.
The installation and setup steps are as follows:
1. Download and Install SOAPSonar Enterprise Edition: SOAPSonar is a web services testing client that consumes a WSDL and generates functional, performance, interoperability and vulnerability tests for a target web service.
With SOAPSonar, testing SugarCRM web services is easy and code free. Download SOAPSonar Enterprise Edition.
2. Register for a SugarCRM Professional On-Demand Trial Account: You can also use the Live Demo version of the product with the following attributes:
a. Live Demo URI: http://demo.sugarcrm.com
b. User: will
c. Password: will
3. Load SugarCRM WSDL: Start SOAPSonar and load the WSDL from SugarCRM. Figure 2 shows SOAPSonar with the WSDL loaded from location:
SOAPSonar parses the WSDL and in the left navigation panel, exposes the extensive list of operations provided by SugarCRM. We can quickly test the SugarCRM web services interface by sending credentials using the “login”
operation. Since SugarCRM expects MD5 values of the password, as shown in Figure 2, the MD5(HashString) Context Function is used with password “will” as the input HashString. The Context Function menu is accessible by simply clicking at right side of the password field.
On submitting the request (push the circled blue arrow), SugarCRM returns a SOAP Response, as shown in the lower right panel of Figure 2. The SOAP Response contains the session id that will be used for invoking subsequent operations.
4. Set Response Variable: In this step, the session id obtained in the last step is passed in as a “Response Variable” for a selected operation. To set the Response Variable:
a. Select the Response Variable
b. Select the variable of interest. In our case, we are interested in the “id” element.
c. Drag this variable to the bottom panel. You will be prompted to set the variable name. Use the default name “id”.
5. Assign Response Variable: In this step, the Response Variable “id” captured in the previous step is assigned as the input to the selected operation. We selected the “get_module_fields” operation as shown in Figure 4.
a. Click on the right side of the “session” field to provide Parameter Menu and navigate to Response Variable where you select “id” as an input to the session field.
b. Push the Green Check button to save the values.
c. Push the Blue Arrow button to run the test.
As seen in the lower Response Panel, the list of fields associated with the “Leads” Module is returned.
Web Services are the foundations of modern distributed systems. The widespread use of Web Services across network devices, applications, and corporate infrastructure mandates that CRM systems also expose their interfaces via simple
web services for WSDL/SOAP-based messaging for rapid integration. Using SOAPSonar enables IT professionals to rapidly test integration paths with SugarCRM without extensive development. With features such as operations chaining, developers and testers can quickly construct code-free test case sequences across WSDL operations exposed by SugarCRM. Using a .NET-based testing tool further validates that the PHP-based web services exposed by SugarCRM are programming language independent and can be consumed by non-PHP clients.
1. SugarCRM SOAP API Documentation
2. Crosscheck Networks SOAPSonar Product Help.