0 Replies Latest reply on Sep 11, 2014 12:54 PM by schellinger

    Common WSDLs and Schemas in Camel Projects

    schellinger

      We have a set of WSDLs and schemas that are shared by several of our Camel (v2.12) bundles.  We have a common project which contains Java classes used by these bundles, but we'd like to put our common WSDLs and schemas there to be referenced by other bundles.  The common project results in a JAR in which we can see the common WSDLs and schemas in their designated folders, but we are having troubles referencing the WSDLs in cxf:cxfEndpoints and we also can't refer to the common schema files in WSDLs defined in our Camel projects.  Is this possible?  We've tried using "classpath:" notation for the wsdlURL field in our cxf:cxfEndpoints in our routes, but that failed with various errors.  And nothing resolved our schema imports in our WSDLs.  So here is basically what we're trying to do:

       

      CommonProject

      resources

      schemas

      schema1.xsd

      schema2.xsd

      wsdl

      wsdl1.wsdl

      wsdl1.wsdl

       

      ProjectXYZ

      How in Camel blueprint do I get this to work:

       

      <cxf:cxfEndpoint id="endpoint"
                            address="localhost:8181/test"
                            wsdlURL="wsdl/wsdl1.wsdl"  <!-- from above JAR -->
                            serviceName="s:Interface"
                            endpointName="s:InterfacePort"
                            xmlns:s="http://test.com/test"/>

       

      And how do I get this to work in a WSDL defined in this ProjectXYZ:

       

      <xs:import namespace="http://test.com/test" schemaLocation="schemas/schema1.xsd"/>  <!-- from above JAR -->

       

      Again, ProjectXYZ has a dependency to the Common project JAR.

       

      Thanks.

       

      Shawn