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