Has anyone generated a usable Java source file for an LSC plugin?  My xjc
commands run cleanly enough, but don't seem to be working at runtime.

What I'm doing:

1)  I start with this XSD (also attached).   Note that I have simplified
this to use only xsd:string, not lsc:valuesType, while I try to work out
these issues.

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
            xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";
            xmlns:lsc="http://lsc-project.org/XSD/lsc-core-2.0.xsd";
            xmlns="
http://montpeliertr.com/HierarchicalJndiSrcServiceSettings-0.1";
            targetNamespace="
http://montpeliertr.com/HierarchicalJndiSrcServiceSettings-0.1";
            elementFormDefault="qualified"
            jaxb:version="2.0">

    <xsd:import namespace="http://lsc-project.org/XSD/lsc-core-2.0.xsd";
                schemaLocation="
https://lsc-project.org/svn/lsc/branches/v2.0/src/main/resources/schemas/lsc-core-2.0.xsd";
             />

       <xsd:element name="hierarchicalJndiSrcServiceSettings">
        <xsd:complexType>
            <xsd:sequence>
            <!--  Order must apparently match exactly with lsc.xml.  Can
this be loosened?  -->
                <xsd:element name="baseDn" type="xsd:string" />
                <xsd:element name="pivotAttributes" type="xsd:string"
minOccurs="1" />
                <xsd:element name="fetchedAttributes" type="xsd:string"
minOccurs="1" />
                <xsd:element name="getAllFilter" type="xsd:string" />
                <xsd:element name="getOneFilter" type="xsd:string" />
                <xsd:element name="cleanFilter" type="xsd:string" />
            </xsd:sequence>
        </xsd:complexType>
       </xsd:element>

</xsd:schema>

2)  I run this command line:

     xjc -p com.montpeliertr.generated
hierarchicalldap-plugin\src\main\resources\HierarchicalJndiSrcServiceSettings.xsd
-d hierarchicalldap-plugin\src\main\java  -verbose

  This compiles not just my XSD, but also compiles all of the "imported"
LSC types as well (even though they are not being used in my schema).    It
also fails to add this line to my .java file:

   import org.lsc.configuration.ValuesType;


Taking it only two steps at a time, am I making an obvious so far?   I
assume that the missing import statement is indicative of a larger problem,
and may explain why I can't ever get this to work at runtime:

       serviceSettings = (HierarchicalJndiSrcServiceSettings)
task.getPluginSourceService().getAny().get(0);

Any pointers are appreciated.

Hugh

Attachment: HierarchicalJndiSrcServiceSettings.xsd
Description: Binary data

_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-dev mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-dev

Reply via email to