hi,
as I wrote in my last response I made some changes to the templates. One 
change fixes 2) The problem, as you found correctly, is the the capital 
I. So the template can not determine the namespace definition (impinj vs 
Impinj). The change is, that definitions are not case sensitive anymore, 
therefore it works with Impinj as well as impinj.
We will make small changes to build.xml and generator.properties as the 
two files contain some redundant information. As we are making these 
changes, we will also add 3)

I tried to decode a Impinj Message to XML, as well. What I found is, 
that the message can in fact not be validated. However, if you take the 
xml and validate it against impinj.xsd using another validator, it works 
fine. So the problem is not an invalid XML. Debugging the validation 
(LLRPMessage.isValidXMLMessage) reveals a SaxParseException with 
following error message:
org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 
'ImpinjTagDirectionEnumeration' to a(n) 'type definition' component.
It seems to be a JAXP issue that has occured for others, as well (read 
http://forum.springframework.org/archive/index.php/t-26464.html and 
http://jira.springframework.org/browse/SWS-35).
The fix should be, to make your program use Xerces insted of the api 
built into the JDK. That means, you would have to set your system 
property. Just setting the class path does not work (see 
http://xerces.apache.org/xerces2-j/faq-general.html#faq-4)

++ basil
Nikos Zarokostas wrote:
> I did placed Impinj.xsd under the org/llrp/ltk in the jar and this 
> resulted in not having a problem for core llrp messages, however 
> impinj's custom messages still cannot be validated against Impinj.xsd. 
> One initial problem was the code 
> "$extensionSchemas.get($namespace.getPrefix().toLowerCase())" in 
> javaConstantsTemplate.vm. Impinj's namespace prefix is with capital I.
>
> Anyway, to sum up i have
> 1) the entry << definition = 
> Impinj;../Definitions/LLRP.org/Impinjdef.xml;org/llrp/ltk/Impinj.xsd 
> >> in generator.properties
> 2) the entry << public static final String 
> $namespace.getPrefix().toUpperCase()$path = 
> "$extensionSchemas.get($namespace.getPrefix())" >> in 
> javaConstantsTemplate.vm
> 3) edited the build.xml in order to copy the Impinj.xsd under 
> org/llrp/ltk in the jar
>
> When i try to call the toXMLString() on a custom message i still get 
> the << LTK XML message can not be validated against schema 
> org/llrp/ltk/Impinj.xsd >> exception.
>
> Thanks,
> Nikos
>
> ------------------------------------------------------------------------
> *From*: "Basil Gasser" <[EMAIL PROTECTED]>
> *Sent*: Tuesday, May 06, 2008 6:15 PM
> *To*: [EMAIL PROTECTED], "LLRP Toolkit Development List" 
> <[email protected]>
> *Subject*: Re: [ltk-d] LTKJava
>
> Schemas are loaded as resources. Therefore they have to be in the build
> path, i.e. if you are using eclipse add the folders containing your xsd
> files to the build path. This should fix your problem.
> Please do a cvs update and regenerate the code, I made some small
> changes to the templates.
>
> ++ basil
>
> Nikos Zarokostas wrote:
> > Hello,
> >
> > i have been successfully using LTKJava (compiled from sources checked
> > out from the llrp-toolkit project on sourceforge) without the Impinj
> > extensions in order to communicate with the Speedway reader. When i
> > compiled LTKJava with the Impinj extensions (edited
> > generator.properties) i had the following problem: <<
> > org.llrp.ltk.exceptions.InvalidLLRPMessageException: LTK XML message
> > can not be validated against schema ../Definitions/Core/llrp-1x0.xsd
> > >> for all messages, both LLRP core and custom ones. The file
> > Definitions/Core/llrp-1x0.xsd is located where it should be since the
> > same code using LTKJava_with_dep_0_1_0-SNAPSHOT.jar without the Impinj
> > extensions works.
> >
> > Any help is greatly appreciated
> > Nikos Zarokostas
> > Software Engineer
> > Sensap Microsystems
> >
> > ------------------------------------------------------------------------
> >
> > 
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> > Don't miss this year's exciting event. There's still time to save $100.
> > Use priority code J8TL2D2.
> > 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > llrp-toolkit-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/llrp-toolkit-devel
> >
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> ------------------------------------------------------------------------
>
> _______________________________________________
> llrp-toolkit-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/llrp-toolkit-devel
>   

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
llrp-toolkit-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/llrp-toolkit-devel

Reply via email to