Hmm.... you hit a bug, but probably not the one you expect. Per spec, Oneway operations CANNOT throw a fault. Thus, the bug that you hit is that the generated wsdl is generating faults for oneway operations. That's wrong.
Dan On Tue June 16 2009 8:56:10 am [email protected] wrote: > Hi, > > Im using apache cxf (version - 2.2.1) to implement web-service on server > side,. but now im > facing problem regaring exception. > On server side i thorow an exception but this is not retrieved on client > side., the client just invokes the method and return > as normal., no error is repported either on server or client log. , > > > I have used gentool to generate code from wsdl to java, did anybody have > the same problem? > > service: > @Oneway > @RequestWrapper(localName = "createDivision", targetNamespace = > "valid-namespace", className = "operationRequest") > @WebMethod > public void operationRequest( > @WebParam(name = "division", targetNamespace = "") > operationRequest > ) throws FaultMsg; > > > --------------- > > FaultMsg.java class > @WebFault(name = "faultMsg", > targetNamespace = "valid-namespace") > public class FaultMsg extends Exception { > > > --------------- > > wsdl: > > <wsdl:operation name="operationRequest"> > <soap:operation soapAction="" style="document"/> > − > <wsdl:input name="operationRequest"> > <soap:body use="literal"/> > </wsdl:input> > − > <wsdl:fault name="FaultMsg"> > <soap:fault name="FaultMsg" use="literal"/> > </wsdl:fault> > </wsdl:operation> > > faultMsg type: > − > <xs:complexType name="FaultMsg"> > − > <xs:sequence> > <xs:element name="errorCode" type="tns:ErrorCode"/> > <xs:element minOccurs="0" name="description" type="xs:string"/> > </xs:sequence> > </xs:complexType> > − > <xs:simpleType name="ErrorCode"> > − > <xs:restriction base="xs:string"> > > <xs:enumeration value="INVALID_ARGUMENT"/> > </xs:restriction> > </xs:simpleType> -- Daniel Kulp [email protected] http://www.dankulp.com/blog
