1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
diff --git src/libcmis/ws-soap.cxx src/libcmis/ws-soap.cxx
index e8efd67..decb79a 100644
--- src/libcmis/ws-soap.cxx
+++ src/libcmis/ws-soap.cxx
@@ -279,7 +279,7 @@ string SoapRequest::createEnvelope( string& username, string& password )
boost::posix_time::ptime expires( created );
expires = expires + boost::gregorian::days( 1 );
string createdStr = libcmis::writeDateTime( created );
- xmlChar* expiresStr = BAD_CAST( libcmis::writeDateTime( expires ).c_str( ) );
+ string expiresStr = libcmis::writeDateTime( expires );
xmlTextWriterStartElement( writer, BAD_CAST( "S:Envelope" ) );
xmlTextWriterWriteAttribute( writer, BAD_CAST( "xmlns:S" ), BAD_CAST( NS_SOAP_ENV_URL ) );
@@ -296,7 +296,7 @@ string SoapRequest::createEnvelope( string& username, string& password )
xmlTextWriterWriteRaw( writer, BAD_CAST( createdStr.c_str( ) ) );
xmlTextWriterEndElement( writer ); // End of Created
xmlTextWriterStartElement( writer, BAD_CAST( "wsse:Expires" ) );
- xmlTextWriterWriteRaw( writer, expiresStr );
+ xmlTextWriterWriteRaw( writer, BAD_CAST( expiresStr.c_str() ) );
xmlTextWriterEndElement( writer ); // End of Expires
xmlTextWriterEndElement( writer ); // End of Timestamp
diff --git src/libcmis/document.cxx src/libcmis/document.cxx
index 7c2a8e6..e7014cb 100644
--- src/libcmis/document.cxx
+++ src/libcmis/document.cxx
@@ -78,7 +78,7 @@ namespace libcmis
{
long contentLength = 0;
map< string, libcmis::PropertyPtr >::const_iterator it = getProperties( ).find( string( "cmis:contentStreamLength" ) );
- if ( it != getProperties( ).end( ) && !it->second->getStrings( ).empty( ) )
+ if ( it != getProperties( ).end( ) && !it->second->getLongs( ).empty( ) )
contentLength = it->second->getLongs( ).front( );
return contentLength;
}
diff --git src/libcmis/ws-relatedmultipart.cxx src/libcmis/ws-relatedmultipart.cxx
index ef91b4d..3a990e7 100644
--- src/libcmis/ws-relatedmultipart.cxx
+++ src/libcmis/ws-relatedmultipart.cxx
@@ -93,6 +93,8 @@ RelatedMultipart::RelatedMultipart( const string& body, const string& contentTyp
if ( value[0] == '"' && value[value.length() - 1] == '"' )
value = value.substr( 1, value.length( ) - 2 );
+ name = libcmis::trim( name );
+
if ( name == "start" )
{
m_startId = value;
--
|