Should you make one request/response object for each method or should you have one per service?
My service request object would only have 5 different things in it if I used it across all methods as I use the same inputs for almost all methods.
The response object would only have a dictionary, a bool, an int that represents an ID, and a string value for the name. I'm not sure I see the point in creating a bunch of separate objects that all have the same things inside of them instead of just using one object.
What is considered the best practice?
I would advise one for each method containing only the request and response information that that method provides and returns. The reason being that it will be clearer to calling clients what the expectations of that method are when they generate their proxy code from the wsdl.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With