You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Bobby Lawrence (JIRA)" <ax...@ws.apache.org> on 2005/04/04 20:45:20 UTC

[jira] Commented: (AXIS-1909) Fault returned from server, but not thrown by org.apache.axis.client.Call.invokeEngine

     [ http://issues.apache.org/jira/browse/AXIS-1909?page=comments#action_62129 ]
     
Bobby Lawrence commented on AXIS-1909:
--------------------------------------

The only workaround I have found for this (besides creating my own call object and removing the OperationDec checking) is to create my own SOAPConnection object and explicitly set the return type of the call to something other than javax.xml.soap.SOAPMessage.class
For my purposes, I use a boolean return type so I call.setReturnType(boolean.class)

> Fault returned from server, but not thrown by org.apache.axis.client.Call.invokeEngine
> --------------------------------------------------------------------------------------
>
>          Key: AXIS-1909
>          URL: http://issues.apache.org/jira/browse/AXIS-1909
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>  Environment: Windows XP Pro, Java 1.4.2, Axis 1.2 RC3
>     Reporter: Bobby Lawrence

>
> I have a client that uploads data to the service.
> I wanted the ability to upload a single XML Document, so I wrote a method to do so using the SAAJ API.
> With the SAAJ API, you have to create a SOAPConnection and call its 'call' method.
> In the Axis implementation of this, it creates a Call object and invokes.
> The Call object internally calls the 'invokeEngine' method.
> Inside this method, there is a piece of code that checks to see if the returned object is a SOAPFault (below).  
> If we have a fault, the method throws an AxisFault if there are some things about the OperationDesc that it knows.
> I think that this OperationDesc checking needs to be removed and ALL faults should be thrown back up the exception chain.
> I had my client uploading a dateTime type with 'asgasdg' as the value of the element.  The server side deserialization threw a fault (java.lang.NumberFormatException: Invalid date/time), but the client just did nothing.  It looked to be that the client had completed its data upload processing and everything worked fine when in fact, it didn't upload anything and there was an error!
> if(operation == null || 
>    operation.getReturnClass() == null || 
>    operation.getReturnClass() != javax.xml.soap.SOAPMessage.class
>   ) {
>     //unless we don't care about the return value or we want
>     //a raw message back
>     //get the fault from the body and throw it
>     throw ((SOAPFault)respBody).getFault();
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira