axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From di...@apache.org
Subject cvs commit: ws-axis/c/src/soap/xsd Int.cpp Int.hpp
Date Tue, 18 Jan 2005 15:42:54 GMT
dicka       2005/01/18 07:42:54

  Modified:    c/src/soap/xsd Int.cpp Int.hpp
  Log:
  XSD_INT not being correctly serialized/deserialized on Unix platforms.
  
  Submitted by: Adrian Dick
  
  Revision  Changes    Path
  1.2       +20 -1     ws-axis/c/src/soap/xsd/Int.cpp
  
  Index: Int.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Int.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Int.cpp	17 Jan 2005 11:59:51 -0000	1.1
  +++ Int.cpp	18 Jan 2005 15:42:54 -0000	1.2
  @@ -2,9 +2,28 @@
   
   AXIS_CPP_NAMESPACE_START
   
  +AxisChar* Int::serialize(const void* value) throw (AxisSoapException)
  +{
  +    return serialize((int*) value);
  +}
  +
  +void* Int::deserializer(const AxisChar* valueAsChar) throw (AxisSoapException)
  +{
  +    return (void*) deserializeInt(valueAsChar);
  +}
  +
  +AxisChar* Int::serialize(const int* value) throw (AxisSoapException)
  +{
  +    LONGLONG valueAsLong = static_cast<LONGLONG>(*value);
  +    return Long::serialize(&valueAsLong);
  +}
  +
   int* Int::deserializeInt(const AxisChar* valueAsChar) throw (AxisSoapException)
   {
  -    return (int*) deserialize(valueAsChar);
  +    LONGLONG* returnValue = Long::deserializeLong(valueAsChar);
  +    m_int = new int;
  +    *m_int = static_cast<int> (*returnValue);
  +    return m_int;
   }
   
   AXIS_CPP_NAMESPACE_END
  
  
  
  1.2       +10 -1     ws-axis/c/src/soap/xsd/Int.hpp
  
  Index: Int.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/xsd/Int.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Int.hpp	17 Jan 2005 11:59:51 -0000	1.1
  +++ Int.hpp	18 Jan 2005 15:42:54 -0000	1.2
  @@ -31,12 +31,21 @@
   class Int : public Long {
   public:
     
  +  AxisChar* serialize(const void* value) throw (AxisSoapException);
  +  
  +  void* deserializer(const AxisChar* valueAsChar) throw (AxisSoapException);
  +  
  +  AxisChar* serialize(const int* value) throw (AxisSoapException);
  +  
     /**
      * Deserialized Int value from it's on-the-wire string form.
      * @param valueAsChar Serialized form of Int value.
      * @return Deserialized Int value.
      */
  -    int* deserializeInt(const AxisChar* valueAsChar) throw (AxisSoapException);
  +  int* deserializeInt(const AxisChar* valueAsChar) throw (AxisSoapException);
  +    
  +private:
  +    int* m_int;
   };
   
   AXIS_CPP_NAMESPACE_END
  
  
  

Mime
View raw message