axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject cvs commit: xml-axis/java/test/encoding TestDeser.java
Date Sat, 05 May 2001 23:44:44 GMT
rubys       01/05/05 16:44:44

  Modified:    java/src/org/apache/axis Message.java MessageContext.java
               java/test/encoding TestDeser.java
  Log:
  Take off the training wheels!
  
  Revision  Changes    Path
  1.30      +3 -7      xml-axis/java/src/org/apache/axis/Message.java
  
  Index: Message.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Message.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- Message.java	2001/05/05 22:16:53	1.29
  +++ Message.java	2001/05/05 23:44:43	1.30
  @@ -89,9 +89,6 @@
       originalMessage = origMsg ;
       currentMessage = origMsg ;
       currentForm = form ;
  -
  -    // if (msgContext == null) throw new NullPointerException();
  -    // this.msgContext = msgContext;
     }
   
     public Object getOriginalMessage() {
  @@ -113,7 +110,6 @@
     
     public MessageContext getMessageContext()
     {
  -      if (msgContext == null) msgContext=new MessageContext();
         return msgContext;
     }
     public void setMessageContext(MessageContext msgContext)
  @@ -219,7 +215,7 @@
           StringWriter writer = new StringWriter();
           AxisFault env = (AxisFault)currentMessage;
           try {
  -            env.output(new SerializationContext(writer, getMessageContext()));
  +            env.output(new SerializationContext(writer, msgContext));
           } catch (Exception e) {
               e.printStackTrace();
               return null;
  @@ -232,7 +228,7 @@
           StringWriter writer = new StringWriter();
           SOAPEnvelope env = (SOAPEnvelope)currentMessage;
           try {
  -            env.output(new SerializationContext(writer, getMessageContext()));
  +            env.output(new SerializationContext(writer, msgContext));
           } catch (Exception e) {
               e.printStackTrace();
               return null;
  @@ -337,7 +333,7 @@
       //    new ThreadedSAXAdapter(new org.apache.xerces.parsers.SAXParser(), is);
       SAXAdapter parser = 
           new SAXAdapter(new org.apache.xerces.parsers.SAXParser(), is, 
  -                       getMessageContext());
  +                       msgContext);
       SOAPEnvelope env = parser.getEnvelope();
       env.setMessageType(messageType);
       
  
  
  
  1.18      +2 -2      xml-axis/java/src/org/apache/axis/MessageContext.java
  
  Index: MessageContext.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/MessageContext.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- MessageContext.java	2001/05/05 22:16:54	1.17
  +++ MessageContext.java	2001/05/05 23:44:43	1.18
  @@ -158,7 +158,7 @@
        */
       public void setRequestMessage(Message inMsg) { 
           inMessage = inMsg ; 
  -        inMessage.setMessageContext(this);
  +        if (inMessage != null) inMessage.setMessageContext(this);
       };
   
       /**
  @@ -171,7 +171,7 @@
        */
       public void setResponseMessage(Message outMsg) { 
           outMessage = outMsg ;
  -        outMessage.setMessageContext(this);
  +        if (outMessage != null) outMessage.setMessageContext(this);
       };
   
       public AxisClassLoader getClassLoader() {
  
  
  
  1.4       +2 -0      xml-axis/java/test/encoding/TestDeser.java
  
  Index: TestDeser.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/encoding/TestDeser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestDeser.java	2001/05/04 11:59:19	1.3
  +++ TestDeser.java	2001/05/05 23:44:44	1.4
  @@ -2,6 +2,7 @@
   
   import org.apache.axis.Constants;
   import org.apache.axis.Message;
  +import org.apache.axis.MessageContext;
   import org.apache.axis.message.*;
   import org.apache.axis.encoding.*;
   import org.apache.axis.utils.QName;
  @@ -46,6 +47,7 @@
   
       private void deserialize(String data, Object expected) {
          Message message = new Message(header + data + footer, "String");
  +       message.setMessageContext(new MessageContext());
   
          SOAPEnvelope envelope = (SOAPEnvelope)message.getAs("SOAPEnvelope");
          assertNotNull("envelope", envelope);
  
  
  

Mime
View raw message