axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ow...@apache.org
Subject cvs commit: xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apacheaxis WSIFOperation_ApacheAxis.java
Date Thu, 29 Aug 2002 10:02:50 GMT
owenb       2002/08/29 03:02:49

  Modified:    java/src/org/apache/wsif/providers/soap/apacheaxis
                        WSIFOperation_ApacheAxis.java
  Log:
  Filter out XSD and SOAP-ENC types when adding mappings to the call object
  since Axis already knows how to deal with them.
  
  Revision  Changes    Path
  1.21      +30 -10    xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apacheaxis/WSIFOperation_ApacheAxis.java
  
  Index: WSIFOperation_ApacheAxis.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/soap/apacheaxis/WSIFOperation_ApacheAxis.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- WSIFOperation_ApacheAxis.java	19 Aug 2002 09:19:32 -0000	1.20
  +++ WSIFOperation_ApacheAxis.java	29 Aug 2002 10:02:49 -0000	1.21
  @@ -422,11 +422,21 @@
                   wsifdynamictypemapping = (WSIFDynamicTypeMapping) iterator.next();
                   objClass = wsifdynamictypemapping.getJavaType();
                   namespaceURI = wsifdynamictypemapping.getXmlType().getNamespaceURI();
  -                localPart = wsifdynamictypemapping.getXmlType().getLocalPart();
  -                QName qn = new QName(namespaceURI, localPart);
  -                BeanSerializerFactory bsf = new BeanSerializerFactory(objClass, qn);
  -                BeanDeserializerFactory bdf = new BeanDeserializerFactory(objClass, qn);
  -                tm.register(objClass, qn, bsf, bdf);
  +                
  +                // Filter out XSD and SOAP-ENC types from those we explicitly map.    

  +                // Axis already knows how to deal with these; using the BeanSerializer

  +                // would be wrong anyway as they represent simple types and not beans.

  +                if( namespaceURI != null 
  +                    && !namespaceURI.equals(WSIFConstants.NS_URI_1999_SCHEMA_XSD)
  +                    && !namespaceURI.equals(WSIFConstants.NS_URI_2000_SCHEMA_XSD)

  +                    && !namespaceURI.equals(WSIFConstants.NS_URI_2001_SCHEMA_XSD)

  +                    && !namespaceURI.equals(WSIFConstants.NS_URI_SOAP_ENC)) { 
              
  +                    localPart = wsifdynamictypemapping.getXmlType().getLocalPart();
  +                    QName qn = new QName(namespaceURI, localPart);
  +                    BeanSerializerFactory bsf = new BeanSerializerFactory(objClass, qn);
  +                    BeanDeserializerFactory bdf = new BeanDeserializerFactory(objClass,
qn);
  +                    tm.register(objClass, qn, bsf, bdf);
  +                }
               }
   
               Message resMsg = msgContext.getResponseMessage();
  @@ -676,11 +686,21 @@
               wsifdynamictypemapping = (WSIFDynamicTypeMapping) iterator.next();
               objClass = wsifdynamictypemapping.getJavaType();
               namespaceURI = wsifdynamictypemapping.getXmlType().getNamespaceURI();
  -            localPart = wsifdynamictypemapping.getXmlType().getLocalPart();
  -            QName qn = new QName(namespaceURI, localPart);
  -            BeanSerializerFactory bsf = new BeanSerializerFactory(objClass, qn);
  -            BeanDeserializerFactory bdf = new BeanDeserializerFactory(objClass, qn);
  -            call.registerTypeMapping(objClass, qn, bsf, bdf);
  +                
  +            // Filter out XSD and SOAP-ENC types from those we explicitly map.      
  +            // Axis already knows how to deal with these; using the BeanSerializer 
  +            // would be wrong anyway as they represent simple types and not beans. 
  +            if( namespaceURI != null 
  +                && !namespaceURI.equals(WSIFConstants.NS_URI_1999_SCHEMA_XSD)
  +                && !namespaceURI.equals(WSIFConstants.NS_URI_2000_SCHEMA_XSD) 
  +                && !namespaceURI.equals(WSIFConstants.NS_URI_2001_SCHEMA_XSD) 
  +                && !namespaceURI.equals(WSIFConstants.NS_URI_SOAP_ENC)) {     
      
  +                localPart = wsifdynamictypemapping.getXmlType().getLocalPart();
  +                QName qn = new QName(namespaceURI, localPart);
  +                BeanSerializerFactory bsf = new BeanSerializerFactory(objClass, qn);
  +                BeanDeserializerFactory bdf = new BeanDeserializerFactory(objClass, qn);
  +                call.registerTypeMapping(objClass, qn, bsf, bdf);
  +            }
           }
   
           Input input = operation.getInput();
  
  
  

Mime
View raw message