XML Validation with Spring CXF

I recently started working with IntelliJ (10.5) again after about 4-5 years writing code for the .Net world, so hopefully this question isn't too naive!

When editing a spring XML configuration file in IntelliJ, I noticed that it was flagging the apache CXF http-conf:client element as invalid.  It doesn't seem to have a problem with any of the other elements.

    (Relevent XML namespace definitions and schema references)

      (The problematic element)

I ran the XML through several other validation tools and they all seemed to be fine. Is this a problem with IntelliJ or am I doing something wrong?

Comment actions Permalink

Sounds like a bug (schema validation issue).
Can you create an issue at http://youtrack.jetbrains.net/issues/IDEA, providing a minimal test case, and post a link here?
Mentioning the exact version of spring and CXF used would be a good idea.


Comment actions Permalink

Works for me (see screen below). The problem is messy namespaces declaration in your xml instance. You import the same namespace(s) (i see at least http://www.springframework.org/schema/beans) from different sources, so grammar builded is unpredictable thus validation couldn't be done. Follow cxf tutorials declaring namespaces to build correct grammar and be able to validate xml instances within idea:
regards, Alex

Comment actions Permalink

I finally got a chance to cleanup the xmlns declaration and it did not seem to solve the problem. So I created a second spring configuration file in the same project with the exact same syntax that you specified above. I noticed that this time IntelliJ was unable to properly resolve the CXF namespace and XSD. So I used Alt-Enter to fetch the resource. This seems to have resolved the issue in the first file as well, which now validates the <client> element normally. Perhaps I had previously included a different version of http://cxf.apache.org/schemas/configuration/http-conf.xsd (is the client element original or was it added / changed at some point)?

Not sure what specifically the problem was, but thank you both for your assistance in resolving it. Since I'm not certain that this wasn't just a complete error on my part, I am not going to file a bug report at this time.


Please sign in to leave a comment.