tomj        02/02/27 07:50:11

  Modified:    java/src/org/apache/axis/wsdl/toJava JavaStubWriter.java
               java/src/org/apache/axis/encoding
                        DeserializationContextImpl.java
               java/src/org/apache/axis/client Call.java
  Log:
  More type mapping changes to support "" encodingStyle.
  Set encodingStyle before registering serializers in emitted stub code.
  Turn back on mapping Element types to serializers.
  
  Revision  Changes    Path
  1.35      +13 -3     
xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
  
  Index: JavaStubWriter.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- JavaStubWriter.java       27 Feb 2002 13:41:28 -0000      1.34
  +++ JavaStubWriter.java       27 Feb 2002 15:50:11 -0000      1.35
  @@ -199,6 +199,16 @@
               pw.println("            // the TypeMappingRegistry of the service, 
which");
               pw.println("            // is the reason why registration is only 
needed for the first call.");
               pw.println("            if (firstCall()) {");
  +            
  +            // Hack alert - we need to establish the encoding style before we 
register type mappings due
  +            // to the fact that TypeMappings key off of encoding style
  +            pw.println("                // must set encoding style before 
registering serializers");
  +            if (bEntry.hasLiteral()) {
  +                pw.println("                call.setEncodingStyle(null);");
  +            } else {
  +                pw.println("                
call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP_ENC);");
  +            }
  +            
               pw.println("                for (int i = 0; i < 
cachedSerFactories.size(); ++i) {");
               pw.println("                    Class cls = (Class) 
cachedSerClasses.get(i);");
               pw.println("                    javax.xml.rpc.namespace.QName qName =");
  @@ -392,9 +402,9 @@
               return;
           }
           
  -        if (type instanceof Element) {
  -            return;
  -        }
  +//        if (type instanceof Element) {
  +//            return;
  +//        }
           
           if ( firstSer ) {
               pw.println("            Class cls;" );
  
  
  
  1.13      +1 -1      
xml-axis/java/src/org/apache/axis/encoding/DeserializationContextImpl.java
  
  Index: DeserializationContextImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/DeserializationContextImpl.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DeserializationContextImpl.java   25 Feb 2002 17:38:15 -0000      1.12
  +++ DeserializationContextImpl.java   27 Feb 2002 15:50:11 -0000      1.13
  @@ -414,7 +414,7 @@
       public TypeMapping getTypeMapping()
       {
           TypeMappingRegistry tmr = msgContext.getTypeMappingRegistry();
  -        return (TypeMapping) tmr.getTypeMapping(Constants.URI_CURRENT_SOAP_ENC);
  +        return (TypeMapping) tmr.getTypeMapping(msgContext.getEncodingStyle());
           /* 
            * TODO: This code doesn't yet work, but we aren't looking up the right
            * TypeMapping by just using SOAP_ENC.
  
  
  
  1.83      +1 -1      xml-axis/java/src/org/apache/axis/client/Call.java
  
  Index: Call.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/client/Call.java,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- Call.java 27 Feb 2002 13:41:27 -0000      1.82
  +++ Call.java 27 Feb 2002 15:50:11 -0000      1.83
  @@ -1367,7 +1367,7 @@
               if (tm == null || tm == defaultTM ) {
                   tm = (TypeMapping) tmr.createTypeMapping();
                   tm.setSupportedNamespaces(new String[] {encodingStyle});
  -                tmr.register(msgContext.getEncodingStyle(), tm);
  +                tmr.register(encodingStyle, tm);
               }
               if (!force && tm.isRegistered(javaType, xmlType)) 
                   return;
  
  
  


Reply via email to