On Wednesday, December 07, 2011 2:43:11 PM rouble wrote: > After some more CXF debuggging: > > This is what the top of the document looks like in the working case, > when getNamespaceURI() does not return null: > <?xml version="1.0" encoding="UTF-8"?> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:tns="example.com" targetNamespace="example.com" version="1.0"> > > and this is what the top of the document looks like in the non-working > case, when getNamespaceURI() returns null: > <?xml version="1.0" encoding="UTF-8"?> > <schema xmlns:tns="example.com" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > targetNamespace="example.com" version="1.0">
Actually, they aren't the same at all. In the second case, the schema is NOT in a namespace. It would need the xs: prefix or it would need an xmlns="http://www.w3.org/2001/XMLSchema". In this case, the schema really is invalid. Now, the next question is: where/how is that schema generated? Is CXF generating that invalid schema? Dan > > Notice that the schema is in the W3C namespace, it is just ordered > differently. And for some reason, > d.getDocumentElement().getNamespaceURI() is set to null. > > Also, if I take out the code that throws the exception in > AbstractDataBinding.addSchemaDocument, "Invalid schema document passed > to AbstractDataBinding.addSchemaDocument, not in W3C schema > namespace", I start to see a bunch of: > factory.ReflectionServiceFactoryBean - Schema element > {http://example.com/}foo references undefined type > {http://example.com/}foo for service {http://example.com/}FooService. > > Any ideas how I can debug why d.getDocumentElement().getNamespaceURI() > is being set to null in some cases? > > tia, > rouble > > On Tue, Dec 6, 2011 at 3:19 PM, Daniel Kulp <dk...@apache.org> wrote: -- Daniel Kulp dk...@apache.org - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com