I suspect the problem is caused by your use of "throws Exception" on the 
methods. You can do custom exceptions in your web service class, but in 
order to be compatible with Axis2 they need to follow a particular 
model. I'll try to add better documentation in this area for the next 
release, but in the meantime you can see the examples/jibx2wsdl/example1 
code included in the JiBX distribution, where the AddDuplicateException 
is returned. The AddDuplicateData object is what provides the 
information which is transferred as a Fault. Basically, you need to use 
this model for any of your exceptions - an actual exception class, with 
a data object of whatever type you want that actually provides the Fault 
data.

  - Dennis

Dennis M. Sosnoski
XML 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



regist wrote:
> Hi,  
> I am experimenting a small application in formality web-service with jibx.  
> I have a problem, in the class that implements the server I have launched an
> exception however when to produce the file wsdl, with ant, jibx launches me
> an error message: " [echo] Running Jibx2Wsdl tool  
>      [java] Exception in thread "main" java.lang.IllegalStateException: No
> gives  
> object field found for exception class java.lang.Exception  
>      [java] at
> org.jibx.ws.wsdl.tools.custom.FaultCustom.apply(FaultCustom.java:147)  
>      [java] at
> org.jibx.ws.wsdl.tools.custom.WsdlCustom.forceFaultCustomization(WsdlCustom.java:151)
>   
>      [java] at org.jibx.ws.wsdl.tools.Jibx2Wsdl.generate(Jibx2Wsdl.java:465)  
>      [java] at org.jibx.ws.wsdl.tools.Jibx2Wsdl.main(Jibx2Wsdl.java:564)  
>   
> BUILD FAILED"  
> How can I resolve this problem?  
> Is it in the case I wanted to launch an exception personalized as I can do
> him/it?
>
> the problem is related to the method impostaViaggio in the class Agenzia, I
> attach the file Agenzia.java that implements the server.
>
> http://www.nabble.com/file/p23904684/Agenzia.java Agenzia.java 
>   

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to