Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 43361 invoked from network); 28 Jan 2005 11:49:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 28 Jan 2005 11:49:28 -0000 Received: (qmail 52436 invoked by uid 500); 28 Jan 2005 11:49:26 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 52291 invoked by uid 500); 28 Jan 2005 11:49:25 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 52278 invoked by uid 99); 28 Jan 2005 11:49:25 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Fri, 28 Jan 2005 03:49:24 -0800 Received: (qmail 43334 invoked by uid 1968); 28 Jan 2005 11:49:23 -0000 Date: 28 Jan 2005 11:49:23 -0000 Message-ID: <20050128114923.43333.qmail@minotaur.apache.org> From: rangika@apache.org To: ws-axis-cvs@apache.org Subject: cvs commit: ws-axis/c/src/soap SoapAttachementHeaders.cpp X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N rangika 2005/01/28 03:49:23 Modified: c/src/soap SoapAttachementHeaders.cpp Log: removed unnecossy lines Revision Changes Path 1.4 +140 -120 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.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- SoapAttachementHeaders.cpp 21 Jan 2005 12:40:19 -0000 1.3 +++ SoapAttachementHeaders.cpp 28 Jan 2005 11:49:23 -0000 1.4 @@ -1,121 +1,141 @@ -/* - * Copyright 2003-2004 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * @author Rangika Mendis (rangika@opensource.lk) - * @author Nithyakala Thangarajah (nithya@opensource.lk) - * @author Roshan Weerasuriya (roshan@opensource.lk, roshan@jkcsworld.com) - * - */ - - -// SoapAttachementHeaders.cpp: implementation of the SoapAttachementHeaders class. -// -////////////////////////////////////////////////////////////////////// - -#include "SoapAttachementHeaders.hpp" -#include "SoapSerializer.h" - -AXIS_CPP_NAMESPACE_START - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -SoapAttachementHeaders::SoapAttachementHeaders() -{ - -} - -SoapAttachementHeaders::~SoapAttachementHeaders() -{ - -} - -void SoapAttachementHeaders::addHeader(AxisString name, AxisString value) -{ - //m_AttachHeaders[name] = value; - m_AttachHeaders.push_back (make_pair (name, value)); -} - -void SoapAttachementHeaders::serialize(SoapSerializer &pSZ) -{ - /* - map::iterator itCurrAttchHeader= m_AttachHeaders.begin(); - - while(itCurrAttchHeader != m_AttachHeaders.end()) - { - if (strcmp(((*itCurrAttchHeader).first).c_str(), "Content-Id")==0) - { - pSZ.serialize(((*itCurrAttchHeader).first).c_str(), ": <", NULL); - pSZ.serialize(((*itCurrAttchHeader).second).c_str(), ">\n", NULL); - - itCurrAttchHeader++; - } - else - { - pSZ.serialize(((*itCurrAttchHeader).first).c_str(), ":", NULL); - pSZ.serialize(((*itCurrAttchHeader).second).c_str(), "\n", NULL); - - itCurrAttchHeader++; - } - } - */ - - for (unsigned int i = 0; i < m_AttachHeaders.size (); i++) - { - if (m_AttachHeaders[i].first == "Content-Id") - { - /* - m_vHTTPHeaders[i].second = (string) pcValue; - - b_KeyFound = true; - - break; - */ - - pSZ.serialize((m_AttachHeaders[i].first).c_str(), ": <", NULL); - pSZ.serialize((m_AttachHeaders[i].second).c_str(), ">\n", NULL); - } else { - pSZ.serialize((m_AttachHeaders[i].first).c_str(), ":", NULL); - pSZ.serialize((m_AttachHeaders[i].second).c_str(), "\n", NULL); - } - } - -} - -AxisString SoapAttachementHeaders::getHeader(AxisString sName) -{ - /* - if (m_AttachHeaders.find(sName) == m_AttachHeaders.end()) - return ""; - else - return m_AttachHeaders[sName]; - */ - - for (unsigned int i = 0; i < m_AttachHeaders.size (); i++) - { - if (m_AttachHeaders[i].first == "Content-Id") - { - return m_AttachHeaders[i].second; - } - } - - return ""; - -} - +/* + * Copyright 2003-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * @author Rangika Mendis (rangika@opensource.lk) + * @author Nithyakala Thangarajah (nithya@opensource.lk) + * @author Roshan Weerasuriya (roshan@opensource.lk, roshan@jkcsworld.com) + * + */ + +// SoapAttachementHeaders.cpp: implementation of the SoapAttachementHeaders class. + +// + +////////////////////////////////////////////////////////////////////// + +#include "SoapAttachementHeaders.hpp" +#include "SoapSerializer.h" + +AXIS_CPP_NAMESPACE_START + +////////////////////////////////////////////////////////////////////// + +// Construction/Destruction + +////////////////////////////////////////////////////////////////////// + +SoapAttachementHeaders::SoapAttachementHeaders() +{ +} + +SoapAttachementHeaders::~SoapAttachementHeaders() +{ +} + +void SoapAttachementHeaders::addHeader(AxisString name, AxisString value) +{ + //m_AttachHeaders[name] = value; + m_AttachHeaders.push_back (make_pair (name, value)); +} + +void SoapAttachementHeaders::serialize(SoapSerializer &pSZ) +{ + /* + + map::iterator itCurrAttchHeader= m_AttachHeaders.begin(); + + while(itCurrAttchHeader != m_AttachHeaders.end()) + + { + + if (strcmp(((*itCurrAttchHeader).first).c_str(), "Content-Id")==0) + + { + + pSZ.serialize(((*itCurrAttchHeader).first).c_str(), ": <", NULL); + + pSZ.serialize(((*itCurrAttchHeader).second).c_str(), ">\n", NULL); + + itCurrAttchHeader++; + + } + + else + + { + + pSZ.serialize(((*itCurrAttchHeader).first).c_str(), ":", NULL); + + pSZ.serialize(((*itCurrAttchHeader).second).c_str(), "\n", NULL); + + itCurrAttchHeader++; + + } + + } + + */ + + for (unsigned int i = 0; i < m_AttachHeaders.size (); i++) + { + if (m_AttachHeaders[i].first == "Content-Id") + { + /* + + m_vHTTPHeaders[i].second = (string) pcValue; + + b_KeyFound = true; + + break; + + */ + pSZ.serialize((m_AttachHeaders[i].first).c_str(), ": <", NULL); + pSZ.serialize((m_AttachHeaders[i].second).c_str(), ">\n", NULL); + } else { + pSZ.serialize((m_AttachHeaders[i].first).c_str(), ":", NULL); + pSZ.serialize((m_AttachHeaders[i].second).c_str(), "\n", NULL); + } + } +} + +AxisString SoapAttachementHeaders::getHeader(AxisString sName) +{ + + /* + + if (m_AttachHeaders.find(sName) == m_AttachHeaders.end()) + + return ""; + + else + + return m_AttachHeaders[sName]; + + */ + + for (unsigned int i = 0; i < m_AttachHeaders.size (); i++) + { + if (m_AttachHeaders[i].first == "Content-Id") + { + return m_AttachHeaders[i].second; + } + } + + return ""; +} + AXIS_CPP_NAMESPACE_END \ No newline at end of file