Hi Abhijat, The problem here is that you've got a service method which is declared to throw java.lang.Exception. Jibx2Wsdl assumes you're using Axis2 for the service implementation, and in order to work with Axis2 your service methods can only throw application-defined exceptions, and each such exception needs to incorporate a unique data object class. See http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/faults for the details of Axis2 Fault handling and how this relates to exceptions.
- Dennis Dennis M. Sosnoski SOA and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Abhijat Thakur wrote: > > Hi, > > I am new to JIBX and when i run the jibx2wsdl tool through Ant from > eclipse i get the error (No way to handle type 'java.lang.Exception' > ). Stack Trace is listed below. I have tried couple of things but > nothing had been successful. I would really appreciate any help or > direction in this regards. If there is another way of generating the > binding? > > My target in the build file looks something like > > <target name="generate-binding-wsdl" > > > <java classpathref="classpath" > > classname="org.jibx.ws.wsdl.Jibx2Wsdl" fork="true" failonerror="true"> > > <arg value="-p"/> > > <arg value="${src}/lib/classes"/> > > <arg value="-s"/> > > <arg value="${src}"/> > > <arg value="-t"/> > > <arg value="${build-wsdl}"/> > > <arg value="--strip-prefixes=m_"/> > > <arg value="com.corp.test.api.SoftwareVersion"/> > > </java> > > </target> > > *Error * > > [_echo_] Running Jibx2Wsdl tool > > [_java_] Exception in thread "main" _java.lang.IllegalStateException_: > No way to handle type 'java.lang.Exception' > > [_java_] at > org.jibx.binding.generator.BindingGenerator.expandReferences(_BindingGenerator.java:191_) > > [_java_] at > org.jibx.binding.generator.BindingGenerator.expandReferences(_BindingGenerator.java:194_) > > [_java_] at > org.jibx.binding.generator.BindingGenerator.findReferences(_BindingGenerator.java:983_) > > [_java_] at > org.jibx.binding.generator.BindingGenerator.generateSpecified(_BindingGenerator.java:1122_) > > [_java_] at org.jibx.ws.wsdl.Jibx2Wsdl.generate(_Jibx2Wsdl.java:484_) > > [_java_] at org.jibx.ws.wsdl.Jibx2Wsdl.main(_Jibx2Wsdl.java:588_) > > thanks > > abhi > > ------------------------------------------------------------------------ > This email and any files transmitted with it are confidential and are > intended solely for the use of the individual or entity to whom they > are addressed. This communication may contain material protected by > the attorney-client privilege. If you are not the intended recipient, > be advised that any use, dissemination, forwarding, printing or > copying is strictly prohibited. If you have received this email in > error, please contact the sender and delete all copies. > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > ------------------------------------------------------------------------ > > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users