please try with a nightly build. I think I fixed this issue some times back.
thanks, Amila. On Tue, Mar 2, 2010 at 5:34 PM, Robert Hecht <robert.he...@gmx.at> wrote: > Hi, > > I’m using a WSDL which defines several fault messages that use the same xsd > type. If I generate server skeleton and client stubs with ADB, I can throw > an exception in the server, but the client stub does not recognize the type > and wraps it in a RemoteException. > > The structure of the WSDL is like this: > > … > <types> > <xsd:schema …> > … > <xsd:element name=”FaultType”> > … > </xsd:element> > </xsd:schema> > </types> > <wsdl:message name=”Op1_fault”> > <wsdl:part element=”tns:FaultType” name=”parameters”/> > </wsdl:message> > <wsdl:message name=”Op2_fault”> > <wsdl:part element=”tns:FaultType” name=”parameters”/> > </wsdl:message> > > <wsdl:portType name=”MyService”> > <wsdl:operation name=”Op1”> > <wsdl:input message=”…”/> > <wsdl:output message=”…”/> > <wsdl:fault message=”tns:Op1_fault” > name=”fault”/> > </wsdl:operation> > <wsdl:operation name=”Op2”> > <wsdl:input message=”…”/> > <wsdl:output message=”…”/> > <wsdl:fault message=”tns:Op2_fault” > name=”fault”/> > </wsdl:operation> > </wsdl:portType> > … > > The problem is that the generated Stub class (in the method Op1) uses a Map > where the class of the internal exception type (FaultType) is the key and > the name of the external Type (e.g. Op2_fault) is the value. But in my case > the internal type is always the same, so the mapping fails. Later there is a > check if the generated Exception is actually declared by the method (this > check fails, because the method declares Op1_fault, but an Op2_fault was > actually instantiated). If not, the Exception is wrapped in a > RemoteException. > > Now I wrote client code that catches the Op1_fault, but not > RemoteException. But this code is never called because of the problem > described above. > > Is there a solution for this problem (other than editing the generated code > or changing the WSDL)? > > Thanks in advance, > Robert > > -- > GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org > For additional commands, e-mail: java-user-h...@axis.apache.org > > -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/