Details
Description
Procedure:
1) Create POJO service with non-returning function which throws an exception, e.g.:
public class ExampleService { public void testFunction(String something) throws Exception { throw new Exception("testing123"); }}
Include RPCInOnlyMessageReceiver & RPCMessageReceiver in <messageReceivers> tag (services.xml)
2) Check runtime-generated wsdl (e.g. ../axis2/services/ExampleService?wsdl)
3) Call testFunction() from client (e.g. PHP's SoapClient) via soap binding
4) Explicitly define testFunction() as "InOnly" in services.xml:
<operation name="testFunction"><messageReceiver class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" /></operation>
5) Repeat steps 2 & 3
Result:
2) <wsdl:fault> tag missing for both Soap (1.1 & 1.2) bindings (only appears for http)
3) Since wsdl doesn't contain fault tag for soap bindings, soap clients ignore the exception
5) <wsdl:fault> now appears for all bindings, as expected
Attachments
Issue Links
- relates to
-
AXIS2-5092 IN-only method custom exception return missing details
- Resolved