axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Whitlock <>
Subject Fw: Regarding addAnyObject and getAnyObject
Date Fri, 11 Mar 2005 14:26:36 GMT

Hi James,
Answering your questions..

1) passing NULL to addAnyObject() is an application error. Even if the
parameter that is being passed in is nil, it still needs to be encoded in
an XML string. I think it is reasonable to sigsegv here. I thought we were
not intending to police all parameters on all calls.
1) getAnyObject called before Call::invoke is also an application error.
There are no output parameters since the web service hasn't been called
yet. Axis could return NULL, or we could leave it throwing a sigsegv.
2) getAnyObject called more than twice. All these get methods (that return
output data from the service) are calling the XML parser to parse forwards
through the SOAP message. So calling getAnyObject twice will not return the
same data. Here I think we should return NULL to say that there is no more
data to return, instead of throwing a sigsegv.
3) Call::checkMessage moves the XML parser forward, checking the name of
the response message. So getAnyObject expects that checkMessage has already
been called. So calling getAnyObject before checkMessage is probably also a
user error. But this is more subtle and not obvious. It would be better to
return NULL or throw an AxisException in this situation so returning a
better error message.

Have you tried getting a user soap fault using getAnyObject?

Please raise a JIRA to cover these issues,
Mark Whitlock

----- Forwarded by Mark Whitlock/UK/IBM on 11/03/2005 13:46 -----
             James Jose                                                    
             com>                                                       To 
             11/03/2005 10:21                                           cc 
             Please respond to         Regarding addAnyObject and          
              "Apache AXIS C           getAnyObject                        
             Developers List"                                              


   I am working on getAnyObject() and addAnyObject() APIs in Call class and
getting some
exceptions in following cases.

addAnyObject(AnyType *param)

1.if NULL is passed as argument.


 1. If getAnyObject() is called before m_pCall->invoke() method.
 2. If getAnyObject() is called more than  twice.
 3. For the following code getting AxisException...

    if (AXIS_SUCCESS == m_pCall->invoke())

                any= (AnyType*)m_pCall->getAnyObject();

                if(AXIS_SUCCESS == m_pCall->checkMessage("divResponse", "



Pls help me to sort out this issues..

James Jose
Messaging Clients Team, WMQDDC
IBM Software Labs, India
Direct: 91-80- 25094331  Ext :2331

View raw message