cancel
Showing results for 
Search instead for 
Did you mean: 

Web Forms: <xs:include> not working with NTLM auth

dafyddjames
Champ in-the-making
Champ in-the-making
I raised a thread in this forum a while ago (Unable to import static XSD into web form via webscript) related to importing a static XSD into another web form XSD. However, we have now switched on LDAP authentication, and now I get an error message when I try to create the web form: Alfresco can't find any of the elements that are described in the dimensions.xsd static XSD file.

My web form XSD looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:alf="http://www.alfresco.org"
                xmlns:bf="http://www.bf.com/ns"
                targetNamespace="http://www.bf.com/ns"
                elementFormDefault="qualified">

<xs:include schemaLocation="webscript://api/path/content/workspace/SpacesStore/Company%20Home/Data%20Dictionary/Web%20Forms/dimensions.xsd?ticket={ticket}" />

   <!– Root element –>
   <xs:element name="content">
      <xs:complexType>
         <xs:sequence>
            <xs:element name="dimensions" type="bf:dimensions" />
            <xs:element name="pods" type="bf:pods" />
         </xs:sequence>
      </xs:complexType>
   </xs:element>


My dimensions.xsd looks like this:

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:alf="http://www.alfresco.org/"
           xmlns:bf="http://www.betfair.com/ns"
           targetNamespace="http://www.betfair.com/ns"
           elementFormDefault="qualified">

<xs:complexType name="dimensions">
  <xs:sequence>
    <xs:element name="product"  type="bf:product"   default="ALL_PRODUCTS" />
    <xs:element name="brand"    type="bf:brand"     default="ALL_BRANDS" />
    <xs:element name="region"   type="bf:region"    default="ALL_REGIONS"/>
    <xs:element name="locale"   type="bf:locale"    default="ALL_LOCALES"/>
    <xs:element name="theme"    type="bf:theme"     default="ALL_THEMES"/>
  </xs:sequence>
</xs:complexType>

I can see my XSD when I use this URL:

http://<Alfresco server host>:8080/alfresco/service/api/path/content/workspace/SpacesStore/Company%20Home/Data%20Dictionary/Web%20Forms/dimensions.xsd?ticket={ticket}

When I load the above URL in a browser, it asks me for my HTTP auth username and password, then loads the XSD fine. I think it's the authentication step which isn't working properly inside Alfresco.

Here's the error message:
org.alfresco.web.forms.FormProcessor$ProcessingException: org.alfresco.web.forms.xforms.FormBuilderException: error parsing schema: at line 10 column 57: src-resolve: Cannot resolve the name 'bf:dimensions' to a(n) 'type definition' component.

It's the ?ticket={ticket} parameter which is supposed to fix this, right? But it doesn't seem to be working.

Can anyone help please?

ETA: changed title of thread to be "NTLM" rather than "LDAP".
1 REPLY 1

dafyddjames
Champ in-the-making
Champ in-the-making
Update: it's not LDAP causing the problem, it's NTLM. Going into the code and switching the endpoint from "/wcservice" to "service" fixed the issue. I've raised an Alfresco bug (ALF-6837) to fix the problem in the codebase.