1 Reply Latest reply on Mar 18, 2009 5:00 AM by erahamim

    Cannot obtain fault type for elemet

      Hi,
      I have just migrate from jboss 4.0.5 to jboss 4.2.3.
      In the new jboss I'm getting the following warning on my web services:
      JAXRPCMetaDataBuilder - Cannot obtain fault type for element: {http://www.opentv.co.il}TriggerException.

      TriggerException is an exception that is thrown from a number of web services in a different packages.

      I found out that if I duplicate the exception class and place it in the package of each web service the warning stop.

      Is there any other way to do it?
      I have lots of web services but I want to use only single class.

      Thanks,
      Eyal.


        • 1. Re: Cannot obtain fault type for elemet

          Adding more details:

          My exception is:

          package com.company.Exceptions
          public class TriggerException extends Exception{
           private String msgName;
           public TriggerException() {
           }
          public String getMsgName() {
           return msgName;
           }
           public void setMsgName(String msgName) {
           this.msgName = msgName;
           }
          }
          


          My endpoint service (ejb 2.1)

          
          package com.company.rundownEx.ejb;
          
          public interface RundownEx extends Remote{
           Data getData(long Id) throws TriggerException, RemoteException;
          }
          


          implementation

          package com.company.rundownEx.ejb;
          
          public class RundownExBean implements SessionBean {
          
           public Data getData (long in) throws TriggerException{
           try{
          
           // do something
           }
           // ENTRY_POINT_CATCH_START
           catch(Exception rte){
           // ENTRY_POINT_CATCH_END
          
           throw new TriggerException (); }
           }
          }
          



          My configuration xml for wstool:

          <configuration>
           <java-wsdl>
           <service name="RundownExService" style="document" endpoint="com.company.rundownEx.ejb.RundownEx" />
           <namespaces target-namespace="http://www.opentv.co.il" type-namespace="http://www.opentv.co.il/types" />
           <mapping file="RundownEx-mapping.xml"/>
           <webservices ejb-link="RundownExService" append="true"/>
           </java-wsdl>
          </configuration>
          


          When I try to generate client with eclipse I'm getting the following error:

          Error in generating Java from WSDL: java.io.IOException: Element {http://www.opentv.co.il}TriggerException is referenced but not defined.
          java.io.IOException: Element {http://www.opentv.co.il}TriggerException is referenced but not defined.


          Can anyone help?