roshan      2005/01/05 02:39:02

  Modified:    c/include/axis IHandlerSoapSerializer.hpp
               c/src/soap HeaderBlock.cpp SoapSerializer.cpp
                        SoapSerializer.h
  Log:
  fixed JIRA issue AXISCPP-350 AXISCPP-354
  
  Revision  Changes    Path
  1.3       +5 -0      ws-axis/c/include/axis/IHandlerSoapSerializer.hpp
  
  Index: IHandlerSoapSerializer.hpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/include/axis/IHandlerSoapSerializer.hpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IHandlerSoapSerializer.hpp        20 Dec 2004 08:47:07 -0000      1.2
  +++ IHandlerSoapSerializer.hpp        5 Jan 2005 10:39:02 -0000       1.3
  @@ -128,6 +128,11 @@
       virtual int AXISCALL setBodyAsHexBinary(xsd__hexBinary body)=0;
       virtual int AXISCALL setBodyAsBase64Binary(xsd__base64Binary body)=0;
       virtual const AxisChar* AXISCALL getBodyAsString()=0;
  +
  +     /**
  +       * Adds the namespace declaration to the SOAP Envelope.
  +       */
  +     virtual void addNamespaceToEnvelope(AxisChar *pachNamespaceURI, 
AxisChar* pachPrefix)=0;
   };
   
   AXIS_CPP_NAMESPACE_END
  
  
  
  1.42      +5 -2      ws-axis/c/src/soap/HeaderBlock.cpp
  
  Index: HeaderBlock.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/HeaderBlock.cpp,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- HeaderBlock.cpp   5 Jan 2005 07:48:27 -0000       1.41
  +++ HeaderBlock.cpp   5 Jan 2005 10:39:02 -0000       1.42
  @@ -212,8 +212,11 @@
               }
           }
   
  -        pSZ.serialize(m_sPrefix.c_str(), ":", m_localname.c_str(),
  -            " xmlns:", m_sPrefix.c_str(), "=\"", m_uri.c_str(), "\"", NULL);
  +        pSZ.serialize(m_sPrefix.c_str(), ":", m_localname.c_str(), NULL);
  +             
  +             if (blnIsNewNamespace) {
  +                     pSZ.serialize(" xmlns:", m_sPrefix.c_str(), "=\"", 
m_uri.c_str(), "\"", NULL);
  +             }
   
           iStatus= attrSerialize(pSZ, lstTmpNameSpaceStack);
           if(iStatus==AXIS_FAIL)
  
  
  
  1.81      +15 -0     ws-axis/c/src/soap/SoapSerializer.cpp
  
  Index: SoapSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapSerializer.cpp,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- SoapSerializer.cpp        4 Jan 2005 05:50:00 -0000       1.80
  +++ SoapSerializer.cpp        5 Jan 2005 10:39:02 -0000       1.81
  @@ -958,4 +958,19 @@
        m_SoapAttachments[achId]->addBody(pAttchBody);
   }
   
  +void SoapSerializer::addNamespaceToEnvelope(AxisChar *pachNamespaceURI, 
AxisChar* pachPrefix)
  +{
  +     Attribute *pNameSpace = new Attribute(pachPrefix, "xmlns", 
pachNamespaceURI);
  +
  +     m_pSoapEnvelope->addNamespaceDecl(pNameSpace);
  +
  +     addNamespaceToNamespaceList(pachNamespaceURI, pachPrefix);
  +
  +}
  +
  +void SoapSerializer::addNamespaceToNamespaceList(AxisChar *pachNamespaceURI, 
AxisChar* pachPrefix)
  +{
  +     m_NsStack[pachNamespaceURI] = pachPrefix;
  +}
  +
   AXIS_CPP_NAMESPACE_END
  
  
  
  1.33      +2 -0      ws-axis/c/src/soap/SoapSerializer.h
  
  Index: SoapSerializer.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapSerializer.h,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- SoapSerializer.h  4 Jan 2005 05:50:00 -0000       1.32
  +++ SoapSerializer.h  5 Jan 2005 10:39:02 -0000       1.33
  @@ -155,6 +155,8 @@
       BasicTypeSerializer m_BTSZ;
       SOAPTransport* m_pOutputStream;
   public:
  +     void addNamespaceToNamespaceList(AxisChar *pachNamespaceURI, AxisChar* 
pachPrefix);
  +     void addNamespaceToEnvelope(AxisChar *pachNamespaceURI, AxisChar* 
pachPrefix);
        void addAttachmentBody(const AxisChar* achId, xsd__base64Binary* 
pAttchBody);
        void addAttachmentHeader(const AxisChar* achId, const AxisChar* 
achHeaderName, const AxisChar* achHeaderValue);
        void addAttachment(AxisString id, SoapAttachment* objAttach);
  
  
  

Reply via email to