cancel
Showing results for 
Search instead for 
Did you mean: 

Application exceptions in Adaptive Web Service Usage

Former Member
0 Kudos

Hi,

I'm working with web services and the adaptive web service model. I want the application to use my custom application exception in case of errors (not technical errors).

I can create a web service throwing checked exceptions (lets name it MyApplicationException). I would like to throw such errors in cases like "id already in use".

If I import the wsdl the exception is created as model class. but on invocation only a ModelException is thrown and I cant determine if it is a technical exception like "connection timeout" or my custom application exception.

Is there a way? (beside looking in the causes)

Are there common solutions or guidelines? How do you handle application exceptions like "id already in use"?

thx

tom

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Thomas,

In this case I suppose you'll have to return an Object parameter that could be the object of the class that is overriding the exception class as a parameter to be very simple.

Also let me know have you tried using the cause to fetch it.

Regards

Amit

Former Member
0 Kudos

Thanks for your answer. This could be a solution.

But I hope there is a better one. The web services I want to call a part of a soa and I don't want all services to avoid using checked exceptions because of lack of possibilities in web dynpro.

Is there no way to access the faults? Web services and WSDL support exceptions by using the fault part in messages. Is there no way to access faults in web dynpro adaptive web service model?

I can't believe nobody is developing faultable web services and web dynpro front ends for them.