web services quest
-
hello forum, i have defined a web service. If the remote operation is successful the method must return a type of datum (for example, struct Okstr) but if the remote operation is not successful the method must return another different type of datum (for example, ERRORstr). How Can i do this with Web Services?? Is possible to throw exceptions via Web Services (like JAVA RMI or CORBA)? A lot of thanks!!
-
hello forum, i have defined a web service. If the remote operation is successful the method must return a type of datum (for example, struct Okstr) but if the remote operation is not successful the method must return another different type of datum (for example, ERRORstr). How Can i do this with Web Services?? Is possible to throw exceptions via Web Services (like JAVA RMI or CORBA)? A lot of thanks!!
Yes, you can throw SoapExceptions using XML Web Services. One way of doing this if you do not want to throw exception, is to create error object of required type like ( Struct in this case ). If web service is successful return the data object else return your error object. In this case, the return type of your web method can be struct or any type you want. :) Bhaskara
-
Yes, you can throw SoapExceptions using XML Web Services. One way of doing this if you do not want to throw exception, is to create error object of required type like ( Struct in this case ). If web service is successful return the data object else return your error object. In this case, the return type of your web method can be struct or any type you want. :) Bhaskara