axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: Changing WDSDL2Java symbol table slightly (was: Re: cvs commit: xml-axis/java/test/wsdl/attachments mime.wsdl)
Date Fri, 02 Aug 2002 14:01:27 GMT
No Obejections from me...

Thanks,
dims
--- butek@us.ibm.com wrote:
> This note is particularly for dims, but anyone who uses the symbol table
> from WSDL2Java might be affected.  There are a couple notes from my recent
> commit like:
> 
> +        if (parms.returnType != null) {
> +            // Construct a Parameter for the return.
> +            // RJB NOTE:  The return info should really just be a
> Parameter
> +            //            rather than duplicating the same info on the
> +            //            Parameters object.
> +            Parameter returnParm = new Parameter();
> +            returnParm.setMIMEType(parms.returnMIMEType);
> +            returnParm.setType(parms.returnType);
> +            ret = Utils.getParameterTypeName(returnParm);
> +        }
> 
> Unless someone objects to my changing things on them, I want to change org.
> apache.axis.wsdl.symbolTable.Parameters.  I'll remove:
> 
>     public TypeEntry returnType = null;
>     public QName returnName = null;
>     public String returnMIMEType = null;
> 
> and replace it with:
> 
>     public Parameter returnParam = null;
> 
> And fix the rest of the code accordingly.
> 
> Any objections?
> 
> Russell Butek
> butek@us.ibm.com
> 
> 
> butek@apache.org on 08/02/2002 07:55:34 AM
> 
> Please respond to axis-dev@xml.apache.org
> 
> To:    xml-axis-cvs@apache.org
> cc:
> Subject:    cvs commit: xml-axis/java/test/wsdl/attachments mime.wsdl
> 
> 
> 
> butek       2002/08/02 05:55:34
> 
>   Modified:    java/src/org/apache/axis/description ParameterDesc.java
>                         ServiceDesc.java
>                java/src/org/apache/axis/providers/java RPCProvider.java
>                java/src/org/apache/axis/utils JavaUtils.java
>                java/src/org/apache/axis/wsdl/symbolTable BindingEntry.java
>                         SymbolTable.java
>                java/src/org/apache/axis/wsdl/toJava
>                         JavaGeneratorFactory.java JavaSkelWriter.java
>                         JavaStubWriter.java JavaTestCaseWriter.java
>                         Utils.java
>                java/test/wsdl/attachments mime.wsdl
>   Log:
>   One more small step toward full attachment support.  WSDL2Java now
>   supports javax.mail.internet.MimeMultipart.
> 
>   Revision  Changes    Path
>   1.16      +5 -2      xml-
>   axis/java/src/org/apache/axis/description/ParameterDesc.java
> 
>   Index: ParameterDesc.java
>   ===================================================================
>   RCS file: /home/cvs/xml-
>   axis/java/src/org/apache/axis/description/ParameterDesc.java,v
>   retrieving revision 1.15
>   retrieving revision 1.16
>   diff -u -r1.15 -r1.16
>   --- ParameterDesc.java      26 Jul 2002 14:57:48 -0000    1.15
>   +++ ParameterDesc.java      2 Aug 2002 12:55:33 -0000     1.16
>   @@ -140,8 +140,11 @@
>                                             "INOUT" : "OUT:  "
>                                             + "position:" + order) + "\n";
>            text+=indent + "isReturn:   " + isReturn + "\n";
>   -        text+=indent + "typeQName:  " + typeQName+ "\n";
>   -        text+=indent + "javaType:   " + javaType+ "\n";
>   +        text+=indent + "typeQName:  " + typeQName + "\n";
>   +        text+=indent + "javaType:   " + javaType + "\n";
>   +        if (mimeType != null) {
>   +            text+=indent + "MIMEType:   " + mimeType + "\n";
>   +        }
>            return text;
>        } // toString
> 
> 
> 
> 
>   1.44      +11 -1     xml-
>   axis/java/src/org/apache/axis/description/ServiceDesc.java
> 
>   Index: ServiceDesc.java
>   ===================================================================
>   RCS file: /home/cvs/xml-
>   axis/java/src/org/apache/axis/description/ServiceDesc.java,v
>   retrieving revision 1.43
>   retrieving revision 1.44
>   diff -u -r1.43 -r1.44
>   --- ServiceDesc.java  29 Jul 2002 19:20:50 -0000    1.43
>   +++ ServiceDesc.java  2 Aug 2002 12:55:33 -0000     1.44
>   @@ -586,7 +586,9 @@
>                            // This is a match if the paramClass is somehow
>                            // convertable to the "real" parameter type.  If
>                            not,
>                            // break out of this loop.
>   -                        if (!JavaUtils.isConvertable(paramClass,
>   heldType)) {
>   +                        if (!JavaUtils.isConvertable(paramClass,
>   heldType) &&
>   +                                !isMimeConvertable(
>   +                                param.getMIMEType(), heldType)) {
>                                break;
>                            }
>                        }
>   @@ -623,6 +625,14 @@
>                syncOperationToClass(oper, superClass);
>            }
>        }
>   +
>   +    /**
>   +     * Is this is a MIME type and is it convertible to the given type?
>   +     */
>   +    private boolean isMimeConvertable(String mimeType, Class cls) {
>   +        return mimeType != null &&
>   +                cls.getName().equals(JavaUtils.mimeToJava(mimeType));
>   +    } // isMimeConvertable
> 
>        /**
>         * Fill in a service description by introspecting the implementation
> 
> 
> 
>   1.81      +10 -0     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.80
>   retrieving revision 1.81
>   diff -u -r1.80 -r1.81
>   --- RPCProvider.java  26 Jul 2002 14:57:48 -0000    1.80
>   +++ RPCProvider.java  2 Aug 2002 12:55:33 -0000     1.81
>   @@ -59,6 +59,7 @@
>    import org.apache.axis.Constants;
>    import org.apache.axis.MessageContext;
>    import org.apache.axis.attachments.AttachmentPart;
>   +import org.apache.axis.attachments.MimeMultipartDataSource;
>    import org.apache.axis.attachments.PlainTextDataSource;
>    import org.apache.axis.enum.Style;
>    import org.apache.axis.description.OperationDesc;
>   @@ -77,6 +78,7 @@
>    import org.apache.commons.logging.Log;
> 
>    import javax.activation.DataHandler;
>   +import javax.mail.internet.MimeMultipart;
>    import javax.xml.namespace.QName;
>    import javax.xml.rpc.holders.Holder;
>    import java.lang.reflect.Method;
>   @@ -331,6 +333,10 @@
>                        objRes = new DataHandler(new PlainTextDataSource(
>                                "ret", (String) objRes));
>                    }
>   +                else if (mimeType.startsWith("multipart/")) {
>   +                    objRes = new DataHandler(new
>   MimeMultipartDataSource(
>   +                            "ret", (MimeMultipart) objRes));
>   +                }
>                }
>                RPCParam param = new RPCParam(returnQName, objRes);
>                param.setParamDesc(operation.getReturnParamDesc());
>   @@ -351,6 +357,10 @@
>                        if (mimeType.equals("text/plain")) {
>                            value = new DataHandler(
>                                    new PlainTextDataSource("out", (String)
>                                    value));
>   +                    }
>   +                    else if (mimeType.startsWith("multipart/")) {
>   +                        value = new DataHandler(new
>   MimeMultipartDataSource(
>   +                                "out", (MimeMultipart) value));
>                        }
>                    }
>                    param.setValue(value);
> 
> 
> 
>   1.62      +29 -3     xml-axis/java/src/org/apache/axis/utils/JavaUtils.
>   java
> 
>   Index: JavaUtils.java
>   ===================================================================
>   RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/JavaUtils.
>   java,v
>   retrieving revision 1.61
>   retrieving revision 1.62
> 
=== message truncated ===


=====
Davanum Srinivas - http://xml.apache.org/~dims/

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

Mime
View raw message