DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12758>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12758

Deserialization of complex classes throws SAXException





------- Additional Comments From [EMAIL PROTECTED]  2002-09-20 08:15 -------
After more investigation it seems to boil down to this:

In org.apache.axis.message.RPCHandler.onStartChild() there is a piece of code 
that attempts to locate a ParameterDesc depending on the QName of the 
OperationDesc or its position.  The piece of code that does this is (lines 197-
215):

        // If we have an operation descriptor, try to associate this parameter
        // with the appropriate ParameterDesc
        if (operation != null) {
            
            // Try by name first
            if (isResponse) {
                paramDesc = operation.getOutputParamByQName(qname);
            } else {
                paramDesc = operation.getInputParamByQName(qname);
            }
            
            // If that didn't work, try position
            // FIXME : Do we need to be in EITHER named OR positional
            //         mode?  I.e. will it screw us up to find something
            //         by position if we've already looked something up
            //         by name?  I think so...
            if (paramDesc == null) {
                paramDesc = operation.getParameter(params.size() - 1);
            }

Now, what I'm seeing is that the number of parameter descriptions is not 
matching up to the number of OUT parameters from the operation.  I'm pretty 
much out of my depth here, but my debug output gives at this point:

namespace: urn:uCustomerInfo
local name: TCustomerInfo
qname: {urn:uCustomerInfo}TCustomerInfo
prefix: NS2
operation: 'name:        null
returnQName: return
returnType:  {urn:uCustomerInfo}TCustomerInfo
returnClass: class com.touchcorp.soap.icustomer.TCustomerInfo
elementQName:null
soapAction:  null
style:       rpc
numInParams: 1
method:null
 ParameterDesc[0]:
  name:       Customer
  typeEntry:  null
  mode:       IN
  isReturn:   false
  typeQName:  {urn:uCustomerInfo}TCustomerInfo
  javaType:   class com.touchcorp.soap.icustomer.TCustomerInfo

'
type: {urn:uCustomerInfo}TCustomerInfo
is response: true
params: 
{org.apache.axis.message.RPCParam@f9db140,org.apache.axis.message.RPCParam@606b1
40}


But params.size() is 2.  Now getting the param by name fails (the qname seems 
to actually be the type qname) then getting by position fails then everything 
falls apart.

I have added a HACK to my code, just after the snippet above:

            //
            // This is a hack, but reduces the number of errors I see
            // nbrennan - 20/9/02
            //
            if (paramDesc == null && params.size() >= 2) {
                paramDesc = operation.getParameter(params.size() - 2);
            }

Which fixes my immediate problem, but displays no understanding at all of the 
underlying issues and may well get me into bad trouble soon.

If anyone who actually understands what's going on here could have a look at 
it, that would be excellent... (please)

Reply via email to