We have split some web services down to the requests using the full web service detection rules API.
The issue we are facing now is with the naming of these new services after the split, as the name is being taken from the URI, but the name we actually want but don't seem to be able to retrieve is the web service method name.
Is there some way to extract the web service method name and use is as the service name?
Solved! Go to Solution.
Have a look at Service Naming Rules. You can e.g. use the WebServiceNamespace or WebServiceNames as one of the placeholders.
Making a single service per web service method might be a bit overkill though.
You can split/name the different Requests by WebService Method inside a service. For that have a look at Request Naming Rules.
The our problem that WebServiceNamespace or WebServiceName doesn't contain needed information.
For example: we have web service BookingController with the following web methods:
1. CreateBooking (uri - /bookings, http method - post)
2. DeteleBooking (uri - /bookings/%name%, http method - delete)
3. UpdateBooking (uri - /bookings, http method - patch)
4. MetadataBooking (uri - /bookings/metadata, http method - get)
When i create a service detection rule, i can't get the useful information from URL, even i have to keep only one segment (/bookings) because i have dynamic value (number) in one of the methods.
So web services split and web services naming are not really useful for developers and for root cause analyses and problems.
@KVZ URLs is too volatile, that's why you can't use it in the detection rules and you can only extract segments. If you want four methods to be separate services, then I'm afraid that's not possible in general.
In your case, you likely need request naming rules, maybe with the combination of service detection rules. Separate service for each operation is an overkill as @pahofmann mentioned. Did you consider key requests in your case?