Glen-
I just grabbed the new RPCProvider from CVS and patched it into my beta2 jar
file and it does the trick. Thanks for the help. Unfortunately, now I've
noticed another problem in beta 2 that may or may not be related to
RPCProvider. I'm trying to send an attachment using SwA, but I'm getting an
"java.lang.IllegalArgumentException: argument type mismatch" at
RPCProvider:226 since the method is expecting a DataHandler, but the actual
argument value is still an AttachmentPart. Do you know why the attachment
isn't being converted, and what might have changed from beta1 to beta2 to
cause this problem?
Thanks
-Jason

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 9:22 AM
To: [EMAIL PROTECTED]
Subject: cvs commit: xml-axis/java/src/org/apache/axis/providers/java
RPCProvider.java


gdaniels    02/05/10 06:22:00

  Modified:    java/src/org/apache/axis/providers/java RPCProvider.java
  Log:
  Remove "boxcarring" code to fix a bug and clean up RPCProvider
  semantics.  Note that a "BoxcarProvider" could easily be written to
  supply this functionality if desired.
  
  Fixes http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8782
  
  Revision  Changes    Path
  1.57      +58 -60
xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java
  
  Index: RPCProvider.java
  ===================================================================
  RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java,
v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- RPCProvider.java  9 May 2002 18:25:18 -0000       1.56
  +++ RPCProvider.java  10 May 2002 13:22:00 -0000      1.57
  @@ -112,12 +112,10 @@
               log.debug(JavaUtils.getMessage("bodyIs00", "" +
bodies.get(0)));
           }
   
  -        /* Loop over each entry in the SOAPBody - each one is a different
*/
  -        /* RPC call.
*/
  -
/******************************************************************/
  -        for ( int bNum = 0 ; bNum < bodies.size() ; bNum++ ) {
  -            RPCElement   body;
  +        RPCElement   body = null;
   
  +        // Find the first "root" body element, which is the RPC call.
  +        for ( int bNum = 0 ; body == null && bNum < bodies.size() ;
bNum++ ) {
               // If this is a regular old SOAPBodyElement, and it's a root,
               // we're probably a non-wrapped doc/lit service.  In this
case,
               // we deserialize the element, and create an RPCElement
"wrapper"
  @@ -137,67 +135,67 @@
                                                 operation.getName(),
                                                 new Object [] { val });
                       }
  -                    else continue;
  -                } else {
  -                    continue;
                   }
               } else {
                   body = (RPCElement) bodies.get( bNum );
               }
  +        }
   
  -            String methodName = body.getMethodName();
  -            Vector args = body.getParams();
  -            int numArgs = args.size();
  -
  -            // This may have changed, so get it again...
  -            // FIXME (there should be a cleaner way to do this)
  -            operation = msgContext.getOperation();
  -
  -            if (operation == null) {
  -                QName qname = new QName(body.getNamespaceURI(),
  -                                        body.getName());
  -                operation =
serviceDesc.getOperationByElementQName(qname);
  -            }
  -
  -            if (operation == null) {
  -                throw new
AxisFault(JavaUtils.getMessage("noSuchOperation",
  -                                                         methodName));
  -            }
  -
  -            // Create the array we'll use to hold the actual parameter
  -            // values.  We know how big to make it from the metadata.
  -            Object[]     argValues  =  new Object
[operation.getNumParams()];
  -
  -            // A place to keep track of the out params (INOUTs and OUTs)
  -            ArrayList outs = new ArrayList();
  -
  -            // Put the values contained in the RPCParams into an array
  -            // suitable for passing to java.lang.reflect.Method.invoke()
  -            // Make sure we respect parameter ordering if we know about
it
  -            // from metadata, and handle whatever conversions are
necessary
  -            // (values -> Holders, etc)
  -            if ( args != null && args.size() > 0 ) {
  -                for ( int i = 0 ; i < numArgs ; i++ ) {
  -                    RPCParam rpcParam = (RPCParam)args.get(i);
  -                    Object value = rpcParam.getValue();
  -                    ParameterDesc paramDesc = rpcParam.getParamDesc();
  -                    if (paramDesc != null && paramDesc.getJavaType() !=
null) {
  -                        value = JavaUtils.convert(value,
  -
paramDesc.getJavaType());
  -                        rpcParam.setValue(value);
  -                        if (paramDesc.getMode() == ParameterDesc.INOUT)
  -                            outs.add(rpcParam);
  -                    }
  -                    if (paramDesc == null || paramDesc.getOrder() == -1)
{
  -                        argValues[i]  = value;
  -                    } else {
  -                        argValues[paramDesc.getOrder()] = value;
  -                    }
  +        if (body == null) {
  +            // throw something
  +        }
  +        String methodName = body.getMethodName();
  +        Vector args = body.getParams();
  +        int numArgs = args.size();
  +
  +        // This may have changed, so get it again...
  +        // FIXME (there should be a cleaner way to do this)
  +        operation = msgContext.getOperation();
  +
  +        if (operation == null) {
  +            QName qname = new QName(body.getNamespaceURI(),
  +                                    body.getName());
  +            operation = serviceDesc.getOperationByElementQName(qname);
  +        }
  +
  +        if (operation == null) {
  +            throw new AxisFault(JavaUtils.getMessage("noSuchOperation",
  +                                                     methodName));
  +        }
  +
  +        // Create the array we'll use to hold the actual parameter
  +        // values.  We know how big to make it from the metadata.
  +        Object[]     argValues  =  new Object [operation.getNumParams()];
  +
  +        // A place to keep track of the out params (INOUTs and OUTs)
  +        ArrayList outs = new ArrayList();
  +
  +        // Put the values contained in the RPCParams into an array
  +        // suitable for passing to java.lang.reflect.Method.invoke()
  +        // Make sure we respect parameter ordering if we know about it
  +        // from metadata, and handle whatever conversions are necessary
  +        // (values -> Holders, etc)
  +        if ( args != null && args.size() > 0 ) {
  +            for ( int i = 0 ; i < numArgs ; i++ ) {
  +                RPCParam rpcParam = (RPCParam)args.get(i);
  +                Object value = rpcParam.getValue();
  +                ParameterDesc paramDesc = rpcParam.getParamDesc();
  +                if (paramDesc != null && paramDesc.getJavaType() != null)
{
  +                    value = JavaUtils.convert(value,
  +                                              paramDesc.getJavaType());
  +                    rpcParam.setValue(value);
  +                    if (paramDesc.getMode() == ParameterDesc.INOUT)
  +                        outs.add(rpcParam);
  +                }
  +                if (paramDesc == null || paramDesc.getOrder() == -1) {
  +                    argValues[i]  = value;
  +                } else {
  +                    argValues[paramDesc.getOrder()] = value;
  +                }
   
  -                    if (log.isDebugEnabled()) {
  -                        log.debug("  " + JavaUtils.getMessage("value00",
  -                            "" + argValues[i]) );
  -                    }
  +                if (log.isDebugEnabled()) {
  +                    log.debug("  " + JavaUtils.getMessage("value00",
  +                                                          "" +
argValues[i]) );
                   }
               }
   
  
  
  

Reply via email to