J
Justin Dutoit
Hey. I have a function with a boolean return value, called IsInWarehouse,
which checks if a product is available in a warehouse, or not. But I need
security in the function too, so I have
[WebMethod][SoapHeader("soapHeader")]
public bool IsInWarehouse(string productName) {
if (Login(username, password)) {
// query db about available product
} else {
// ???
}
}
If the product is in stock, it returns true, or else it returns false.
But the caller of the web service needs to know if the login succeeded or
failed. (Because it's custom authentication in a web service, authentication
has to be done inside every procedure that needs it) What do I do with the
type of the return value? bool gives you 2 return values, I need 3.
Thanks for any help
Justin Dutoit
which checks if a product is available in a warehouse, or not. But I need
security in the function too, so I have
[WebMethod][SoapHeader("soapHeader")]
public bool IsInWarehouse(string productName) {
if (Login(username, password)) {
// query db about available product
} else {
// ???
}
}
If the product is in stock, it returns true, or else it returns false.
But the caller of the web service needs to know if the login succeeded or
failed. (Because it's custom authentication in a web service, authentication
has to be done inside every procedure that needs it) What do I do with the
type of the return value? bool gives you 2 return values, I need 3.
Thanks for any help
Justin Dutoit