axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl/fromJava Emitter.java Types.java
Date Mon, 06 Jan 2003 22:25:00 GMT
gdaniels    2003/01/06 14:25:00

  Modified:    java/src/org/apache/axis/encoding TypeMappingImpl.java
               java/src/org/apache/axis/wsdl/fromJava Emitter.java
                        Types.java
  Log:
  Message-style services (like AdminService) weren't emitting very useful
  WSDL.  Now they emit xsd:anyType elements by default.  We should add
  the ability to embed particular schema into WSDD (or import it via a URL),
  and perhaps eventually even offer the option of validating against such
  schemas.  For now this works better.
  
  Revision  Changes    Path
  1.39      +2 -4      xml-axis/java/src/org/apache/axis/encoding/TypeMappingImpl.java
  
  Index: TypeMappingImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/TypeMappingImpl.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- TypeMappingImpl.java	20 Dec 2002 17:28:21 -0000	1.38
  +++ TypeMappingImpl.java	6 Jan 2003 22:25:00 -0000	1.39
  @@ -352,8 +352,7 @@
           }
   
           if (sf == null && delegate != null) {
  -            sf = (SerializerFactory)
  -                delegate.getSerializer(javaType, xmlType);
  +            sf = delegate.getSerializer(javaType, xmlType);
           }
           return sf;
       }
  @@ -471,8 +470,7 @@
           df = (javax.xml.rpc.encoding.DeserializerFactory) pair2DF.get(pair);
   
           if (df == null && delegate != null) {
  -            df = (javax.xml.rpc.encoding.DeserializerFactory)
  -                delegate.getDeserializer(javaType, xmlType);
  +            df = delegate.getDeserializer(javaType, xmlType);
           }
           return df;
       }
  
  
  
  1.82      +23 -5     xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- Emitter.java	20 Dec 2002 16:51:24 -0000	1.81
  +++ Emitter.java	6 Jan 2003 22:25:00 -0000	1.82
  @@ -1088,11 +1088,29 @@
           
           msg.setQName(qName);
           msg.setUndefined(false);
  -
  -        ArrayList parameters = oper.getParameters();
  -        for(int i=0; i<parameters.size(); i++) {
  -            ParameterDesc parameter = (ParameterDesc) parameters.get(i);
  -            writePartToMessage(def, msg, true, parameter);
  +        
  +        if (oper.getStyle() == Style.MESSAGE) {
  +            // If this is a MESSAGE-style operation, just write out
  +            // <xsd:any> for now.
  +            // TODO: Support custom schema in WSDD for these operations
  +            QName qname = oper.getElementQName();
  +            Element el = types.createElementDecl(qname.getLocalPart(),
  +                                                 Object.class,
  +                                                 Constants.XSD_ANYTYPE,
  +                                                 false, false);
  +            types.writeSchemaElement(qname, el);
  +            
  +            Part part = def.createPart();
  +            part.setName("part");
  +            part.setElementName(qname);
  +            msg.addPart(part);
  +        } else {
  +            // Otherwise, write parts for the parameters.
  +            ArrayList parameters = oper.getParameters();
  +            for(int i=0; i<parameters.size(); i++) {
  +                ParameterDesc parameter = (ParameterDesc) parameters.get(i);
  +                writePartToMessage(def, msg, true, parameter);
  +            }
           }
   
           return msg;
  
  
  
  1.69      +1 -1      xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java
  
  Index: Types.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- Types.java	20 Dec 2002 16:51:24 -0000	1.68
  +++ Types.java	6 Jan 2003 22:25:00 -0000	1.69
  @@ -490,7 +490,7 @@
        * @param qName qname of the type
        */
       private void writeTypeNamespace(QName qName) {
  -        if (qName != null) {
  +        if (qName != null && !qName.getNamespaceURI().equals("")) {
               String pref = def.getPrefix(qName.getNamespaceURI());
               if (pref == null)
                   def.addNamespace(namespaces.getCreatePrefix(qName.getNamespaceURI()),
  
  
  

Mime
View raw message