N
NicolasR
Guest
Hello,
I'm currently use UpdateSite method of ServiceFacade/4.5/
I would like change the name of anonymous web site to more 'human readable' like "my site 1"
I use the method UpdateSite that contain theses parameters :
id (i suppose Site_Id)
alias (name of website)
publishSettings template
following this XML schema :
<s:complexType name="PublishingSettingsValue">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Id" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="StandardLocation" type="tns:LocationSettings"/>
<s:element minOccurs="1" maxOccurs="1" name="Mode" type="tnsublishMode"/>
</s:sequence>
</s:complexType>
<s:complexType name="LocationSettings">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Address" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="UserName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="WorkingDirectory" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="WebSiteUrl" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="IsAnonymous" type="s:boolean"/>
<s:element minOccurs="1" maxOccurs="1" name="Veid" type="s:long"/>
<s:element minOccurs="1" maxOccurs="1" name="VerifyStatus" type="tns:LocationStatus"/>
<s:element minOccurs="1" maxOccurs="1" name="LastVerifyAttempt" type="s:dateTime"/>
<s:element minOccurs="0" maxOccurs="1" name="FallbackIP" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="HostId" type="s:string"/>
</s:sequence>
But when i call the fonction i get this :
object(SoapFault)#78 (9) {
["messagerotected"] => string(196) "Generic error. Internal Sitebuilder error.
Base_SyntaxException: PHP Notice : Undefined property: stdClass::$hostId
My code :
$struct = new stdClass();
$struct->id = $_siteId;
$struct->alias = $_siteName;
$struct->publishingSettings = new stdClass();
$struct->publishingSettings->Id='';
$struct->publishingSettings->StandardLocation = new stdClass();
$struct->publishingSettings->StandardLocation->Address = '';
$struct->publishingSettings->StandardLocation->UserName = '';
$struct->publishingSettings->StandardLocation->Password = '';
$struct->publishingSettings->StandardLocation->WorkingDirectory = '';
$struct->publishingSettings->StandardLocation->WebSiteUrl = '';
$struct->publishingSettings->StandardLocation->IsAnonymous = 'true';
$struct->publishingSettings->StandardLocation->Veid = 0;
$struct->publishingSettings->StandardLocation->VerifyStatus = 'Unverified';
$struct->publishingSettings->StandardLocation->LastVerifyAttempt = '0000-00-00 00:00:00';
$struct->publishingSettings->StandardLocation->FallbackIP = '';
$struct->publishingSettings->HostId='';
$struct->publishingSettings->Mode = 'Ftp';
$res = $this->Site->UpdateSite($struct);
What's is wrong ?
I'm currently use UpdateSite method of ServiceFacade/4.5/
I would like change the name of anonymous web site to more 'human readable' like "my site 1"
I use the method UpdateSite that contain theses parameters :
id (i suppose Site_Id)
alias (name of website)
publishSettings template
following this XML schema :
<s:complexType name="PublishingSettingsValue">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Id" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="StandardLocation" type="tns:LocationSettings"/>
<s:element minOccurs="1" maxOccurs="1" name="Mode" type="tnsublishMode"/>
</s:sequence>
</s:complexType>
<s:complexType name="LocationSettings">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Address" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="UserName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="WorkingDirectory" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="WebSiteUrl" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="IsAnonymous" type="s:boolean"/>
<s:element minOccurs="1" maxOccurs="1" name="Veid" type="s:long"/>
<s:element minOccurs="1" maxOccurs="1" name="VerifyStatus" type="tns:LocationStatus"/>
<s:element minOccurs="1" maxOccurs="1" name="LastVerifyAttempt" type="s:dateTime"/>
<s:element minOccurs="0" maxOccurs="1" name="FallbackIP" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="HostId" type="s:string"/>
</s:sequence>
But when i call the fonction i get this :
object(SoapFault)#78 (9) {
["messagerotected"] => string(196) "Generic error. Internal Sitebuilder error.
Base_SyntaxException: PHP Notice : Undefined property: stdClass::$hostId
My code :
$struct = new stdClass();
$struct->id = $_siteId;
$struct->alias = $_siteName;
$struct->publishingSettings = new stdClass();
$struct->publishingSettings->Id='';
$struct->publishingSettings->StandardLocation = new stdClass();
$struct->publishingSettings->StandardLocation->Address = '';
$struct->publishingSettings->StandardLocation->UserName = '';
$struct->publishingSettings->StandardLocation->Password = '';
$struct->publishingSettings->StandardLocation->WorkingDirectory = '';
$struct->publishingSettings->StandardLocation->WebSiteUrl = '';
$struct->publishingSettings->StandardLocation->IsAnonymous = 'true';
$struct->publishingSettings->StandardLocation->Veid = 0;
$struct->publishingSettings->StandardLocation->VerifyStatus = 'Unverified';
$struct->publishingSettings->StandardLocation->LastVerifyAttempt = '0000-00-00 00:00:00';
$struct->publishingSettings->StandardLocation->FallbackIP = '';
$struct->publishingSettings->HostId='';
$struct->publishingSettings->Mode = 'Ftp';
$res = $this->Site->UpdateSite($struct);
What's is wrong ?