bump product version to 4.1.6.2
[LibreOffice.git] / libcmis / libcmis-0.3.0-proxy.patch
blob7311b023e7bf517bf9c96f559cfaaca914cb70d5
1 diff --git NEWS NEWS
2 index 6e9c10d..0047613 100644
3 --- NEWS
4 +++ NEWS
5 @@ -50,3 +50,6 @@
6 * Session factory automatically detects which binding to use
7 * C wrapper API
8 * Unit tests are now split between quick ones and the ones needing a CMIS server
10 +0.3.1
11 + * Added support for proxy configuration
12 diff --git doc/cmis-client.xml doc/cmis-client.xml
13 index b7dce51..2d6cdea 100644
14 --- doc/cmis-client.xml
15 +++ doc/cmis-client.xml
16 @@ -213,6 +213,41 @@
17 </para>
18 </listitem>
19 </varlistentry>
20 + <varlistentry>
21 + <term>--proxy <replaceable class="parameter">url</replaceable></term>
22 + <listitem>
23 + <para>
24 + Use <replaceable class="parameter">url</replaceable> as the HTTP proxy.
25 + Setting this value will override the system proxy settings.
26 + </para>
27 + </listitem>
28 + </varlistentry>
29 + <varlistentry>
30 + <term>--proxy-username <replaceable class="parameter">login</replaceable></term>
31 + <listitem>
32 + <para>
33 + Use <replaceable class="parameter">login</replaceable> to authenticate on the HTTP proxy.
34 + </para>
35 + </listitem>
36 + </varlistentry>
37 + <varlistentry>
38 + <term>--proxy-password <replaceable class="parameter">secret</replaceable></term>
39 + <listitem>
40 + <para>
41 + Use <replaceable class="parameter">secret</replaceable> to authenticate on the HTTP proxy.
42 + </para>
43 + </listitem>
44 + </varlistentry>
45 + <varlistentry>
46 + <term>--noproxy <replaceable class="parameter">list</replaceable></term>
47 + <listitem>
48 + <para>
49 + Proxy settings won't apply to hostnames and domain names listed
50 + in <replaceable class="parameter">list</replaceable>.
51 + This value is a coma separated list.
52 + </para>
53 + </listitem>
54 + </varlistentry>
55 </variablelist>
56 </refsect2>
57 <refsect2>
58 diff --git src/cmis-client.cxx src/cmis-client.cxx
59 index 587a05b..432e140 100644
60 --- src/cmis-client.cxx
61 +++ src/cmis-client.cxx
62 @@ -121,11 +121,32 @@ libcmis::Session* CmisClient::getSession( ) throw ( CommandException, libcmis::E
63 password = m_vm["password"].as< string >();
66 + // Look for proxy settings
67 + string proxyUrl;
68 + string proxyUser;
69 + string proxyPass;
70 + string noproxy;
71 + if ( m_vm.count( "proxy" ) > 0 )
72 + {
73 + proxyUrl = m_vm["proxy"].as< string >();
75 + if ( m_vm.count( "proxy-user" ) > 0 )
76 + proxyUser = m_vm["proxy-user"].as< string >();
78 + if ( m_vm.count( "proxy-password" ) > 0 )
79 + proxyPass = m_vm["proxy-password"].as< string >();
81 + if ( m_vm.count( "noproxy" ) > 0 )
82 + noproxy = m_vm["noproxy"].as< string >();
84 + libcmis::SessionFactory::setProxySettings( proxyUrl, noproxy, proxyUser, proxyPass );
85 + }
87 bool verbose = m_vm.count( "verbose" ) > 0;
89 string repoId;
90 - list< libcmis::RepositoryPtr > repositories = libcmis::SessionFactory:: getRepositories( url, username, password, verbose );
91 + list< libcmis::RepositoryPtr > repositories = libcmis::SessionFactory::getRepositories(
92 + url, username, password, verbose );
93 if ( repositories.size( ) == 1 )
94 repoId = repositories.front( )->getId( );
95 else
96 @@ -169,10 +190,31 @@ void CmisClient::execute( ) throw ( exception )
97 password = m_vm["password"].as< string >();
100 + // Look for proxy settings
101 + string proxyUrl;
102 + string proxyUser;
103 + string proxyPass;
104 + string noproxy;
105 + if ( m_vm.count( "proxy" ) > 0 )
107 + proxyUrl = m_vm["proxy"].as< string >();
109 + if ( m_vm.count( "proxy-user" ) > 0 )
110 + proxyUser = m_vm["proxy-user"].as< string >();
112 + if ( m_vm.count( "proxy-password" ) > 0 )
113 + proxyPass = m_vm["proxy-password"].as< string >();
115 + if ( m_vm.count( "noproxy" ) > 0 )
116 + noproxy = m_vm["noproxy"].as< string >();
118 + libcmis::SessionFactory::setProxySettings( proxyUrl, noproxy, proxyUser, proxyPass );
121 bool verbose = m_vm.count( "verbose" ) > 0;
123 - list< libcmis::RepositoryPtr > repos = libcmis::SessionFactory::getRepositories( url, username, password, verbose );
124 + list< libcmis::RepositoryPtr > repos = libcmis::SessionFactory::getRepositories(
125 + url, username, password, verbose );
127 cout << "Repositories: name (id)" << endl;
128 for ( list< libcmis::RepositoryPtr >::iterator it = repos.begin(); it != repos.end(); ++it )
129 @@ -828,6 +870,11 @@ options_description CmisClient::getOptionsDescription( )
130 ( "repository,r", value< string >(), "Name of the repository to use" )
131 ( "username,u", value< string >(), "Username used to authenticate to the repository" )
132 ( "password,p", value< string >(), "Password used to authenticate to the repository" )
133 + ( "proxy", value< string >(), "HTTP proxy url to override the system settings" )
134 + ( "noproxy", value< string >(), "Coma separated list if host and domain names not going"
135 + "through the proxy" )
136 + ( "proxy-username", value< string >(), "Username to authenticate on the proxy" )
137 + ( "proxy-password", value< string >(), "Password to authenticate on the proxy" )
140 options_description setcontentOpts( "modification operations options" );
141 diff --git src/libcmis-c/session-factory.cxx src/libcmis-c/session-factory.cxx
142 index a171c82..7ebb278 100644
143 --- src/libcmis-c/session-factory.cxx
144 +++ src/libcmis-c/session-factory.cxx
145 @@ -37,6 +37,33 @@
147 using namespace std;
149 +void libcmis_setProxySettings( char* proxy, char* noProxy,
150 + char* proxyUser, char* proxyPass )
152 + libcmis::SessionFactory::setProxySettings( string( proxy ), string( noProxy ),
153 + string( proxyUser ), string( proxyPass ) );
156 +const char* libcmis_getProxy( )
158 + return libcmis::SessionFactory::getProxy( ).c_str();
161 +const char* libcmis_getNoProxy( )
163 + return libcmis::SessionFactory::getNoProxy( ).c_str();
166 +const char* libcmis_getProxyUser( )
168 + return libcmis::SessionFactory::getProxyUser( ).c_str();
171 +const char* libcmis_getProxyPass( )
173 + return libcmis::SessionFactory::getProxyPass( ).c_str();
176 libcmis_SessionPtr libcmis_createSession(
177 char* bindingUrl,
178 char* repositoryId,
179 @@ -49,7 +76,8 @@ libcmis_SessionPtr libcmis_createSession(
183 - libcmis::Session* handle = libcmis::SessionFactory::createSession( bindingUrl, username, password, repositoryId, verbose );
184 + libcmis::Session* handle = libcmis::SessionFactory::createSession( bindingUrl, username,
185 + password, repositoryId, verbose );
186 session = new libcmis_session( );
187 session->handle = handle;
189 diff --git src/libcmis-c/session-factory.h src/libcmis-c/session-factory.h
190 index ad95acc..d28059e 100644
191 --- src/libcmis-c/session-factory.h
192 +++ src/libcmis-c/session-factory.h
193 @@ -34,6 +34,17 @@ extern "C" {
195 #include "types.h"
197 +void libcmis_setProxySettings(
198 + char* proxy,
199 + char* noProxy,
200 + char* proxyUser,
201 + char* proxyPass );
203 +const char* libcmis_getProxy( );
204 +const char* libcmis_getNoProxy( );
205 +const char* libcmis_getProxyUser( );
206 +const char* libcmis_getProxyPass( );
208 libcmis_SessionPtr libcmis_createSession(
209 char* bindingUrl,
210 char* repositoryId,
211 diff --git src/libcmis/atom-session.cxx src/libcmis/atom-session.cxx
212 index 1716755..1f8ac2d 100644
213 --- src/libcmis/atom-session.cxx
214 +++ src/libcmis/atom-session.cxx
215 @@ -39,7 +39,7 @@
217 using namespace std;
219 -AtomPubSession::AtomPubSession( string atomPubUrl, string repositoryId,
220 +AtomPubSession::AtomPubSession( string atomPubUrl, string repositoryId,
221 string username, string password, bool verbose ) throw ( libcmis::Exception ) :
222 BaseSession( atomPubUrl, repositoryId, username, password, verbose ),
223 m_repository( )
224 @@ -139,7 +139,8 @@ void AtomPubSession::initialize( ) throw ( libcmis::Exception )
228 -list< libcmis::RepositoryPtr > AtomPubSession::getRepositories( string url, string username, string password, bool verbose ) throw ( libcmis::Exception )
229 +list< libcmis::RepositoryPtr > AtomPubSession::getRepositories( string url, string username,
230 + string password, bool verbose ) throw ( libcmis::Exception )
232 AtomPubSession session( url, string(), username, password, verbose );
233 return session.m_repositories;
234 diff --git src/libcmis/atom-session.hxx src/libcmis/atom-session.hxx
235 index 568b9b0..29eb359 100644
236 --- src/libcmis/atom-session.hxx
237 +++ src/libcmis/atom-session.hxx
238 @@ -39,7 +39,7 @@ class AtomPubSession : public BaseSession
239 public:
240 AtomPubSession( std::string sAtomPubUrl, std::string repositoryId,
241 std::string username, std::string password,
242 - bool verbose ) throw ( libcmis::Exception );
243 + bool verbose =false ) throw ( libcmis::Exception );
244 AtomPubSession( const AtomPubSession& copy );
245 ~AtomPubSession( );
247 diff --git src/libcmis/base-session.cxx src/libcmis/base-session.cxx
248 index adc030e..b007a9d 100644
249 --- src/libcmis/base-session.cxx
250 +++ src/libcmis/base-session.cxx
251 @@ -33,6 +33,7 @@
252 #include <libxml/xpath.h>
254 #include "base-session.hxx"
255 +#include "session-factory.hxx"
256 #include "xml-utils.hxx"
258 using namespace std;
259 @@ -105,11 +106,12 @@ namespace
263 -BaseSession::BaseSession( string atomPubUrl, string repositoryId,
264 - string username, string password, bool verbose ) throw ( libcmis::Exception ) :
265 +BaseSession::BaseSession( string atomPubUrl, string repositoryId, string username,
266 + string password, bool verbose ) throw ( libcmis::Exception ) :
267 Session( ),
268 m_authProvider( ),
269 m_curlHandle( NULL ),
270 + m_no100Continue( false ),
271 m_bindingUrl( atomPubUrl ),
272 m_repositoryId( repositoryId ),
273 m_username( username ),
274 @@ -127,6 +129,7 @@ BaseSession::BaseSession( const BaseSession& copy ) :
275 Session( ),
276 m_authProvider( copy.m_authProvider ),
277 m_curlHandle( NULL ),
278 + m_no100Continue( copy.m_no100Continue ),
279 m_bindingUrl( copy.m_bindingUrl ),
280 m_repositoryId( copy.m_repositoryId ),
281 m_username( copy.m_username ),
282 @@ -141,11 +144,11 @@ BaseSession::BaseSession( const BaseSession& copy ) :
283 m_curlHandle = curl_easy_init( );
287 BaseSession& BaseSession::operator=( const BaseSession& copy )
289 m_authProvider = copy.m_authProvider;
290 m_curlHandle = NULL;
291 + m_no100Continue = copy.m_no100Continue;
292 m_bindingUrl = copy.m_bindingUrl;
293 m_repositoryId = copy.m_repositoryId;
294 m_username = copy.m_username;
295 @@ -186,7 +189,7 @@ string BaseSession::createUrl( const string& pattern, map< string, string > vari
296 if ( pos != string::npos )
298 // Escape the URL by chunks
299 -#if LIBCURL_VERSION_VALUE >= 0x071504
300 +#if LIBCURL_VERSION_VALUE >= 0x070F04
301 char* escaped = curl_easy_escape( m_curlHandle, value.c_str(), value.length() );
302 #else
303 char* escaped = curl_escape( value.c_str(), value.length() );
304 @@ -215,6 +218,9 @@ string BaseSession::createUrl( const string& pattern, map< string, string > vari
306 libcmis::HttpResponsePtr BaseSession::httpGetRequest( string url ) throw ( CurlException )
308 + // Reset the handle for the request
309 + curl_easy_reset( m_curlHandle );
311 libcmis::HttpResponsePtr response( new libcmis::HttpResponse( ) );
313 curl_easy_setopt( m_curlHandle, CURLOPT_WRITEFUNCTION, lcl_bufferData );
314 @@ -244,6 +250,9 @@ libcmis::HttpResponsePtr BaseSession::httpGetRequest( string url ) throw ( CurlE
316 libcmis::HttpResponsePtr BaseSession::httpPutRequest( string url, istream& is, vector< string > headers ) throw ( CurlException )
318 + // Reset the handle for the request
319 + curl_easy_reset( m_curlHandle );
321 libcmis::HttpResponsePtr response( new libcmis::HttpResponse( ) );
323 curl_easy_setopt( m_curlHandle, CURLOPT_WRITEFUNCTION, lcl_bufferData );
324 @@ -266,12 +275,32 @@ libcmis::HttpResponsePtr BaseSession::httpPutRequest( string url, istream& is, v
325 struct curl_slist *headers_slist = NULL;
326 for ( vector< string >::iterator it = headers.begin( ); it != headers.end( ); ++it )
327 headers_slist = curl_slist_append( headers_slist, it->c_str( ) );
329 + // If we know for sure that 100-Continue won't be accepted,
330 + // don't even try with it to save one HTTP request.
331 + if ( m_no100Continue )
332 + headers_slist = curl_slist_append( headers_slist, "Expect:" );
333 curl_easy_setopt( m_curlHandle, CURLOPT_HTTPHEADER, headers_slist );
337 httpRunRequest( url );
338 response->getData( )->finish();
340 + /** If we had a HTTP 417 response, this is likely to be due to some
341 + HTTP 1.0 proxy / server not accepting the "Expect: 100-continue"
342 + header. Try to disable this header and try again.
343 + */
344 + if ( getHttpStatus() == 417 )
346 + headers_slist = curl_slist_append( headers_slist, "Expect:" );
347 + curl_easy_setopt( m_curlHandle, CURLOPT_HTTPHEADER, headers_slist );
348 + httpRunRequest( url );
349 + response->getData( )->finish();
351 + // Remember that we don't want 100-Continue for the future requests
352 + m_no100Continue = true;
355 catch ( CurlException& e )
357 @@ -286,6 +315,9 @@ libcmis::HttpResponsePtr BaseSession::httpPutRequest( string url, istream& is, v
359 libcmis::HttpResponsePtr BaseSession::httpPostRequest( string url, istringstream& is, string contentType ) throw ( CurlException )
361 + // Reset the handle for the request
362 + curl_easy_reset( m_curlHandle );
364 libcmis::HttpResponsePtr response( new libcmis::HttpResponse( ) );
366 curl_easy_setopt( m_curlHandle, CURLOPT_WRITEFUNCTION, lcl_bufferData );
367 @@ -308,12 +340,32 @@ libcmis::HttpResponsePtr BaseSession::httpPostRequest( string url, istringstream
368 struct curl_slist *headers_slist = NULL;
369 string contentTypeHeader = string( "Content-Type:" ) + contentType;
370 headers_slist = curl_slist_append( headers_slist, contentTypeHeader.c_str( ) );
372 + // If we know for sure that 100-Continue won't be accepted,
373 + // don't even try with it to save one HTTP request.
374 + if ( m_no100Continue )
375 + headers_slist = curl_slist_append( headers_slist, "Expect:" );
376 curl_easy_setopt( m_curlHandle, CURLOPT_HTTPHEADER, headers_slist );
380 httpRunRequest( url );
381 response->getData( )->finish();
383 + /** If we had a HTTP 417 response, this is likely to be due to some
384 + HTTP 1.0 proxy / server not accepting the "Expect: 100-continue"
385 + header. Try to disable this header and try again.
386 + */
387 + if ( getHttpStatus() == 417 )
389 + headers_slist = curl_slist_append( headers_slist, "Expect:" );
390 + curl_easy_setopt( m_curlHandle, CURLOPT_HTTPHEADER, headers_slist );
391 + httpRunRequest( url );
392 + response->getData( )->finish();
394 + // Remember that we don't want 100-Continue for the future requests
395 + m_no100Continue = true;
398 catch ( const CurlException& e )
400 @@ -328,6 +380,9 @@ libcmis::HttpResponsePtr BaseSession::httpPostRequest( string url, istringstream
402 void BaseSession::httpDeleteRequest( string url ) throw ( CurlException )
404 + // Reset the handle for the request
405 + curl_easy_reset( m_curlHandle );
407 curl_easy_setopt( m_curlHandle, CURLOPT_CUSTOMREQUEST, "DELETE" );
408 httpRunRequest( url );
410 @@ -351,7 +406,7 @@ void BaseSession::httpRunRequest( string url ) throw ( CurlException )
412 curl_easy_setopt( m_curlHandle, CURLOPT_HTTPAUTH, CURLAUTH_ANY );
414 -#if LIBCURL_VERSION_VALUE >= 0x071901
415 +#if LIBCURL_VERSION_VALUE >= 0x071301
416 curl_easy_setopt( m_curlHandle, CURLOPT_USERNAME, m_username.c_str() );
417 curl_easy_setopt( m_curlHandle, CURLOPT_PASSWORD, m_password.c_str() );
418 #else
419 @@ -360,6 +415,28 @@ void BaseSession::httpRunRequest( string url ) throw ( CurlException )
420 #endif
423 + // Set the proxy configuration if any
424 + if ( !libcmis::SessionFactory::getProxy( ).empty() )
426 + curl_easy_setopt( m_curlHandle, CURLOPT_PROXY, libcmis::SessionFactory::getProxy( ).c_str() );
427 +#if LIBCURL_VERSION_VALUE >= 0x071304
428 + curl_easy_setopt( m_curlHandle, CURLOPT_NOPROXY, libcmis::SessionFactory::getNoProxy( ).c_str() );
429 +#endif
430 + const string& proxyUser = libcmis::SessionFactory::getProxyUser( );
431 + const string& proxyPass = libcmis::SessionFactory::getProxyPass( );
432 + if ( !proxyUser.empty( ) && !proxyPass.empty( ) )
434 + curl_easy_setopt( m_curlHandle, CURLOPT_PROXYAUTH, CURLAUTH_ANY );
435 +#if LIBCURL_VERSION_VALUE >= 0X071301
436 + curl_easy_setopt( m_curlHandle, CURLOPT_PROXYUSERNAME, proxyUser.c_str( ) );
437 + curl_easy_setopt( m_curlHandle, CURLOPT_PROXYPASSWORD, proxyPass.c_str( ) );
438 +#else
439 + string userpwd = proxyUser + ":" + proxyPass;
440 + curl_easy_setopt( m_curlHandle, CURLOPT_PROXYUSERPWD, userpwd.c_str( ) );
441 +#endif
445 // Get some feedback when something wrong happens
446 char errBuff[CURL_ERROR_SIZE];
447 curl_easy_setopt( m_curlHandle, CURLOPT_ERRORBUFFER, errBuff );
448 @@ -373,9 +450,6 @@ void BaseSession::httpRunRequest( string url ) throw ( CurlException )
450 // Perform the query
451 CURLcode errCode = curl_easy_perform( m_curlHandle );
453 - // Reset the handle for the next request
454 - curl_easy_reset( m_curlHandle );
456 bool isHttpError = errCode == CURLE_HTTP_RETURNED_ERROR;
457 if ( CURLE_OK != errCode && !( m_noHttpErrors && isHttpError ) )
458 diff --git src/libcmis/base-session.hxx src/libcmis/base-session.hxx
459 index fb95ba7..0b90c1f 100644
460 --- src/libcmis/base-session.hxx
461 +++ src/libcmis/base-session.hxx
462 @@ -94,6 +94,7 @@ class BaseSession : public libcmis::Session
463 libcmis::AuthProviderPtr m_authProvider;
465 CURL* m_curlHandle;
466 + bool m_no100Continue;
468 protected:
469 std::string m_bindingUrl;
470 @@ -110,7 +111,7 @@ class BaseSession : public libcmis::Session
471 public:
472 BaseSession( std::string sBindingUrl, std::string repository,
473 std::string username, std::string password,
474 - bool verbose ) throw ( libcmis::Exception );
475 + bool verbose = false ) throw ( libcmis::Exception );
476 BaseSession( const BaseSession& copy );
477 ~BaseSession( );
479 @@ -137,8 +138,6 @@ class BaseSession : public libcmis::Session
480 libcmis::HttpResponsePtr httpPostRequest( std::string url, std::istringstream& is, std::string contentType ) throw ( CurlException );
481 void httpDeleteRequest( std::string url ) throw ( CurlException );
483 - void httpRunRequest( std::string url ) throw ( CurlException );
485 long getHttpStatus( );
487 // Session methods
488 @@ -148,6 +147,8 @@ class BaseSession : public libcmis::Session
489 virtual libcmis::FolderPtr getFolder( std::string id ) throw ( libcmis::Exception );
491 virtual void setAuthenticationProvider( libcmis::AuthProviderPtr provider ) { m_authProvider = provider; }
492 + private:
493 + void httpRunRequest( std::string url ) throw ( CurlException );
496 #endif
497 diff --git src/libcmis/session-factory.cxx src/libcmis/session-factory.cxx
498 index d7d886b..afe6943 100644
499 --- src/libcmis/session-factory.cxx
500 +++ src/libcmis/session-factory.cxx
501 @@ -33,8 +33,23 @@ using namespace std;
503 namespace libcmis
505 + string SessionFactory::s_proxy;
506 + string SessionFactory::s_noProxy;
507 + string SessionFactory::s_proxyUser;
508 + string SessionFactory::s_proxyPass;
510 + void SessionFactory::setProxySettings( string proxy, string noProxy,
511 + string proxyUser, string proxyPass )
513 + SessionFactory::s_proxy = proxy;
514 + SessionFactory::s_noProxy = noProxy;
515 + SessionFactory::s_proxyUser = proxyUser;
516 + SessionFactory::s_proxyPass = proxyPass;
519 Session* SessionFactory::createSession( string bindingUrl, string username,
520 - string password, string repository, bool verbose ) throw ( Exception )
521 + string password, string repository,
522 + bool verbose ) throw ( Exception )
524 Session* session = NULL;
526 @@ -68,8 +83,8 @@ namespace libcmis
527 return session;
530 - list< RepositoryPtr > SessionFactory::getRepositories( string bindingUrl, string username,
531 - string password, bool verbose ) throw ( Exception )
532 + list< RepositoryPtr > SessionFactory::getRepositories( string bindingUrl,
533 + string username, string password, bool verbose ) throw ( Exception )
535 list< RepositoryPtr > repos;
537 diff --git src/libcmis/session-factory.hxx src/libcmis/session-factory.hxx
538 index 677c2ab..598497f 100644
539 --- src/libcmis/session-factory.hxx
540 +++ src/libcmis/session-factory.hxx
541 @@ -40,8 +40,24 @@ namespace libcmis
543 class SessionFactory
545 + private:
546 + static std::string s_proxy;
547 + static std::string s_noProxy;
548 + static std::string s_proxyUser;
549 + static std::string s_proxyPass;
551 public:
553 + static void setProxySettings( std::string proxy,
554 + std::string noProxy,
555 + std::string proxyUser,
556 + std::string proxyPass );
558 + static const std::string& getProxy() { return s_proxy; }
559 + static const std::string& getNoProxy() { return s_noProxy; }
560 + static const std::string& getProxyUser() { return s_proxyUser; }
561 + static const std::string& getProxyPass() { return s_proxyPass; }
563 /** Create a session from the given parameters. The binding type is automatically
564 detected based on the provided URL.
566 diff --git src/libcmis/test-atom.cxx src/libcmis/test-atom.cxx
567 index 4ee64ea..624078d 100644
568 --- src/libcmis/test-atom.cxx
569 +++ src/libcmis/test-atom.cxx
570 @@ -211,7 +211,7 @@ class TestAuthProvider : public libcmis::AuthProvider
572 void AtomTest::authCallbackTest( )
574 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, string( ), false);
575 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, string( ) );
577 // Test cancelled authentication
579 @@ -239,7 +239,7 @@ void AtomTest::authCallbackTest( )
581 void AtomTest::getUnexistantTypeTest( )
583 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
584 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
588 @@ -254,7 +254,7 @@ void AtomTest::getUnexistantTypeTest( )
590 void AtomTest::getNormalTypeTest( )
592 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
593 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
595 libcmis::ObjectTypePtr type = session.getType( TEST_TYPE_ID );
597 @@ -265,7 +265,7 @@ void AtomTest::getNormalTypeTest( )
599 void AtomTest::getTypeChildrenTest( )
601 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
602 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
604 libcmis::ObjectTypePtr type = session.getType( CHILDREN_TEST_TYPE_ID );
605 vector< libcmis::ObjectTypePtr > children = type->getChildren( );
606 @@ -275,7 +275,7 @@ void AtomTest::getTypeChildrenTest( )
608 void AtomTest::getUnexistantFolderTest( )
610 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
611 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
615 @@ -290,7 +290,7 @@ void AtomTest::getUnexistantFolderTest( )
617 void AtomTest::getUnexistantObjectTest( )
619 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
620 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
624 @@ -305,7 +305,7 @@ void AtomTest::getUnexistantObjectTest( )
626 void AtomTest::getFolderFromOtherNodeTest( )
628 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
629 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
630 libcmis::FolderPtr folder = session.getFolder( TEST_DOCUMENT_ID );
632 CPPUNIT_ASSERT_MESSAGE( "Nothing should be returned: not a folder",
633 @@ -314,7 +314,7 @@ void AtomTest::getFolderFromOtherNodeTest( )
635 void AtomTest::getFolderCreationFromUrlTest( )
637 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
638 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
639 libcmis::FolderPtr folder = session.getFolder( TEST_FOLDER_ID );
641 AtomFolder* atomFolder = dynamic_cast< AtomFolder* >( folder.get( ) );
642 @@ -336,7 +336,7 @@ void AtomTest::getFolderCreationFromUrlTest( )
644 void AtomTest::getDocumentCreationFromUrlTest( )
646 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
647 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
648 libcmis::ObjectPtr object = session.getObject( TEST_DOCUMENT_ID );
650 AtomDocument* atomDocument = dynamic_cast< AtomDocument* >( object.get( ) );
651 @@ -359,7 +359,7 @@ void AtomTest::getDocumentCreationFromUrlTest( )
653 void AtomTest::getByPathValidTest( )
655 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
656 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
659 libcmis::ObjectPtr object = session.getObjectByPath( TEST_PATH_VALID );
660 @@ -376,7 +376,7 @@ void AtomTest::getByPathValidTest( )
662 void AtomTest::getByPathInvalidTest( )
664 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
665 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
668 libcmis::ObjectPtr object = session.getObjectByPath( TEST_PATH_INVALID );
669 @@ -391,7 +391,7 @@ void AtomTest::getByPathInvalidTest( )
671 void AtomTest::getAllowableActionsTest( )
673 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
674 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
675 libcmis::FolderPtr folder = session.getRootFolder( );
677 boost::shared_ptr< libcmis::AllowableActions > toCheck = folder->getAllowableActions( );
678 @@ -405,7 +405,7 @@ void AtomTest::getAllowableActionsTest( )
680 void AtomTest::getChildrenTest( )
682 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
683 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
684 libcmis::FolderPtr folder = session.getRootFolder( );
686 vector< libcmis::ObjectPtr > children = folder->getChildren( );
687 @@ -429,7 +429,7 @@ void AtomTest::getChildrenTest( )
689 void AtomTest::getObjectParentsTest( )
691 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
692 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
693 libcmis::ObjectPtr object = session.getObject( TEST_DOCUMENT_ID );
694 libcmis::Document* document = dynamic_cast< libcmis::Document* >( object.get() );
696 @@ -445,7 +445,7 @@ void AtomTest::getObjectParentsTest( )
698 void AtomTest::getContentStreamTest( )
700 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
701 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
702 libcmis::ObjectPtr object = session.getObject( TEST_DOCUMENT_ID );
703 libcmis::Document* document = dynamic_cast< libcmis::Document* >( object.get() );
705 @@ -467,7 +467,7 @@ void AtomTest::getContentStreamTest( )
707 void AtomTest::setContentStreamTest( )
709 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
710 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
711 libcmis::ObjectPtr object = session.getObject( TEST_DOCUMENT_ID );
712 libcmis::Document* document = dynamic_cast< libcmis::Document* >( object.get() );
714 @@ -503,7 +503,7 @@ void AtomTest::setContentStreamTest( )
716 void AtomTest::updatePropertiesTest( )
718 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
719 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
721 // Values for the test
722 libcmis::ObjectPtr object = session.getObject( "114" );
723 @@ -530,7 +530,7 @@ void AtomTest::updatePropertiesTest( )
725 void AtomTest::createFolderTest( )
727 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
728 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
729 libcmis::FolderPtr parent = session.getFolder( session.getRootId( ) );
731 // Prepare the properties for the new object, object type is cmis:folder
732 @@ -564,7 +564,7 @@ void AtomTest::createFolderTest( )
734 void AtomTest::createFolderBadTypeTest( )
736 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
737 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
738 libcmis::FolderPtr parent = session.getFolder( session.getRootId( ) );
740 // Prepare the properties for the new object, object type is cmis:document to trigger the exception
741 @@ -603,7 +603,7 @@ void AtomTest::createFolderBadTypeTest( )
743 void AtomTest::createDocumentTest( )
745 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
746 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
747 libcmis::FolderPtr parent = session.getFolder( session.getRootId( ) );
749 // Prepare the properties for the new object, object type is cmis:folder
750 @@ -647,7 +647,7 @@ void AtomTest::createDocumentTest( )
752 void AtomTest::deleteDocumentTest( )
754 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
755 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
757 string id( "130" );
758 libcmis::ObjectPtr object = session.getObject( id );
759 @@ -669,7 +669,7 @@ void AtomTest::deleteDocumentTest( )
761 void AtomTest::deleteTreeTest( )
763 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
764 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
766 string id( "117" );
767 libcmis::ObjectPtr object = session.getObject( id );
768 @@ -691,7 +691,7 @@ void AtomTest::deleteTreeTest( )
770 void AtomTest::checkOutTest( )
772 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
773 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
775 // First create a document of type VersionableType
776 libcmis::DocumentPtr doc = test::createVersionableDocument( &session, "checkOutTest" );
777 @@ -709,7 +709,7 @@ void AtomTest::checkOutTest( )
779 void AtomTest::cancelCheckOutTest( )
781 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
782 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
784 // First create a versionable document and check it out
785 libcmis::DocumentPtr doc = test::createVersionableDocument( &session, "cancelCheckOutTest" );
786 @@ -734,7 +734,7 @@ void AtomTest::cancelCheckOutTest( )
788 void AtomTest::checkInTest( )
790 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
791 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
793 // First create a versionable document and check it out
794 libcmis::DocumentPtr doc = test::createVersionableDocument( &session, "checkInTest" );
795 @@ -770,7 +770,7 @@ void AtomTest::checkInTest( )
797 void AtomTest::getAllVersionsTest( )
799 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
800 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
802 // First create a versionable document and check it out
803 libcmis::DocumentPtr doc = test::createVersionableDocument( &session, "getAllVersionsTest" );
804 @@ -795,7 +795,7 @@ void AtomTest::getAllVersionsTest( )
806 void AtomTest::moveTest( )
808 - AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD, false );
809 + AtomPubSession session( SERVER_ATOM_URL, SERVER_REPOSITORY, SERVER_USERNAME, SERVER_PASSWORD );
811 string id( "135" );
812 libcmis::ObjectPtr object = session.getObject( id );
813 diff --git src/libcmis/test-ws.cxx src/libcmis/test-ws.cxx
814 index 1b5dfee..ad564bc 100644
815 --- src/libcmis/test-ws.cxx
816 +++ src/libcmis/test-ws.cxx
817 @@ -136,19 +136,19 @@ void WSTest::getRepositoriesTest()
819 void WSTest::sessionCreationTest( )
821 - WSSession session( SERVER_WSDL_URL, "", SERVER_USERNAME, SERVER_PASSWORD, false );
822 + WSSession session( SERVER_WSDL_URL, "", SERVER_USERNAME, SERVER_PASSWORD );
823 CPPUNIT_ASSERT_MESSAGE( "No RepositoryService URL", !session.getServiceUrl( "RepositoryService" ).empty( ) );
826 void WSTest::getRepositoryTest( )
828 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
829 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
830 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Repository info badly retrieved", string( "100" ), session.getRepository()->getRootId( ) );
833 void WSTest::getRepositoryBadTest( )
835 - WSSession session( SERVER_WSDL_URL, "", SERVER_USERNAME, SERVER_PASSWORD, false );
836 + WSSession session( SERVER_WSDL_URL, "", SERVER_USERNAME, SERVER_PASSWORD );
839 session.getRepositoryService( ).getRepositoryInfo( "bad" );
840 @@ -164,7 +164,7 @@ void WSTest::getRepositoryBadTest( )
842 void WSTest::getTypeDefinitionTest( )
844 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
845 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
846 string id( "ComplexType" );
847 libcmis::ObjectTypePtr actual = session.getType( id );
849 @@ -175,7 +175,7 @@ void WSTest::getTypeDefinitionTest( )
851 void WSTest::getTypeDefinitionErrorTest( )
853 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
854 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
856 string id( "bad_type" );
858 @@ -192,7 +192,7 @@ void WSTest::getTypeDefinitionErrorTest( )
860 void WSTest::getTypeChildrenTest( )
862 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
863 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
864 libcmis::ObjectTypePtr actual = session.getType( "cmis:document" );
866 vector< libcmis::ObjectTypePtr > children = actual->getChildren( );
867 @@ -202,7 +202,7 @@ void WSTest::getTypeChildrenTest( )
869 void WSTest::getObjectTest( )
871 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
872 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
873 string id( "101" );
874 libcmis::ObjectPtr actual = session.getObject( id );
876 @@ -217,7 +217,7 @@ void WSTest::getObjectTest( )
878 void WSTest::getObjectDocumentTest( )
880 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
881 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
882 string id( "114" );
883 libcmis::ObjectPtr actual = session.getObject( id );
885 @@ -232,7 +232,7 @@ void WSTest::getObjectDocumentTest( )
887 void WSTest::getObjectParentsTest( )
889 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
890 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
891 libcmis::ObjectPtr object = session.getObject( "116" );
892 libcmis::Document* document = dynamic_cast< libcmis::Document* >( object.get() );
894 @@ -248,7 +248,7 @@ void WSTest::getObjectParentsTest( )
896 void WSTest::getChildrenTest( )
898 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
899 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
900 libcmis::FolderPtr folder = session.getRootFolder( );
902 vector< libcmis::ObjectPtr > children = folder->getChildren( );
903 @@ -270,7 +270,7 @@ void WSTest::getChildrenTest( )
905 void WSTest::getByPathValidTest( )
907 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
908 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
911 libcmis::ObjectPtr object = session.getObjectByPath( "/My_Folder-0-0/My_Document-1-2" );
912 @@ -287,7 +287,7 @@ void WSTest::getByPathValidTest( )
914 void WSTest::getByPathInvalidTest( )
916 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
917 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
920 libcmis::ObjectPtr object = session.getObjectByPath( "/some/dummy/path" );
921 @@ -302,7 +302,7 @@ void WSTest::getByPathInvalidTest( )
923 void WSTest::updatePropertiesTest( )
925 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
926 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
928 // Values for the test
929 libcmis::ObjectPtr object = session.getObject( "114" );
930 @@ -329,7 +329,7 @@ void WSTest::updatePropertiesTest( )
932 void WSTest::createFolderTest( )
934 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
935 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
936 libcmis::FolderPtr parent = session.getFolder( session.getRootId( ) );
938 // Prepare the properties for the new object, object type is cmis:folder
939 @@ -363,7 +363,7 @@ void WSTest::createFolderTest( )
941 void WSTest::createFolderBadTypeTest( )
943 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
944 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
945 libcmis::FolderPtr parent = session.getFolder( session.getRootId( ) );
947 // Prepare the properties for the new object, object type is cmis:document to trigger the exception
948 @@ -401,7 +401,7 @@ void WSTest::createFolderBadTypeTest( )
950 void WSTest::createDocumentTest( )
952 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
953 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
954 libcmis::FolderPtr parent = session.getFolder( session.getRootId( ) );
956 // Prepare the properties for the new object, object type is cmis:folder
957 @@ -444,7 +444,7 @@ void WSTest::createDocumentTest( )
959 void WSTest::deleteObjectTest( )
961 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
962 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
964 // Get the object to remove
965 string id( "130" );
966 @@ -467,7 +467,7 @@ void WSTest::deleteObjectTest( )
968 void WSTest::deleteTreeTest( )
970 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
971 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
973 string id( "117" );
974 libcmis::ObjectPtr object = session.getObject( id );
975 @@ -489,7 +489,7 @@ void WSTest::deleteTreeTest( )
977 void WSTest::moveTest( )
979 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
980 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
982 string id( "135" );
983 libcmis::ObjectPtr object = session.getObject( id );
984 @@ -508,7 +508,7 @@ void WSTest::moveTest( )
986 void WSTest::getContentStreamTest( )
988 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
989 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
990 libcmis::ObjectPtr object = session.getObject( "116" );
991 libcmis::Document* document = dynamic_cast< libcmis::Document* >( object.get() );
993 @@ -532,7 +532,7 @@ void WSTest::getContentStreamTest( )
995 void WSTest::setContentStreamTest( )
997 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
998 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
999 libcmis::ObjectPtr object = session.getObject( "116" );
1000 libcmis::Document* document = dynamic_cast< libcmis::Document* >( object.get() );
1002 @@ -570,7 +570,7 @@ void WSTest::setContentStreamTest( )
1004 void WSTest::checkOutTest( )
1006 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
1007 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
1009 // First create a document of type VersionableType
1010 libcmis::DocumentPtr doc = test::createVersionableDocument( &session, "checkOutTest" );
1011 @@ -588,7 +588,7 @@ void WSTest::checkOutTest( )
1013 void WSTest::cancelCheckOutTest( )
1015 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
1016 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
1018 // First create a versionable document and check it out
1019 libcmis::DocumentPtr doc = test::createVersionableDocument( &session, "cancelCheckOutTest" );
1020 @@ -613,7 +613,7 @@ void WSTest::cancelCheckOutTest( )
1022 void WSTest::checkInTest( )
1024 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
1025 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
1027 // First create a versionable document and check it out
1028 libcmis::DocumentPtr doc = test::createVersionableDocument( &session, "checkInTest" );
1029 @@ -649,7 +649,7 @@ void WSTest::checkInTest( )
1031 void WSTest::getAllVersionsTest( )
1033 - WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD, false );
1034 + WSSession session( SERVER_WSDL_URL, "A1", SERVER_USERNAME, SERVER_PASSWORD );
1036 // First create a versionable document and check it out
1037 libcmis::DocumentPtr doc = test::createVersionableDocument( &session, "getAllVersionsTest" );
1038 diff --git src/libcmis/ws-relatedmultipart.cxx src/libcmis/ws-relatedmultipart.cxx
1039 index 37f133a..ef91b4d 100644
1040 --- src/libcmis/ws-relatedmultipart.cxx
1041 +++ src/libcmis/ws-relatedmultipart.cxx
1042 @@ -299,7 +299,7 @@ boost::shared_ptr< istream > getStreamFromNode( xmlNodePtr node, RelatedMultipar
1044 id = href.substr( 4 );
1045 // URL-decode the id
1046 -#if LIBCURL_VERSION_VALUE >= 0x071504
1047 +#if LIBCURL_VERSION_VALUE >= 0x070F04
1048 char* escaped = curl_easy_unescape( NULL, id.c_str(), id.length(), NULL );
1049 #else
1050 char* escaped = curl_unescape( id.c_str(), id.length() );
1051 diff --git src/libcmis/ws-session.cxx src/libcmis/ws-session.cxx
1052 index b906a5a..f551109 100644
1053 --- src/libcmis/ws-session.cxx
1054 +++ src/libcmis/ws-session.cxx
1055 @@ -39,8 +39,8 @@
1057 using namespace std;
1059 -WSSession::WSSession( string bindingUrl, string repositoryId,
1060 - string username, string password, bool verbose ) throw ( libcmis::Exception ) :
1061 +WSSession::WSSession( string bindingUrl, string repositoryId, string username,
1062 + string password, bool verbose ) throw ( libcmis::Exception ) :
1063 BaseSession( bindingUrl, repositoryId, username, password, verbose ),
1064 m_servicesUrls( ),
1065 m_navigationService( NULL ),
1066 @@ -336,7 +336,8 @@ VersioningService& WSSession::getVersioningService( )
1067 return *m_versioningService;
1070 -list< libcmis::RepositoryPtr > WSSession::getRepositories( string url, string username, string password, bool verbose ) throw ( libcmis::Exception )
1071 +list< libcmis::RepositoryPtr > WSSession::getRepositories( string url, string username,
1072 + string password, bool verbose ) throw ( libcmis::Exception )
1074 WSSession session( url, string(), username, password, verbose );
1075 return session.m_repositories;
1076 diff --git src/libcmis/ws-session.hxx src/libcmis/ws-session.hxx
1077 index 952e914..e8b806a 100644
1078 --- src/libcmis/ws-session.hxx
1079 +++ src/libcmis/ws-session.hxx
1080 @@ -52,7 +52,7 @@ class WSSession : public BaseSession, public SoapSession
1081 public:
1082 WSSession( std::string bindingUrl, std::string repositoryId,
1083 std::string username, std::string password,
1084 - bool verbose ) throw ( libcmis::Exception );
1085 + bool verbose = false ) throw ( libcmis::Exception );
1086 WSSession( const WSSession& copy );
1087 ~WSSession( );