Question

I am trying to stand up a service using Service Stack. The service needs to meet soap 1.1 standards.

Now the operation object that I am trying to use is called SendGetAccountResponse and I created no response class so this will be a Async Service. When i run the project the operation / message does not exist.

Now if i go and rename that DTO to SendGetAccountR_esponse or SendGetAccountNotification then that operation appears and I can call the operation.

Something tells me there is some kind of convention that stops operations with Response at the end of it to be displayed and used as an request object.

Does anyone know where / how I can turn those conventions off?

DTO Naming Conventions

Naming convention: {Request DTO Name} + Response

Example: Request DTO: DeleteCustomer --> Response DTO: DeleteCustomerResponse. If you would leave the services as they are, the REST endpoint wouldn't exist. So you need to hook them all up on the same URL.

https://github.com/ServiceStack/ServiceStack/wiki/SOAP-support

Was it helpful?

Solution

The {RequestDtoName}Response convention is not removable.

It's used to guess what the response of a matching Request DTO should be by default. The Response Type can be overridden by specifying in on the Service Action signature, e.g:

public class MyService
{
    public MyCustomResult Get(MyRequest request} {}
} 

or by specifying it using the IReturn<T> marker on the Request DTO, e.g:

public class MyRequest : IReturn<MyCustomResult> {}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top