1 Reply Latest reply on Aug 5, 2009 10:49 AM by Sean O'Callaghan

    CXF-BC Provider Cannot Validate WSDL

    Ben Brown Newbie

      I have created a CXF-BC provider to connect to an external web service.  The WSDL for this service (cut down version attached), will not validate on component deployment.  I have tracked down the issue and it appears to break down on the SecretToken node as this node has no namespace. 

       

      <xsd:schema elementFormDefault="qualified">

                     <xsd:element name="SecretToken" nillable="true"

                          type="q3:SecretHeader"

                          xmlns:q3="http://schemas.datacontract.org/2004/07/Test.SoapHeaderFactory" />

                </xsd:schema>

       

      As the WSDL is validated in ServiceWSDLBuilder.buildMessage it attemps to add a blank namespace i.e. a namespace with no URI but a temporary name of ns1 - which appears to eventually break the WSDL validation.  The WSDL correctly parses in SoapUI, however I cannot get it to work in Fuse ESB 3.4.0.3.

       

      I believe there could possibly be a bug here with the way in which nodes with no namespace are handled, but unfortunately I do not know enough about the underlying implementation to be able to pin it down any further.

       

      Any help would be gratefully appreciated, please let me know if you have further questions.

       

      Thanks

       

      Ben

       

      Edited by: ben_brown30 on Aug 5, 2009 8:57 AM - correct XML format

        • 1. Re: CXF-BC Provider Cannot Validate WSDL
          Sean O'Callaghan Newbie

          Hi Ben,

           

           

          While not strictly illegal to not have  a namespace in a schema, it ends up not being very usable for SOAP. As such the FUSE cxf-bc rejects such elements or at best tries to re-map them to the service namespace.  Direct children of soap:body and soap:header must be namespace qualified per the soap spec.  A "default" namespace is not allowed, thus, the schemas for those children must have a targetNamespace defined.

           

          Also,  the attribute elementFormDefault="qualified" indicates that there should be a namespace associated with the element in order to qualify the element.

           

          SOAPUI may take a different approach to such nodes but this is the manner in which FUSE addresses them.

           

          I hope this information is of help.

           

          Regards,

           

          Seán.