Search code examples
javaweb-servicessslcxfapplicationcontext

The prefix "http" for element "http:conduit" is not bound - what does this mean?


I am trying to configure SSL support for my CXF-based client per this official Apache CXF guide, but Eclipse marks the http:conduit tag with a red underline and very short error description:

  The prefix "http" for element "http:conduit" is not bound

I searched the web for additional clues regarding the meaning of this message and how to fix it but I have not found yet anything that could explain why I am getting this error.

Any idea what The prefix "http" for element "http:conduit" is not bound means?

Bound to what?

Why only the prefix "http" and not "conduit"?


Solution

  • The http in http:conduit is the namespace that the conduit element belongs to.

    Look at the example in the link you posted. You need to specify the namespace and schema location for the elements you use.

    <beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:sec="http://cxf.apache.org/configuration/security"
      xmlns:http="http://cxf.apache.org/transports/http/configuration"
      xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
      xsi:schemaLocation="
          http://cxf.apache.org/configuration/security
          http://cxf.apache.org/schemas/configuration/security.xsd
          http://cxf.apache.org/transports/http/configuration
          http://cxf.apache.org/schemas/configuration/http-conf.xsd
          http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">