<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic HTTP Status 404 for AuthenticationService in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/http-status-404-for-authenticationservice/m-p/252412#M205542</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been using Alfresco Web Services to access an Alfresco repository (Alfresco 3.4.d) for the last few months with very encouraging success; however, for the last week, I've been struggling with an issue that I can't find a solution for. I'm trying to change a user's password.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I tried to call the ChangePassword method, there was no error, but the password wasn't changed. I then read that before the web script can change the password the AdministrationService endpoint must be set. Here's the C# code that I tried:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AdministrationService AdminService = new AdministrationService();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.setEndpointAddress("&lt;A href="http://192.168.20.10:8080/alfresco/api/AuthenticationService" rel="nofollow noopener noreferrer"&gt;http://192.168.20.10:8080/alfresco/api/AuthenticationService&lt;/A&gt;");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AuthenticationService authenticationService = new AuthenticationService();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authenticationService.startSession("admin", "password");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.setEndpointAddress("&lt;A href="http://192.168.20.10:8080/alfresco/api/AdministrationService" rel="nofollow noopener noreferrer"&gt;http://192.168.20.10:8080/alfresco/api/AdministrationService&lt;/A&gt;");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AdminService.changePassword(usernam, oldPasswd, newPasswd);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; authenticationService.endSession("admin");&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;This code causes an exception on the "StartSession" line with the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The request failed with HTTP status 404: /alfresco/api/AuthenticationService.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I searched and cannot find an AuthenticationService file or directory on my server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have two questions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Has anyone been able to successfully change a user's password using web scripts?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Does anyone know where the AuthenicationService and AdministrationService files are?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for any help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Aug 2012 17:20:44 GMT</pubDate>
    <dc:creator>ridgeway</dc:creator>
    <dc:date>2012-08-27T17:20:44Z</dc:date>
    <item>
      <title>HTTP Status 404 for AuthenticationService</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/http-status-404-for-authenticationservice/m-p/252412#M205542</link>
      <description>Hi All,I've been using Alfresco Web Services to access an Alfresco repository (Alfresco 3.4.d) for the last few months with very encouraging success; however, for the last week, I've been struggling with an issue that I can't find a solution for. I'm trying to change a user's password.When I tried t</description>
      <pubDate>Mon, 27 Aug 2012 17:20:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/http-status-404-for-authenticationservice/m-p/252412#M205542</guid>
      <dc:creator>ridgeway</dc:creator>
      <dc:date>2012-08-27T17:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Status 404 for AuthenticationService</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/http-status-404-for-authenticationservice/m-p/252413#M205543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well I have not done any coding in C# for alfresco &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but thing I want to point out is if you are setting endpoint this object is referring to what?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and where you are setting the end point you need to get the service from that context only.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In java we set endpoint in WebscriptSessionFactory and then get all the services from that factory only.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think this is the problem over here as well you should not use &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; AuthenticationService authenticationService = new AuthenticationService();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to fetch that service from context where you had set the endpoint.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 11:15:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/http-status-404-for-authenticationservice/m-p/252413#M205543</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2012-08-28T11:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Status 404 for AuthenticationService</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/http-status-404-for-authenticationservice/m-p/252414#M205544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thank you, Mits for your reply. Your questions set me on the right track and as you suggested the endpoint wasn't needed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The solution was very simple. Here it is if someone else is using C#:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;this.getAdministrationService().changePassword(username, oldPassword, newPassword);&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;The part that I was missing was the call to getAdministrationService()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Well I have not done any coding in C# for alfresco &lt;BR /&gt;but thing I want to point out is if you are setting endpoint this object is referring to what?&lt;BR /&gt;&lt;BR /&gt;and where you are setting the end point you need to get the service from that context only.&lt;BR /&gt;&lt;BR /&gt;In java we set endpoint in WebscriptSessionFactory and then get all the services from that factory only.&lt;BR /&gt;I think this is the problem over here as well you should not use &lt;BR /&gt;&lt;BR /&gt; AuthenticationService authenticationService = new AuthenticationService();&lt;BR /&gt;You need to fetch that service from context where you had set the endpoint.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2012 16:44:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/http-status-404-for-authenticationservice/m-p/252414#M205544</guid>
      <dc:creator>ridgeway</dc:creator>
      <dc:date>2012-08-28T16:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP Status 404 for AuthenticationService</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/http-status-404-for-authenticationservice/m-p/252415#M205545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Grt&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&amp;nbsp; If it is solved please mark it as solved.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 09:42:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/http-status-404-for-authenticationservice/m-p/252415#M205545</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2012-08-29T09:42:42Z</dc:date>
    </item>
  </channel>
</rss>

