users@jax-rpc.java.net

Re: custom exception

From: Doug Kohlert <Doug.Kohlert_at_Sun.COM>
Date: Fri, 16 Dec 2005 07:04:46 -0800

Can you include your custom exception class?

Amit Soni wrote:

> Hi all,
>
> Can any body guid me how to throw custom exception from my web service
> interface api. i.e. i have one or method
> wich throws custom exception in this case wscompile throws following
> exception:
>
> [wscompile] class java.lang.StackTraceElement does not have a public
> accessible empty constructor
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiStructure.initialize(RmiStructure.java:109)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiStructure.forClass(RmiStructure.java:32)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiStructure.modelTypeSOAP(RmiStructure.java:41)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiTypeModeler.collectMembers(RmiTypeModeler.java:204)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiTypeModeler.modelTypeSOAP(RmiTypeModeler.java:164)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiTypeModeler.modelTypeSOAP(RmiTypeModeler.java:107)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiTypeModeler.fillInStructure(RmiTypeModeler.java:668)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiTypeModeler.modelTypeSOAP(RmiTypeModeler.java:189)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.ExceptionModeler.createSOAPMember(ExceptionModeler.java:206)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.ExceptionModeler.addMessage(ExceptionModeler.java:239)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.ExceptionModeler.createFault(ExceptionModeler.java:126)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.ExceptionModelerBase.modelException(ExceptionModelerBase.java:91)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiModeler.processRpcEncodedMethod(RmiModeler.java:1079)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiModeler.processMethod(RmiModeler.java:838)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiModeler.processInterface(RmiModeler.java:748)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiModeler.modelPort(RmiModeler.java:683)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiModeler.buildEncodedModel(RmiModeler.java:523)
>
> [wscompile] at
> com.sun.xml.rpc.processor.modeler.rmi.RmiModeler.buildModel(RmiModeler.java:459)
>
> [wscompile] at
> com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:88)
> [wscompile] at
> com.sun.xml.rpc.processor.Processor.runModeler(Processor.java:63)
> [wscompile] at
> com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.java:714)
> [wscompile] at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43)
> [wscompile] at
> com.sun.xml.rpc.tools.ant.Wscompile.execute(Wscompile.java:746)
> [wscompile] at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> [wscompile] at org.apache.tools.ant.Task.perform(Task.java:364)
> [wscompile] at org.apache.tools.ant.Target.execute(Target.java:341)
> [wscompile] at
> org.apache.tools.ant.Target.performTasks(Target.java:369)
> [wscompile] at
> org.apache.tools.ant.Project.executeTarget(Project.java:1214)
> [wscompile] at
> org.apache.tools.ant.Project.executeTargets(Project.java:1062)
> [wscompile] at org.apache.tools.ant.Main.runBuild(Main.java:673)
> [wscompile] at org.apache.tools.ant.Main.startAnt(Main.java:188)
> [wscompile] at
> org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
> [wscompile] at
> org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> [wscompile] error: class java.lang.StackTraceElement does not have a
> public accessible empty constructor
>
> my wscompile task in ant is:
>
> <wscompile
> server="true"
> model="${build.ws.modelname}"
> optimize="false"
> debug="true"
> verbose="true"
> version="false"
> xPrintStackTrace="true"
> config="${config.ws.wsconfigfile}">
> <classpath>
> <path refid="project.classpath"/>
> <path refid="ws.classpath"/>
> </classpath>
> </wscompile>
>
> Thanks,
> Amit Soni
>
> ----------------------------------------------------------
> Netcore Solutions Pvt. Ltd.
> Website: http://www.netcore.co.in
> Spamtraps: http://cleanmail.netcore.co.in/directory.html
>
> Support FAQ : http://support.netcore.co.in/
> ----------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>

-- 
 - Doug