When to Use REST and SOAP

Spectrum supports web service requests using REST and SOAP. They both offer similar capabilities, such as rendering, listing and describing maps and features. While our SOAP API offers more capabilities, the REST API is the more commonly used framework due to its use of JavaScript.

An important difference between the two protocols is that REST uses a named resource in a request. SOAP will accept either a named resource or parameters that are written out in the request.

A named map has the information about the map already defined and stored in the repository. At render time you cannot change the layer order or hide a layer, for example. If that is an important capability for you, choose SOAP and do not use named maps. But there are other options.

One way to use REST and have some ability to control layer rendering is to have multiple named maps where each one defines one layer.

If you want to use SOAP services in a JavaScript application, consider creating your own URL. This proxy will parse the request containing the named map and formulate it into a SOAP request containing the individual layers.

Proxies are an important component when using the Javascript API. For more information see Working with the JavaScript API section in this guide.