Hi Par,
I went through your custom exception scenario using Axis2-snapshot
build. I noticed a compile error in the generated stub. Therefore I
reported a bug at https://issues.apache.org/jira/browse/AXIS2-3412
I hope your issue will also be considered when fixing the jira. If you
want to add some comments, please add them to the same jira or report a
seperate issue.
regards
Charitha
Pär Malmqvist wrote:
Hi!
Could you please have a look at the following issue if it can be resolved to
the Axis2 1.4 release.
I have asked the axis mailing list about this issue a couple of times the last
year but the problem has not been solved yet.
When creating a web service using existing business logic with "code first"
approach I dont think custom exceptions are handled the way it should. (Axis2 1.3)
Assume the following server side code:
package axis2test;
public class MyService {
public MyService() {
}
public int addOneToPositiveValue(int value) throws CustomException {
if(value < 1) {
throw(new CustomException());
}
return(value + 1);
}
}
package axis2test;
public class CustomException extends Exception {
private static final long serialVersionUID = 999999999;
public CustomException() {
super();
}
public String toString() {
return(super.toString() + ' axis2test.CustomException');
}
}
This is a webservice for MyService
axis2test.MyService
I deploy the service, let Axis2 generate the .wsdl file and then create a
client with the wsdl2java tool (xmlbeans style).
The custom exception appears on the client side in the AxisFault details field
within -tags together with a HUGE stack trace. This makes it hard for a client
to parse.
Is it posible to fix this to make it possible to use the generated client like:
try {
stub.addOneToPositiveValue(-1);
}
catch(CustomException c) {
...
...
}
catch(Exception e) {
...
...
}
I have tried the parameters drillDownTo... and sendStackTrace...
It doesn't solve the problem for me.
Thanks.
/Pär
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Charitha Kankanamge
WSO2 inc.
Flower Road, Colombo 07
+94 714268070
A bug in the hand is better than one as yet undetected
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]