Michael, If you are setting the soap fault correctly on your server side, your java client when it receives the soap response back with the soap fault in it, should automatically throw an exception. You can then retrieve the exception using ex.message.
May be someone from the Axis2 team can correct me if I am wrong. Subra On Nov 12, 2007 4:05 AM, Michael Sutter <[EMAIL PROTECTED]> wrote: > Hello Senaka, > > sorry but I don't understand what you mean. Did you said that the custom > error message I produce in my service is written to the log file of the > server? I think this is not so - in my log file there is nothing from my > message and the log level is set to debug. Otherwise how should I access > the log file of my server from the java client? Both are running on > different hosts and so I think it is normally not possible to access the > log file. Only if both hosts have a shared file system. > > The only thing I want is to get a custom error message from the service > - like a exception thrown in Java. Maybe there exists better ways and > anybody can tell me? > > Regards > Michael > > [EMAIL PROTECTED] wrote: > > Hi Michael, > > > > As far as I know, the error(s) that you set, gets written in the log file > > that you specify when you instantiate your service. This file can be found > > inside the deploy/logs folder. You can open this file in your java client. > > Basically, you could do a pattern matching in Java and locate the message > > appearing after the error tag. You can then process the message and do > > what ever you want. > > > > This is one method that you could use and it is guaranteed to work. I do > > not know whether there are any other methods that would solve your > > problem, and therefore, this may not be the only method. > > > > Hope this helps. > > > > Regards, > > > > Senaka. > > > > > > >> Hello, > >> > >> I habe a problem with a c server and a Java client. I want to return > >> custom error messages from the c service. So I implemented in my service > >> as told in Jira AXIS2C-678 > >> (https://issues.apache.org/jira/browse/AXIS2C-678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel) > >> and it works fine. The problem is now how I can get the error message in > >> a Java Client? I found no methods to call in the classes. Has anybody a > >> solution? > >> > >> Kind regards > >> Michael > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
