<?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 Creating site is working sometimes, why in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/creating-site-is-working-sometimes-why/m-p/294736#M247866</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I am creating a site here, but this sometimes works and sometimes not working.&lt;BR /&gt; try {&lt;BR /&gt; HttpClient client = new HttpClient();&lt;/P&gt;&lt;P&gt;String loginData = "username=admin&amp;amp;password=admin";&lt;BR /&gt; PostMethod loginPost = new PostMethod(&lt;BR /&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://127.0.0.1:8090/share/page/dologin" rel="nofollow noopener noreferrer" target="_blank"&gt;http://127.0.0.1:8090/share/page/dologin&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;BR /&gt; loginPost.setRequestHeader("Content-Type",&lt;BR /&gt; "application/x-www-form-urlencoded");&lt;BR /&gt; loginPost.setRequestEntity(new StringRequestEntity(loginData,&lt;BR /&gt; "text/plain", "UTF-8"));&lt;/P&gt;&lt;P&gt;System.out.println("dologin script status: "&lt;BR /&gt; + client.executeMethod(loginPost));&lt;/P&gt;&lt;P&gt;GetMethod authenticationGet = new GetMethod(&lt;BR /&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://127.0.0.1:8090/share/service/modules/authenticated?a=user" rel="nofollow noopener noreferrer" target="_blank"&gt;http://127.0.0.1:8090/share/service/modules/authenticated?a=user&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;BR /&gt; System.out.println("User is authenticated script status : "&lt;BR /&gt; + client.executeMethod(authenticationGet));&lt;/P&gt;&lt;P&gt;PostMethod createSitePost = new PostMethod(&lt;BR /&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://127.0.0.1:8090/share/service/modules/create-site" rel="nofollow noopener noreferrer" target="_blank"&gt;http://127.0.0.1:8090/share/service/modules/create-site&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;BR /&gt; String shortName = "TestSiteFromCodeONeTwo";&lt;BR /&gt; JSONObject siteObject = new JSONObject();&lt;/P&gt;&lt;P&gt;siteObject.put("shortName", shortName);&lt;BR /&gt; siteObject.put("description", shortName);&lt;BR /&gt; siteObject.put("title", shortName);&lt;BR /&gt; siteObject.put("Visiblity", "Public");&lt;BR /&gt; siteObject.put("sitePreset", "site-dashboard");&lt;/P&gt;&lt;P&gt;createSitePost.setRequestEntity(new StringRequestEntity(siteObject&lt;BR /&gt; .toString(), "application/json", "UTF-8"));&lt;BR /&gt; createSitePost.setRequestHeader("Accept", "application/json");&lt;BR /&gt; // createSitePost.setRequestHeader("Content-Type", "application/json");&lt;/P&gt;&lt;P&gt;int status = client.executeMethod(createSitePost);&lt;BR /&gt; System.out.println("create a site script status :: " + status);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;getting error&amp;nbsp;&lt;/P&gt;&lt;P&gt;create a site script status :: 400&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Dec 2016 15:23:01 GMT</pubDate>
    <dc:creator>nareshvy</dc:creator>
    <dc:date>2016-12-09T15:23:01Z</dc:date>
    <item>
      <title>Creating site is working sometimes, why</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/creating-site-is-working-sometimes-why/m-p/294736#M247866</link>
      <description>Hi I am creating a site here, but this sometimes works and sometimes not working. try { HttpClient client = new HttpClient();String loginData = "username=admin&amp;amp;password=admin"; PostMethod loginPost = new PostMethod( "http://127.0.0.1:8090/share/page/dologin"); loginPost.setRequestHeader("Content</description>
      <pubDate>Fri, 09 Dec 2016 15:23:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/creating-site-is-working-sometimes-why/m-p/294736#M247866</guid>
      <dc:creator>nareshvy</dc:creator>
      <dc:date>2016-12-09T15:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating site is working sometimes, why</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/creating-site-is-working-sometimes-why/m-p/294737#M247867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There should be more information in the response indicating why it failed. A 400 response code suggests that there was something wrong with your request - what is the response message? Is it possible that you're trying to create a site using a shortName attribute that has already been used?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 16:02:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/creating-site-is-working-sometimes-why/m-p/294737#M247867</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2016-12-09T16:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Creating site is working sometimes, why</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/creating-site-is-working-sometimes-why/m-p/294738#M247868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;create a site script status :: 400{&lt;BR /&gt; "status" : &lt;BR /&gt; {&lt;BR /&gt; "code" : 400,&lt;BR /&gt; "name" : "Bad Request",&lt;BR /&gt; "description" : "Request sent by the client was syntactically incorrect."&lt;BR /&gt; }, &lt;BR /&gt; &lt;BR /&gt; "message" : "error.unableToCreate", &lt;BR /&gt; "exception" : "",&lt;BR /&gt; &lt;BR /&gt; "callstack" : &lt;BR /&gt; [ &lt;BR /&gt; &lt;BR /&gt; ],&lt;BR /&gt; &lt;BR /&gt; "server" : "Spring WebScripts - v6.5.0 schema 1,000",&lt;BR /&gt; "time" : "Dec 9, 2016 9:34:15 PM"&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 16:05:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/creating-site-is-working-sometimes-why/m-p/294738#M247868</guid>
      <dc:creator>nareshvy</dc:creator>
      <dc:date>2016-12-09T16:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: Creating site is working sometimes, why</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/creating-site-is-working-sometimes-why/m-p/294739#M247869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are the actual values that you're submitting when you make that request? Is it possible that you're submitting invalid characters, etc? For example there are a number of characters that can't be used for the shortName attribute.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 16:32:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/creating-site-is-working-sometimes-why/m-p/294739#M247869</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2016-12-09T16:32:37Z</dc:date>
    </item>
  </channel>
</rss>

