ws-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snic...@apache.org
Subject cvs commit: xml-soap/java/src/org/apache/soap/rpc RPCMessage.java
Date Wed, 06 Nov 2002 15:11:08 GMT
snichol     2002/11/06 07:11:08

  Modified:    java/samples/stringarray StringArrayClient.java
               java/src/org/apache/soap AttributeHandler.java Body.java
                        Envelope.java Fault.java Header.java
               java/src/org/apache/soap/encoding SOAPMappingRegistry.java
               java/src/org/apache/soap/encoding/soapenc
                        BeanSerializer.java SoapEncUtils.java
               java/src/org/apache/soap/rpc RPCMessage.java
  Log:
  Submitted by: Pavel Ausianik <Pavel_Ausianik@epam.com>
  
  I slightly updated latest Sanjiva's patch, with replacing single char
  strings to char + added more classes + concatenated Constant strings were
  possible (if all strings are constants, compiler will concatenate it
  itself).
  
  Revision  Changes    Path
  1.2       +2 -0      xml-soap/java/samples/stringarray/StringArrayClient.java
  
  Index: StringArrayClient.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/samples/stringarray/StringArrayClient.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringArrayClient.java	29 Jul 2002 17:32:21 -0000	1.1
  +++ StringArrayClient.java	6 Nov 2002 15:11:08 -0000	1.2
  @@ -148,6 +148,8 @@
   				Object value = (ret != null) ? ret.getValue() : null;
   			} else {
   				Fault fault = resp.getFault();
  +				System.err.println("Fault:");
  +				System.err.println(fault.toString());
   				faults++;
   			}
   
  
  
  
  1.7       +16 -12    xml-soap/java/src/org/apache/soap/AttributeHandler.java
  
  Index: AttributeHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/AttributeHandler.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AttributeHandler.java	14 Feb 2001 17:23:28 -0000	1.6
  +++ AttributeHandler.java	6 Nov 2002 15:11:08 -0000	1.7
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2000 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    if any, must include the following acknowledgment:
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
  @@ -26,7 +26,7 @@
    *
    * 4. The names "SOAP" and "Apache Software Foundation" must
    *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -212,12 +212,16 @@
       {
         QName attrQName = (QName)attrQNames.nextElement();
   
  -      sink.write(' ') ;
  -      String nsPrefix ;
  -      if ((nsPrefix = getPrefixFromURI(attrQName.getNamespaceURI())) != null)
  -        sink.write(nsPrefix + ':') ;
  -      sink.write(attrQName.getLocalPart() + "=\"" +
  -                 getAttribute(attrQName) + '\"');
  +      sink.write(' ');
  +      String nsPrefix;
  +      if ((nsPrefix = getPrefixFromURI(attrQName.getNamespaceURI())) != null) {
  +        sink.write(nsPrefix);
  +        sink.write(':');
  +      }
  +      sink.write(attrQName.getLocalPart());
  +      sink.write("=\"");
  +      sink.write(getAttribute(attrQName));
  +      sink.write('\"');
       }
     }
   
  @@ -247,9 +251,9 @@
   
       try
       {
  -      sw.write("{");
  +      sw.write('{');
         marshall(sw, new SOAPContext());
  -      sw.write("}");
  +      sw.write('}');
       }
       catch (Exception e)
       {
  
  
  
  1.9       +9 -7      xml-soap/java/src/org/apache/soap/Body.java
  
  Index: Body.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/Body.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Body.java	28 Jun 2002 03:07:36 -0000	1.8
  +++ Body.java	6 Nov 2002 15:11:08 -0000	1.9
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2000 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    if any, must include the following acknowledgment:
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
  @@ -26,7 +26,7 @@
    *
    * 4. The names "SOAP" and "Apache Software Foundation" must
    *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -126,7 +126,9 @@
       String soapEnvNSPrefix = attrHandler.getUniquePrefixFromURI(
         Constants.NS_URI_SOAP_ENV, Constants.NS_PRE_SOAP_ENV, nsStack);
   
  -    sink.write('<' + soapEnvNSPrefix + ':' + Constants.ELEM_BODY);
  +    sink.write('<');
  +    sink.write(soapEnvNSPrefix);
  +    sink.write( ':' + Constants.ELEM_BODY);
   
       // Serialize any body attributes.
       attrHandler.marshall(sink, ctx);
  @@ -142,7 +144,7 @@
           if (obj instanceof Bean)
           {
             Bean bodyEntry = (Bean) obj;
  -          
  +
             if (Serializer.class.isAssignableFrom(bodyEntry.type))
             {
               ((Serializer)bodyEntry.value).marshall(actualEncStyle,
  @@ -164,7 +166,7 @@
           {
             Utils.marshallNode((Element)obj, sink);
           }
  -        else 
  +        else
           {
             throw new IllegalArgumentException("Unknown type of body entry: '" +
                                                obj.getClass () + "'");
  
  
  
  1.11      +7 -3      xml-soap/java/src/org/apache/soap/Envelope.java
  
  Index: Envelope.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/Envelope.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Envelope.java	11 Oct 2002 15:02:04 -0000	1.10
  +++ Envelope.java	6 Nov 2002 15:11:08 -0000	1.11
  @@ -177,7 +177,9 @@
       // Write XML declaration
       sink.write(Constants.XML_DECL);
   
  -    sink.write('<' + soapEnvNSPrefix + ':' + Constants.ELEM_ENVELOPE);
  +    sink.write('<');
  +    sink.write(soapEnvNSPrefix);
  +    sink.write(':' + Constants.ELEM_ENVELOPE);
   
       // Serialize any envelope attributes.
       attrHandler.marshall(sink, ctx);
  @@ -215,7 +217,9 @@
         }
       }
   
  -    sink.write("</" + soapEnvNSPrefix + ':' + Constants.ELEM_ENVELOPE +
  +    sink.write("</");
  +    sink.write(soapEnvNSPrefix);
  +    sink.write(':' + Constants.ELEM_ENVELOPE +
                  '>' + StringUtils.lineSeparator);
     }
   
  @@ -308,7 +312,7 @@
                                              "must be: '" +
                                              Constants.Q_ELEM_ENVELOPE +
                                              "', not '" + root.getNamespaceURI() +
  -                                           ":" + localName + 
  +                                           ":" + localName +
                                              "' (" + root.getNodeName() +
                                              ").");
         }
  
  
  
  1.11      +12 -7     xml-soap/java/src/org/apache/soap/Fault.java
  
  Index: Fault.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/Fault.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Fault.java	18 Oct 2002 13:52:30 -0000	1.10
  +++ Fault.java	6 Nov 2002 15:11:08 -0000	1.11
  @@ -188,18 +188,21 @@
       attrHandler.marshall(sink, ctx);
   
       sink.write('>' + StringUtils.lineSeparator +
  -               '<' + Constants.ELEM_FAULT_CODE + '>' + Utils.cleanString(faultCode)
+
  -               "</" + Constants.ELEM_FAULT_CODE + '>' +
  +               '<' + Constants.ELEM_FAULT_CODE + '>');
  +    sink.write(Utils.cleanString(faultCode));
  +    sink.write("</" + Constants.ELEM_FAULT_CODE + '>' +
                  StringUtils.lineSeparator +
  -               '<' + Constants.ELEM_FAULT_STRING + '>' + Utils.cleanString(faultString)
+
  -               "</" + Constants.ELEM_FAULT_STRING + '>' +
  +               '<' + Constants.ELEM_FAULT_STRING + '>');
  +    sink.write(Utils.cleanString(faultString));
  +    sink.write("</" + Constants.ELEM_FAULT_STRING + '>' +
                  StringUtils.lineSeparator);
   
       // Generate the <faultactor> element if a value is present.
       if (faultActorURI != null)
       {
  -      sink.write('<' + Constants.ELEM_FAULT_ACTOR + '>' + Utils.cleanString(faultActorURI)
+
  -                 "</" + Constants.ELEM_FAULT_ACTOR + '>' +
  +      sink.write('<' + Constants.ELEM_FAULT_ACTOR + '>');
  +      sink.write(Utils.cleanString(faultActorURI));
  +      sink.write("</" + Constants.ELEM_FAULT_ACTOR + '>' +
                    StringUtils.lineSeparator);
       }
   
  @@ -276,7 +279,9 @@
         }
       }
   
  -    sink.write("</" + soapEnvNSPrefix + ':' + Constants.ELEM_FAULT + '>' +
  +    sink.write("</");
  +    sink.write(soapEnvNSPrefix);
  +    sink.write(':' + Constants.ELEM_FAULT + '>' +
                  StringUtils.lineSeparator);
   
       nsStack.popScope();
  
  
  
  1.5       +6 -3      xml-soap/java/src/org/apache/soap/Header.java
  
  Index: Header.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/Header.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Header.java	8 Jan 2001 12:25:11 -0000	1.4
  +++ Header.java	6 Nov 2002 15:11:08 -0000	1.5
  @@ -121,7 +121,9 @@
       // and serialize the header entries.
       if (headerEntries != null)
       {
  -      sink.write('<' + soapEnvNSPrefix + ':' + Constants.ELEM_HEADER);
  +      sink.write('<');
  +      sink.write(soapEnvNSPrefix);
  +      sink.write(':' + Constants.ELEM_HEADER);
   
         // Serialize any header attributes.
         attrHandler.marshall(sink, ctx);
  @@ -138,8 +140,9 @@
           sink.write(StringUtils.lineSeparator);
         }
   
  -      sink.write("</" + soapEnvNSPrefix + ':' + Constants.ELEM_HEADER +
  -                 '>' + StringUtils.lineSeparator);
  +      sink.write("</");
  +      sink.write(soapEnvNSPrefix);
  +      sink.write(':' + Constants.ELEM_HEADER + '>' + StringUtils.lineSeparator);
       }
   
       nsStack.popScope();
  
  
  
  1.33      +23 -20    xml-soap/java/src/org/apache/soap/encoding/SOAPMappingRegistry.java
  
  Index: SOAPMappingRegistry.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/encoding/SOAPMappingRegistry.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- SOAPMappingRegistry.java	28 Oct 2002 16:50:53 -0000	1.32
  +++ SOAPMappingRegistry.java	6 Nov 2002 15:11:08 -0000	1.33
  @@ -90,7 +90,7 @@
     private String schemaURI;
   
     private static String soapEncURI = Constants.NS_URI_SOAP_ENC;
  -  
  +
     private static QName arrayQName = new QName(soapEncURI, "Array");
   
     // create all the standard serializers/deserializers as static vars.
  @@ -118,13 +118,13 @@
     private static CalendarSerializer calSer = new CalendarSerializer();
     private static UrTypeDeserializer objDeser = new UrTypeDeserializer();
     public static MimePartSerializer partSer = new MimePartSerializer();
  -  
  +
     /**
      * The following stuff is here to deal with the slight differences
      * between 1999 schema and 2000/10 schema.  This system allows us to
      * register type mappings for both sets of QNames, and to default to
      * whichever one is set as current.
  -   * 
  +   *
      * !!! The order of the elements in these arrays is critical.  Be
      *     careful when editing.
      */
  @@ -155,7 +155,7 @@
       Constants.object1999QName,
       Constants.object1999QName,
     };
  -  
  +
     private static QName schema2000QNames [] = {
       Constants.string2000QName,
       Constants.int2000QName,
  @@ -183,7 +183,7 @@
       Constants.object2000QName,
       Constants.object2000QName,
     };
  -  
  +
     private static QName schema2001QNames [] = {
       Constants.string2001QName,
       Constants.int2001QName,
  @@ -267,8 +267,11 @@
                                                nsStack,
                                                xjmr,
                                                ctx);
  -        
  -        sink.write(Utils.cleanString(src.toString()) + "</" + context + '>');
  +
  +        sink.write(Utils.cleanString(src.toString()));
  +        sink.write("</");
  +        sink.write(context.toString());
  +        sink.write('>');
         }
         nsStack.popScope();
       }
  @@ -305,7 +308,7 @@
           sink.write(src.toString ());
           sink.write("</");
           sink.write(context.toString ());
  -        sink.write(">");
  +        sink.write('>');
         }
         nsStack.popScope();
       }
  @@ -379,7 +382,7 @@
   
       /**
        * This constructor takes a "parent" registry as a base registry.
  -     * Lookup requests cascade up to the parent while registration 
  +     * Lookup requests cascade up to the parent while registration
        * requests stay here.
        */
       public SOAPMappingRegistry(SOAPMappingRegistry parent)
  @@ -412,18 +415,18 @@
       }
   
     /**
  -   * Return the singleton registry instance configured for the 
  +   * Return the singleton registry instance configured for the
      * indicated schema URI. If the schemaURI is unrecognized, the
      * 2001 base registry is returned.
      */
     public static SOAPMappingRegistry getBaseRegistry (String schemaURI) {
       synchronized (SOAPMappingRegistry.class) {
         if (baseReg1999 == null) {
  -	baseReg1999 = 
  +	baseReg1999 =
   	  new SOAPMappingRegistry (null, Constants.NS_URI_1999_SCHEMA_XSD);
  -	baseReg2000 = 
  +	baseReg2000 =
   	  new SOAPMappingRegistry (null, Constants.NS_URI_2000_SCHEMA_XSD);
  -	baseReg2001 = 
  +	baseReg2001 =
   	  new SOAPMappingRegistry (null, Constants.NS_URI_2001_SCHEMA_XSD);
         }
       }
  @@ -482,14 +485,14 @@
       } else {
         if (!schemaURI.equals(Constants.NS_URI_2001_SCHEMA_XSD)) {
   	System.err.println("WARNING: Unrecognized Schema URI '" + schemaURI +
  -			   "' specified.  Defaulting to '" + 
  +			   "' specified.  Defaulting to '" +
   			   Constants.NS_URI_2001_SCHEMA_XSD + "'.");
         }
         mapSchemaTypes(schema1999QNames, false);
         mapSchemaTypes(schema2000QNames, false);
         schemaQNames = schema2001QNames;
       }
  -    
  +
       // map the ones that I want to do read-write with
       mapSchemaTypes(schemaQNames, true);
   
  @@ -505,7 +508,7 @@
                Parameter.class, xmlParamSer, xmlParamSer);
   
       try {
  -      Class XMISerializer = 
  +      Class XMISerializer =
           Class.forName("org.apache.soap.util.xml.XMISerializer");
         Class XMIParameterSerializer =
           Class.forName("org.apache.soap.encoding.xmi.XMIParameterSerializer");
  @@ -616,7 +619,7 @@
       base64QName = new QName(soapEncURI, "base64");
       mapTypes(soapEncURI, base64QName, byte[].class, base64Ser, base64Ser);
     }
  -  
  +
     /**
      * Map a set of schema types defined in the arrays above.  If
      * the "serialize" arg is set to true, we'll map the serializer
  @@ -624,13 +627,13 @@
      * otherwise we just do deserializers.
      */
     private void mapSchemaTypes(QName [] schemaQNames, boolean serialize)
  -  {    
  +  {
       for (int i = 0; i < schemaQNames.length; i++) {
         QName qName = schemaQNames[i];
         Class cls = classes[i];
         Serializer ser = serialize ? serializers[i] : null;
         Deserializer dser = deserializers[i];
  -      
  +
         mapTypes(soapEncURI, qName, cls, ser, dser);
       }
     }
  @@ -710,7 +713,7 @@
       }
       if (parent != null) {
         ds = parent.queryDeserializer_(elementType, encodingStyleURI);
  -      if (ds != null) { 
  +      if (ds != null) {
           return ds;
         }
       }
  
  
  
  1.10      +5 -5      xml-soap/java/src/org/apache/soap/encoding/soapenc/BeanSerializer.java
  
  Index: BeanSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/encoding/soapenc/BeanSerializer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BeanSerializer.java	28 Oct 2002 16:50:53 -0000	1.9
  +++ BeanSerializer.java	6 Nov 2002 15:11:08 -0000	1.10
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2000 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    if any, must include the following acknowledgment:
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
  @@ -26,7 +26,7 @@
    *
    * 4. The names "SOAP" and "Apache Software Foundation" must
    *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -142,7 +142,7 @@
   
       sink.write("</");
       sink.write(context.toString ());
  -    sink.write(">");
  +    sink.write('>');
   
       nsStack.popScope();
     }
  
  
  
  1.18      +22 -33    xml-soap/java/src/org/apache/soap/encoding/soapenc/SoapEncUtils.java
  
  Index: SoapEncUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/encoding/soapenc/SoapEncUtils.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SoapEncUtils.java	28 Oct 2002 16:50:53 -0000	1.17
  +++ SoapEncUtils.java	6 Nov 2002 15:11:08 -0000	1.18
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2000 The Apache Software Foundation.  All rights 
  + * Copyright (c) 2000 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -10,7 +10,7 @@
    * are met:
    *
    * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  + *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in
  @@ -18,7 +18,7 @@
    *    distribution.
    *
    * 3. The end-user documentation included with the redistribution,
  - *    if any, must include the following acknowledgment:  
  + *    if any, must include the following acknowledgment:
    *       "This product includes software developed by the
    *        Apache Software Foundation (http://www.apache.org/)."
    *    Alternately, this acknowledgment may appear in the software itself,
  @@ -26,7 +26,7 @@
    *
    * 4. The names "SOAP" and "Apache Software Foundation" must
    *    not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -164,18 +164,16 @@
         }
       }
   
  -    sink.write("<");
  +    sink.write('<');
       sink.write(context.toString());
       sink.write(namespaceDecl);
   
       // Write the id for a multiRef element
       if (context instanceof MultiRefContext) {
  -      sink.write(" ");
  -      sink.write(Constants.ATTR_ID);
  -      sink.write("=\"");
  -      sink.write(Constants.ATTRVAL_MULTIREF_ID_PREFIX);
  +      sink.write(' '+ Constants.ATTR_ID + "=\"" +
  +                 Constants.ATTRVAL_MULTIREF_ID_PREFIX);
         sink.write(((MultiRefContext) context).getId() + "");
  -      sink.write( "\"");
  +      sink.write( '\"');
       }
   
       // Get prefixes for the needed namespaces.
  @@ -192,15 +190,13 @@
       String elementTypeNSPrefix = nsStack.getPrefixFromURI(elementTypeNS, sink);
   
       if (ctx == null || !ctx.getDocLitSerialization()) {
  -      sink.write(" ");
  +      sink.write(' ');
         sink.write(xsiNSPrefix);
  -      sink.write(":");
  -      sink.write(Constants.ATTR_TYPE);
  -      sink.write("=\"");
  +      sink.write(':' + Constants.ATTR_TYPE + "=\"");
         sink.write(elementTypeNSPrefix);
  -      sink.write(":");
  +      sink.write(':');
         sink.write(elementType.getLocalPart());
  -      sink.write("\"");
  +      sink.write('\"');
       }
   
       if (inScopeEncStyle == null
  @@ -211,13 +207,10 @@
         String soapEnvNSPrefix = nsStack.getPrefixFromURI(
           Constants.NS_URI_SOAP_ENV, sink);
   
  -      sink.write(" ");
  +      sink.write(' ');
         sink.write(soapEnvNSPrefix);
  -      sink.write(":");
  -      sink.write(Constants.ATTR_ENCODING_STYLE);
  -      sink.write("=\"");
  -      sink.write(Constants.NS_URI_SOAP_ENC);
  -      sink.write("\"");
  +      sink.write(':' +Constants.ATTR_ENCODING_STYLE + "=\"" +
  +                 Constants.NS_URI_SOAP_ENC + '\"');
       }
   
       if (arrayElementType != null)
  @@ -230,27 +223,23 @@
         String soapEncNSPrefix = nsStack.getPrefixFromURI(
           Constants.NS_URI_SOAP_ENC, sink);
   
  -      sink.write(" ");
  +      sink.write(' ');
         sink.write(soapEncNSPrefix);
  -      sink.write(":");
  -      sink.write(Constants.ATTR_ARRAY_TYPE);
  -      sink.write("=\"");
  +      sink.write(':' + Constants.ATTR_ARRAY_TYPE +"=\"");
         sink.write(arrayTypeValue);
  -      sink.write("\"");
  +      sink.write('\"');
       }
   
       if (isNull)
       {
  -      sink.write(" ");
  +      sink.write(' ');
         sink.write(xsiNSPrefix);
  -      sink.write(":");
  +      sink.write(':');
         sink.write(nilName(xsiNamespaceURI));
  -      sink.write("=\"");
  -      sink.write(Constants.ATTRVAL_TRUE);
  -      sink.write("\"/");
  +      sink.write("=\"" + Constants.ATTRVAL_TRUE + "\"/");
       }
   
  -    sink.write(">");
  +    sink.write('>');
     }
   
     public static void generateNullStructure(String inScopeEncStyle,
  
  
  
  1.20      +19 -24    xml-soap/java/src/org/apache/soap/rpc/RPCMessage.java
  
  Index: RPCMessage.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/rpc/RPCMessage.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- RPCMessage.java	28 Oct 2002 16:50:53 -0000	1.19
  +++ RPCMessage.java	6 Nov 2002 15:11:08 -0000	1.20
  @@ -237,10 +237,10 @@
           String targetObjectNSPrefix = nsStack.getPrefixFromURI(
             targetObjectURI, nsDeclSW);
   
  -        sink.write("<");
  +        sink.write('<');
           if (!ctx.getDocLitSerialization ()) {
             sink.write(targetObjectNSPrefix);
  -          sink.write(":");
  +          sink.write(':');
           }
           sink.write(methodName);
           sink.write(suffix);
  @@ -249,7 +249,7 @@
           } else {
             sink.write(" xmlns=\"");
             sink.write(targetObjectURI);
  -          sink.write("\"");
  +          sink.write('\"');
           }
   
           // Determine the prefix associated with the NS_URI_SOAP_ENV
  @@ -260,17 +260,14 @@
           if (declMsgEncStyle != null
               && (!declMsgEncStyle.equals(inScopeEncStyle))
               && (!ctx.getDocLitSerialization())) {
  -          sink.write(" ");
  +          sink.write(' ');
             sink.write(soapEnvNSPrefix);
  -          sink.write(":");
  -          sink.write(Constants.ATTR_ENCODING_STYLE);
  -          sink.write("=\"");
  +          sink.write(':' +Constants.ATTR_ENCODING_STYLE +"=\"");
             sink.write(declMsgEncStyle);
  -          sink.write("\"");
  +          sink.write('\"');
           }
   
  -        sink.write(">");
  -        sink.write(StringUtils.lineSeparator);
  +        sink.write('>' + StringUtils.lineSeparator);
   
           // Get the returnValue.
           Parameter ret = resp.getReturnValue();
  @@ -294,11 +291,11 @@
           sink.write("</");
           if (!ctx.getDocLitSerialization ()) {
             sink.write(targetObjectNSPrefix);
  -          sink.write(":");
  +          sink.write(':');
           }
           sink.write(methodName);
           sink.write(suffix);
  -        sink.write(">");
  +        sink.write('>');
         } else {
           // Get the fault information.
           Fault fault = resp.getFault();
  @@ -311,10 +308,10 @@
         String targetObjectNSPrefix = nsStack.getPrefixFromURI(targetObjectURI,
                                                                nsDeclSW);
   
  -      sink.write("<");
  +      sink.write('<');
         if (!ctx.getDocLitSerialization ()) {
           sink.write(targetObjectNSPrefix);
  -        sink.write(":");
  +        sink.write(':');
         }
         sink.write(methodName);
         sink.write(suffix);
  @@ -323,7 +320,7 @@
         } else {
           sink.write(" xmlns=\"");
           sink.write(targetObjectURI);
  -        sink.write("\"");
  +        sink.write('\"');
         }
   
         // Determine the prefix associated with the NS_URI_SOAP_ENV
  @@ -334,16 +331,14 @@
         if (declMsgEncStyle != null
             && (!declMsgEncStyle.equals(inScopeEncStyle))
             && (!ctx.getDocLitSerialization())) {
  -        sink.write(" ");
  +        sink.write(' ');
           sink.write(soapEnvNSPrefix);
  -        sink.write(":");
  -        sink.write(Constants.ATTR_ENCODING_STYLE);
  -        sink.write("=\"");
  +        sink.write(':' + Constants.ATTR_ENCODING_STYLE + "=\"");
           sink.write(declMsgEncStyle);
  -        sink.write("\"");
  +        sink.write('\"');
         }
   
  -      sink.write(">");
  +      sink.write('>');
         sink.write(StringUtils.lineSeparator);
   
         serializeParams(params, actualMsgEncStyle, sink, nsStack, xjmr, ctx);
  @@ -351,11 +346,11 @@
         sink.write("</");
         if (!ctx.getDocLitSerialization()) {
           sink.write(targetObjectNSPrefix);
  -        sink.write(":");
  +        sink.write(':');
         }
         sink.write(methodName);
         sink.write(suffix);
  -      sink.write(">");
  +      sink.write('>');
       }
   
       nsStack.popScope();
  @@ -435,7 +430,7 @@
           // I'm on the client unmarshalling a response.
           smr = respSMR;
         }
  -      
  +
         // For RPC, default to SOAP section 5 encoding if no
         // encodingStyle attribute is set.
         smr.setDefaultEncodingStyle(Constants.NS_URI_SOAP_ENC);
  
  
  

Mime
View raw message