axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russell Butek" <bu...@us.ibm.com>
Subject cvs commit: xml-axis/java/src/org/apache/axis/encoding/ser JAFDataHandlerDeserializerFactory.java
Date Thu, 14 Mar 2002 15:09:33 GMT
Does this mean Doug's issue #1 is now fixed?  Can I now remove that entry
in the "MUST DO FOR BETA 1" list?

Russell Butek
butek@us.ibm.com
---------------------- Forwarded by Russell Butek/Austin/IBM on 03/14/2002
09:08 AM ---------------------------





rineholt@apache.org on 03/13/2002 10:20:52 PM

Please respond to axis-dev@xml.apache.org

To:    xml-axis-cvs@apache.org
cc:

Subject:    cvs commit: xml-axis/java/src/org/apache/axis/encoding/ser
       JAFDataHandlerDeserializerFactory.java




rineholt    02/03/13 20:20:52

  Modified:    java/samples/attachments EchoAttachment.java
               java/src/org/apache/axis/client Call.java
               java/src/org/apache/axis/encoding DeserializerImpl.java
               java/src/org/apache/axis/encoding/ser
                        JAFDataHandlerDeserializerFactory.java
  Log:
  Fix attachment sample to print out error if fault occurs.  AxisFautl.dump
  is now silient
  Fix Call so it recognizes the SOAPBody part in WSDL with attachments.
  Fix to invoke serializer for attachments in arrays.

  Revision  Changes    Path
  1.9       +3 -2
  xml-axis/java/samples/attachments/EchoAttachment.java

  Index: EchoAttachment.java
  ===================================================================
  RCS file:
  /home/cvs/xml-axis/java/samples/attachments/EchoAttachment.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- EchoAttachment.java     27 Feb 2002 02:57:22 -0000    1.8
  +++ EchoAttachment.java     14 Mar 2002 04:20:52 -0000    1.9
  @@ -122,6 +122,7 @@
                                    qnameAttachment,
                                    JAFDataHandlerSerializerFactory.class,
                                    JAFDataHandlerDeserializerFactory.class);
  +

           call.addParameter( "source", qnameAttachment,
                   ParameterMode.PARAM_MODE_IN ); //Add the file.
  @@ -329,8 +330,8 @@
               if ( e instanceof AxisFault ) {
                   ((AxisFault) e).dump();
               }
  -            else
  -                e.printStackTrace();
  +            System.err.println(e);
  +             e.printStackTrace();
           }
           System.exit(18);
       }



  1.94      +17 -0     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.93
  retrieving revision 1.94
  diff -u -r1.93 -r1.94
  --- Call.java   13 Mar 2002 19:50:58 -0000    1.93
  +++ Call.java   14 Mar 2002 04:20:52 -0000    1.94
  @@ -881,6 +881,23 @@
               list = bIn.getExtensibilityElements();
               for ( int i = 0 ; list != null && i < list.size() ; i++ ) {
                   Object obj = list.get(i);
  +                if( obj instanceof
  javax.wsdl.extensions.mime.MIMEMultipartRelated){
  +                  javax.wsdl.extensions.mime.MIMEMultipartRelated mpr=
  +                  (javax.wsdl.extensions.mime.MIMEMultipartRelated) obj;
  +                  Object part= null;
  +                  List l=  mpr.getMIMEParts();
  +                  for(int j=0; l!= null && j< l.size() && part== null;
  j++){
  +                     javax.wsdl.extensions.mime.MIMEPart mp
  +                     = (javax.wsdl.extensions.mime.MIMEPart)l.get(j);
  +                     List ll= mp.getExtensibilityElements();
  +                     for(int k=0; ll!= null && k< ll.size() && part==
  null; k++){
  +                       part= ll.get(k);
  +                       if ( !(part instanceof SOAPBody)) part = null;
  +                     }
  +                  }
  +                  if(null != part) obj= part;
  +                }
  +
                   if ( obj instanceof SOAPBody ) {
                       SOAPBody sBody  = (SOAPBody) obj ;
                       list = sBody.getEncodingStyles();



  1.6       +14 -1
  xml-axis/java/src/org/apache/axis/encoding/DeserializerImpl.java

  Index: DeserializerImpl.java
  ===================================================================
  RCS file:
  /home/cvs/xml-axis/java/src/org/apache/axis/encoding/DeserializerImpl.java,v

  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DeserializerImpl.java   6 Mar 2002 19:35:49 -0000     1.5
  +++ DeserializerImpl.java   14 Mar 2002 04:20:52 -0000    1.6
  @@ -62,6 +62,7 @@
   import org.apache.axis.message.SAX2EventRecorder;
   import org.apache.axis.message.SAXOutputter;
   import org.apache.axis.message.SOAPHandler;
  +import org.apache.axis.Part;
   import org.apache.axis.utils.JavaUtils;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -366,13 +367,25 @@
                   ((MessageElement)ref).publishToHandler((DefaultHandler)
                   context);
                   context.setRecorder(r);
               } else {
  +
  +                if( !href.startsWith("#") && defaultType != null && ref
  instanceof Part ){
  +                    //For attachments this is the end of the road--
  invoke deserializer
  +                    Deserializer dser=
  context.getDeserializerForType(defaultType );
  +                    if(null != dser){
  +                      dser.startElement(namespace, localName,
  +                             qName, attributes,
  +                             context);
  +                      ref = dser.getValue();
  +
  +                    }
  +               }
  +
                   // If the ref is not a MessageElement, then it must be
                   an
                   // element that has already been deserialized.  Use it
                   directly.
                   value = ref;
                   valueComplete();
               }

  -            // !!! INSERT DEALING WITH ATTACHMENTS STUFF HERE?
           } else {
               isHref = false;
               onStartElement(namespace, localName, qName, attributes,



  1.2       +6 -0
  xml-axis/java/src/org/apache/axis/encoding/ser/JAFDataHandlerDeserializerFactory.java


  Index: JAFDataHandlerDeserializerFactory.java
  ===================================================================
  RCS file:
  /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/JAFDataHandlerDeserializerFactory.java,v

  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JAFDataHandlerDeserializerFactory.java    26 Jan 2002 02:40:34 -0000
  1.1
  +++ JAFDataHandlerDeserializerFactory.java    14 Mar 2002 04:20:52 -0000
  1.2
  @@ -78,17 +78,23 @@
   import org.apache.axis.encoding.DeserializationContext;
   import org.apache.axis.encoding.DeserializerImpl;

  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
  +
   /**
    * A JAFDataHandlerDeserializer Factory
    *
    *  @author Rich Scheuerle (scheu@us.ibm.com)
    */
   public class JAFDataHandlerDeserializerFactory extends
  BaseDeserializerFactory {
  +   protected static Log log =
  LogFactory.getLog(JAFDataHandlerDeserializerFactory.class.getName());

       public JAFDataHandlerDeserializerFactory(Class javaType, QName
           xmlType) {
           super(JAFDataHandlerDeserializer.class, false, xmlType,
           javaType);
  +        log.debug("Enter JAFDataHandlerDeserializerFactory ("
       +javaType+", "+xmlType+")");
       }
       public JAFDataHandlerDeserializerFactory() {
           super(JAFDataHandlerDeserializer.class, false);
  +        log.debug("Enter JAFDataHandlerDeserializerFactory ()" );
       }
   }






Mime
View raw message