You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by wh...@apache.org on 2005/06/14 11:31:21 UTC
cvs commit: ws-axis/c/tests/auto_build/testcases/output DynUnrefAttachmentTest.expected DynUnrefAttachment_ServerResponse.expected
whitlock 2005/06/14 02:31:21
Modified: c/include/axis/client Call.hpp
c/src/engine/client Call.cpp
Added: c/tests/auto_build/testcases/output
DynUnrefAttachmentTest.expected
DynUnrefAttachment_ServerResponse.expected
Log:
Add attachments methods to Call and create new unit test
Revision Changes Path
1.30 +5 -0 ws-axis/c/include/axis/client/Call.hpp
Index: Call.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/include/axis/client/Call.hpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- Call.hpp 3 Jun 2005 10:43:49 -0000 1.29
+++ Call.hpp 14 Jun 2005 09:31:21 -0000 1.30
@@ -62,6 +62,7 @@
class MessageData;
class SoapDeSerializer;
class SoapSerializer;
+class ISoapAttachment;
class STORAGE_CLASS_INFO CallBase
{
@@ -618,6 +619,9 @@
*/
const xsd__string getFaultAsXMLString();
+ void addAttachment(ISoapAttachment* objAttach);
+ ISoapAttachment* createSoapAttachment();
+
private:
void closeConnection();
int makeArray();
@@ -629,6 +633,7 @@
#pragma warning (disable : 4251)
#endif
list<void*> m_handlerProperties;
+ list<ISoapAttachment*> m_attachments;
#ifdef WIN32
#pragma warning (default : 4251)
1.116 +26 -0 ws-axis/c/src/engine/client/Call.cpp
Index: Call.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/engine/client/Call.cpp,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -r1.115 -r1.116
--- Call.cpp 9 Jun 2005 04:32:59 -0000 1.115
+++ Call.cpp 14 Jun 2005 09:31:21 -0000 1.116
@@ -131,6 +131,14 @@
if (m_pcEndPointUri)
delete [] m_pcEndPointUri;
m_pcEndPointUri = NULL;
+
+ list<ISoapAttachment*>::iterator it = m_attachments.begin();
+ while (it != m_attachments.end())
+ {
+ delete *it;
+ it++;
+ }
+ m_attachments.clear();
}
int Call::setEndpointURI (const char* pchEndpointURI)
@@ -253,6 +261,14 @@
{
msgData->setProperty("sessionid", m_pchSessionID);
}
+
+ list<ISoapAttachment*>::iterator itAtt = m_attachments.begin();
+ while (itAtt != m_attachments.end())
+ {
+ m_pIWSSZ->addAttachment((*itAtt)->getHeader("Content-Id"),*itAtt);
+ itAtt++;
+ }
+ m_attachments.clear();
return AXIS_SUCCESS;
}
}
@@ -1029,3 +1045,13 @@
{
return m_pIWSDZ->getFaultAsXMLString();
}
+
+void Call::addAttachment(ISoapAttachment* att)
+{
+ m_attachments.push_back(att);
+}
+
+ISoapAttachment* Call::createSoapAttachment()
+{
+ return new SoapAttachment();
+}
1.1 ws-axis/c/tests/auto_build/testcases/output/DynUnrefAttachmentTest.expected
Index: DynUnrefAttachmentTest.expected
===================================================================
----------------------------TEST COMPLETE--------------------------------
1.1 ws-axis/c/tests/auto_build/testcases/output/DynUnrefAttachment_ServerResponse.expected
Index: DynUnrefAttachment_ServerResponse.expected
===================================================================
HTTP/1.1 200 OK
Server: WebSphere Application Server/5.1
Content-Type: text/xml; charset=utf-8
Content-Language: en-GB
Transfer-Encoding: chunked
###
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<putResponse xmlns="http://localhost/axis/DynUnrefAttachment">
<putReturn>5</putReturn>
</putResponse>
</soapenv:Body>
</soapenv:Envelope>
0