Wednesday 1 December 2010

SOAP header Security was not understood

XML Web services seem to be declining in use, so finding information on this SoapHeaderException proved to be a bit difficult. I added in <soapextensionimportertypes> and installed WSE 3.0, but it made no difference. What worked for me was adding the following line to my code:
webService.SoapVersion =
System.Web.Services.Protocols.SoapProtocolVersion.Soap12;


[Edit 9 Dec 2010]

Actually, this was a red herring. It worked by adding a "service reference", rather than a old-fashioned "web reference".

Wednesday 18 August 2010

Using Sitecore with Firefox, Chrome and other browsers

Sitecore recommends the use of IE for its client. When trying to log in with Firefox or Chrome (and presumably others), you don't get the option of viewing the desktop. There is a way you can override this behaviour. Open Sitecore in IE and go to the User Manager. Select your account and click Edit to bring up the "Edit User" dialogue. Click on the Profile tab and set the start URL to "Desktop". Save your changes and then try logging in with Firefox, etc. You should now see the full desktop.

Tuesday 15 June 2010

Sitecore link fields put /home in the target URL's href

When using sc:fld('fieldname', ., 'url') in an XSLT rendering to get a link field's target URL, you will find that the href includes '/home'. This is rarely desirable. Thankfully, it's easy to solve. Simply use sc:fld('fieldname', ., 'id') instead to get the target ID. You can then pass the ID to sc:path().

Tuesday 23 March 2010

How to remove an apostrophe from a string in Sitecore XSLT

Given a variable named "string", you can remove apostrophes by declaring a variable to hold the apostrophe and then passing that to the sc:Replace method:

<xsl:variable name="apos">'</xsl:variable>
<xsl:variable name="string"
select="sc:Replace( $input, $apos, '' )" />