GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.servicestack.net — Your first Web Service Explained Your first Web Service ExplainedLet's look a bit deeper into the Hello World service you created: As you have seen, the convention for response DTO is To support automatic exception handling, you also need to add a
Services are implemented in a class that either inherits from the
The above service can be called with Any HTTP Verb (e.g. GET, POST,..) from any endpoint or format (e.g. JSON, XML, etc). You can also choose to handle a specific Verb by changing the method name to suit. E.g. you can limit the Service to only handle HTTP GET requests by using the
Calling Web ServicesThanks to the above
Request DTOs that don't implement
Alternatively you could use a general purpose HTTP Client like HTTP Utils:
We highly recommend annotating Request DTO's with the above More details on the Service Clients is available on the C#/.NET Service Clients page. Registering Custom RoutesIf no routes are defined the .NET Service Clients will use the pre-defined Routes.
You can annotate your Request DTO with the
The .NET ServiceClients will then use the best matching Route based on the populated properties on the Request DTO. Routing TipsNo ?queryString or POST Form Data should be included in the route as ServiceStack automatically populates Request DTOs with all matching params, e.g:
Matches both When the route includes a variable, e.g:
It only matches:
Whereas using a wildcard:
Matches all routes:
More details about Routing is available on the Routing page. On This Page
|
| You are visitor 01402877 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |