REST, SOAP & default endpoints

When you create a service, there are by default three endpoints:

  • User-defined REST endpoint
  • SOAP endpoint: /[soap11|soap12]
  • Default endpoint: /[xml|json|html|jsv|csv]/[reply|oneway]/[servicename]

The preferred way to call the webservice is mostly using the REST endpoint. As you have seen, user-defined REST endpoints can be configured with the Route attribute for each Request DTO.

But you can also call your service by using the default endpoint, without configuring a REST url with the default endpoint. Of course there's always the option to use the SOAP endpoint.

Sample requests:

The possible requests for the following Request DTO are:

public class Hello
    public string Name { get; set; }

Option 1

SOAP endpoint

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">

<Hello xmlns:i="" xmlns="">


Rest endpoint:


Default endpoint:


Option 2

But you don't need to pass the Name of the Request DTO in the request body. There's also the possibility to set the value of Name with URL parameters (works only with REST and default endpoint of course).

REST endpoint:


Default endpoint:


You can also combine the two approaches.

Option 3

Last but not least there exists another way to set the value of Name! But this works only with the REST endpoint: If you add the following mapping to the Request DTO above:

[Route("/hello/{Name}")] will be able to set the name in the URL itself, without any URL parameters:

Rest endpoint:


As you can see {Name} (in the mapping) is the placeholder for the value of the property Name.


The last two approaches are mostly used for GET and DELETE requests, because often clients don't support to attach a request body for these HTTP methods


As you may have noticed, ServiceStack is also capable to support different formats (JSON, XML, etc). There exists another separate tutorial about formats