Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 98722 invoked from network); 22 Feb 2005 09:30:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Feb 2005 09:30:30 -0000 Received: (qmail 52970 invoked by uid 500); 22 Feb 2005 09:30:29 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 52909 invoked by uid 500); 22 Feb 2005 09:30:29 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 52878 invoked by uid 99); 22 Feb 2005 09:30:28 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_60_70,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mtagate3.uk.ibm.com (HELO mtagate3.uk.ibm.com) (195.212.29.136) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 22 Feb 2005 01:30:27 -0800 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate3.uk.ibm.com (8.12.10/8.12.10) with ESMTP id j1M9UMFU133286 for ; Tue, 22 Feb 2005 09:30:22 GMT Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1407.portsmouth.uk.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j1M9UMP8115730 for ; Tue, 22 Feb 2005 09:30:22 GMT Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.12.11/8.12.11) with ESMTP id j1M9ULYD004639 for ; Tue, 22 Feb 2005 09:30:21 GMT Received: from d06ml068.portsmouth.uk.ibm.com (d06ml068.portsmouth.uk.ibm.com [9.149.38.194]) by d06av04.portsmouth.uk.ibm.com (8.12.11/8.12.11) with ESMTP id j1M9ULOW004633 for ; Tue, 22 Feb 2005 09:30:21 GMT Importance: High In-Reply-To: <20050222085634.79946.qmail@minotaur.apache.org> To: axis-c-dev@ws.apache.org MIME-Version: 1.0 Subject: Re: cvs commit: ws-axis/c/src/soap SoapAttachment.hpp SoapAttachment.cpp SoapAttachementHeaders.cpp X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 From: John Hawkins X-MIMETrack: S/MIME Sign by Notes Client on John Hawkins/UK/IBM(Release 6.0.2CF1|June 9, 2003) at 22/02/2005 09:30:20, Serialize by Notes Client on John Hawkins/UK/IBM(Release 6.0.2CF1|June 9, 2003) at 22/02/2005 09:30:20, Serialize complete at 22/02/2005 09:30:20, S/MIME Sign failed at 22/02/2005 09:30:20: The cryptographic key was not found, Serialize by Router on D06ML068/06/M/IBM(Release 6.53HF247 | January 6, 2005) at 22/02/2005 09:30:20 Message-ID: Date: Tue, 22 Feb 2005 09:30:20 +0000 Content-Type: multipart/alternative; boundary="=_alternative 0034373D80256FB0_=" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multipart message in MIME format. --=_alternative 0034373D80256FB0_= Content-Type: text/plain; charset="US-ASCII" Hi Rangika, SOAP Attachments have just broken my latest code. Please can you create a branch to do this work in and back out your latest changes? We agreed that this was not being done in 1.5 right ? thanks, John. rangika@apache.org 22/02/2005 08:56 To ws-axis-cvs@apache.org cc Subject cvs commit: ws-axis/c/src/soap SoapAttachment.hpp SoapAttachment.cpp SoapAttachementHeaders.cpp rangika 2005/02/22 00:56:34 Modified: c/src/soap SoapAttachment.hpp SoapAttachment.cpp SoapAttachementHeaders.cpp Log: Modified to support Binary attachments. Revision Changes Path 1.5 +4 -1 ws-axis/c/src/soap/SoapAttachment.hpp Index: SoapAttachment.hpp =================================================================== RCS file: /home/cvs/ws-axis/c/src/soap/SoapAttachment.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- SoapAttachment.hpp 28 Jan 2005 11:47:09 -0000 1.4 +++ SoapAttachment.hpp 22 Feb 2005 08:56:34 -0000 1.5 @@ -54,12 +54,15 @@ private: SoapAttachementHeaders* m_AttachementHeaders; xsd__base64Binary* m_AttachementBody; - + char *m_binaryBody; + int iEncodingStyle; + public: const char* getHeader(const char* pchName); xsd__base64Binary* getBody(); void serialize(SoapSerializer& pSZ); void addBody(xsd__base64Binary* objBody); + void addBody(char* pchBinaryBody); void addHeader(const char* pchName, const char* pchValue); SoapAttachment(); virtual ~SoapAttachment(); 1.6 +22 -4 ws-axis/c/src/soap/SoapAttachment.cpp Index: SoapAttachment.cpp =================================================================== RCS file: /home/cvs/ws-axis/c/src/soap/SoapAttachment.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- SoapAttachment.cpp 31 Jan 2005 04:37:38 -0000 1.5 +++ SoapAttachment.cpp 22 Feb 2005 08:56:34 -0000 1.6 @@ -63,9 +63,18 @@ void SoapAttachment::addBody(xsd__base64Binary* objBody) { + iEncodingStyle = AXIS_BASE64; m_AttachementBody = objBody; } +void SoapAttachment::addBody(char* pchBinaryBody) +{ + iEncodingStyle = AXIS_BINARY; + m_binaryBody = new char[strlen(pchBinaryBody) + 1]; + strcpy(m_binaryBody,pchBinaryBody); + +} + void SoapAttachment::serialize(SoapSerializer &pSZ) { /* Serialize the Attachment Headers */ @@ -73,10 +82,19 @@ m_AttachementHeaders->serialize(pSZ); /* Serialize the Attachment Body */ - if (m_AttachementBody) { - pSZ.serialize("\n", NULL); - pSZ.serializeAsChardata(m_AttachementBody, XSD_BASE64BINARY); - } + if (iEncodingStyle == AXIS_BASE64) + { + if (m_AttachementBody) { + pSZ.serialize("\n", NULL); + pSZ.serializeAsChardata(m_AttachementBody, XSD_BASE64BINARY); + } + } + else if (iEncodingStyle == AXIS_BINARY) + { + pSZ.serialize("\n", NULL); + pSZ.serialize(m_binaryBody, NULL); + } + pSZ.serialize("\n", NULL); } 1.7 +1 -1 ws-axis/c/src/soap/SoapAttachementHeaders.cpp Index: SoapAttachementHeaders.cpp =================================================================== RCS file: /home/cvs/ws-axis/c/src/soap/SoapAttachementHeaders.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- SoapAttachementHeaders.cpp 31 Jan 2005 13:00:53 -0000 1.6 +++ SoapAttachementHeaders.cpp 22 Feb 2005 08:56:34 -0000 1.7 @@ -81,4 +81,4 @@ return ""; } -AXIS_CPP_NAMESPACE_END +AXIS_CPP_NAMESPACE_END \ No newline at end of file --=_alternative 0034373D80256FB0_= Content-Type: text/html; charset="US-ASCII"
Hi Rangika,

SOAP Attachments have just broken my latest code.

Please can you create a branch to do this work in and back out your latest changes? We agreed that this was not being done in 1.5 right ?

thanks,
John.




rangika@apache.org

22/02/2005 08:56

To
ws-axis-cvs@apache.org
cc
Subject
cvs commit: ws-axis/c/src/soap SoapAttachment.hpp SoapAttachment.cpp SoapAttachementHeaders.cpp





rangika     2005/02/22 00:56:34

 Modified:    c/src/soap SoapAttachment.hpp SoapAttachment.cpp
                       SoapAttachementHeaders.cpp
 Log:
 Modified to support Binary attachments.
 
 Revision  Changes    Path
 1.5       +4 -1      ws-axis/c/src/soap/SoapAttachment.hpp
 
 Index: SoapAttachment.hpp
 ===================================================================
 RCS file: /home/cvs/ws-axis/c/src/soap/SoapAttachment.hpp,v
 retrieving revision 1.4
 retrieving revision 1.5
 diff -u -r1.4 -r1.5
 --- SoapAttachment.hpp                 28 Jan 2005 11:47:09 -0000                 1.4
 +++ SoapAttachment.hpp                 22 Feb 2005 08:56:34 -0000                 1.5
 @@ -54,12 +54,15 @@
  private:                
                   SoapAttachementHeaders* m_AttachementHeaders;
                   xsd__base64Binary* m_AttachementBody;
 -
 +    char *m_binaryBody;
 +    int iEncodingStyle;
 +    
  public:                
                   const char* getHeader(const char* pchName);
                   xsd__base64Binary* getBody();
                   void serialize(SoapSerializer& pSZ);
                   void addBody(xsd__base64Binary* objBody);
 +    void addBody(char* pchBinaryBody);
                   void addHeader(const char* pchName, const char* pchValue);
                   SoapAttachment();
                   virtual ~SoapAttachment();                
 
 
 
 1.6       +22 -4     ws-axis/c/src/soap/SoapAttachment.cpp
 
 Index: SoapAttachment.cpp
 ===================================================================
 RCS file: /home/cvs/ws-axis/c/src/soap/SoapAttachment.cpp,v
 retrieving revision 1.5
 retrieving revision 1.6
 diff -u -r1.5 -r1.6
 --- SoapAttachment.cpp                 31 Jan 2005 04:37:38 -0000                 1.5
 +++ SoapAttachment.cpp                 22 Feb 2005 08:56:34 -0000                 1.6
 @@ -63,9 +63,18 @@
 
  void SoapAttachment::addBody(xsd__base64Binary* objBody)
  {
 +    iEncodingStyle = AXIS_BASE64;
                   m_AttachementBody = objBody;
  }
 
 +void SoapAttachment::addBody(char* pchBinaryBody)
 +{
 +    iEncodingStyle = AXIS_BINARY;
 +    m_binaryBody = new char[strlen(pchBinaryBody) + 1];
 +    strcpy(m_binaryBody,pchBinaryBody);
 +
 +}
 +
  void SoapAttachment::serialize(SoapSerializer &pSZ)
  {
                   /* Serialize the Attachment Headers */
 @@ -73,10 +82,19 @@
                   m_AttachementHeaders->serialize(pSZ);
 
                   /* Serialize the Attachment Body */
 -                 if (m_AttachementBody) {
 -                                  pSZ.serialize("\n", NULL);
 -                                  pSZ.serializeAsChardata(m_AttachementBody, XSD_BASE64BINARY);
 -                 }
 +    if (iEncodingStyle == AXIS_BASE64)
 +    {
 +                     if (m_AttachementBody) {
 +                                      pSZ.serialize("\n", NULL);
 +                                      pSZ.serializeAsChardata(m_AttachementBody, XSD_BASE64BINARY);
 +                     }
 +    }
 +    else if (iEncodingStyle == AXIS_BINARY)
 +    {
 +        pSZ.serialize("\n", NULL);
 +        pSZ.serialize(m_binaryBody, NULL);
 +    }
 +
                   pSZ.serialize("\n", NULL);
  }
 
 
 
 
 1.7       +1 -1      ws-axis/c/src/soap/SoapAttachementHeaders.cpp
 
 Index: SoapAttachementHeaders.cpp
 ===================================================================
 RCS file: /home/cvs/ws-axis/c/src/soap/SoapAttachementHeaders.cpp,v
 retrieving revision 1.6
 retrieving revision 1.7
 diff -u -r1.6 -r1.7
 --- SoapAttachementHeaders.cpp                 31 Jan 2005 13:00:53 -0000                 1.6
 +++ SoapAttachementHeaders.cpp                 22 Feb 2005 08:56:34 -0000                 1.7
 @@ -81,4 +81,4 @@
                   return "";
  }
 
 -AXIS_CPP_NAMESPACE_END
 +AXIS_CPP_NAMESPACE_END
 \ No newline at end of file
 
 
 

--=_alternative 0034373D80256FB0_=--