title: Apache camel blueprint webservice "could not find definition for port"
body: <p>I'm trying to expose a WebService with Apache camel. I build my project with maven as a bundle and deploy it on Apache karaf.</p>
  
  <p>Right now in the karaf logs I always get</p>
  
  <pre><code>Error occurred during starting Camel: CamelContext(camel) due Could not find definition for port {http://localhost:8181/cxf/webservices/inputoutput}Calculator. org.apache.cxf.service.factory.ServiceContructionException: Could not find definition for port {http://localhost:8181/cxf/webservices/inputoutput}Calculator.
  </code></pre>
  
  <p>This is how I built my endpoint in my camel-context.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
         xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws"
         xmlns:cxf="http://cxf.apache.org/blueprint/core"
         xmlns:camel="http://camel.apache.org/schema/blueprint"
         xmlns:camelcxf="http://camel.apache.org/schema/blueprint/cxf"
         xsi:schemaLocation="
           http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
           http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd
           http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
           "&gt;
  
  &lt;camelcxf:cxfEndpoint id="inputOutput"
                      address="/webservices/inputoutput"
                      endpointName="ns:Calculator"
                      serviceName="ns:CalculatorService"
                      wsdlURL="META-INF/wsdl/Calculator.wsdl"
                      serviceClass="osgiBlueprintSoap.CalculatorService"
                      xmlns:ns="http://localhost:8181/cxf/webservices/inputoutput"/&gt;
  
  &lt;bean id="inputOutputRoutes" class="osgiBlueprintSoap.InputOutputRoutes"/&gt;
  
  &lt;camelContext id="camel" xmlns="http://camel.apache.org/schema/blueprint"&gt;
    &lt;routeBuilder ref="inputOutputRoutes"/&gt;
  &lt;/camelContext&gt;
  
  &lt;/blueprint&gt;
  </code></pre>
  
  <p>I'm building my route in my InputOutputRoutes like this</p>
  
  <pre><code>public class InputOutputRoutes extends RouteBuilder {
  
  @Override
  public void configure() throws Exception {
      // webservice responses
      AddResponse output = new AddResponse();
      output.setAddReturn(5); // just for testing
  
      from("cxf:bean:inputOutput?dataFormat=PAYLOAD")
              .convertBodyTo(Add.class)
              .wireTap(
                      "file:C:/output?fileName=request-${date:now:yyyy-MM-dd-HHmmssSSS}")
              .choice().when(simple("${body.surname} == 'test'"))
              .transform(constant(output)).otherwise()
              .transform(constant(output));
  }
  }
  </code></pre>
  
  <p>And this is what my wsdl looks like</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;wsdl:definitions targetNamespace="http://calculator"
  xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://calculator"
  xmlns:intf="http://calculator" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 
      PDT) --&gt;
  &lt;wsdl:types&gt;
      &lt;schema elementFormDefault="qualified" targetNamespace="http://localhost:8181/cxf/webservices/inputoutput"
          xmlns="http://www.w3.org/2001/XMLSchema"&gt;
          &lt;element name="add"&gt;
              &lt;complexType&gt;
                  &lt;sequence&gt;
                      &lt;element name="a" type="xsd:double" /&gt;
                      &lt;element name="b" type="xsd:double" /&gt;
                  &lt;/sequence&gt;
              &lt;/complexType&gt;
          &lt;/element&gt;
          &lt;element name="addResponse"&gt;
              &lt;complexType&gt;
                  &lt;sequence&gt;
                      &lt;element name="addReturn" type="xsd:double" /&gt;
                  &lt;/sequence&gt;
              &lt;/complexType&gt;
          &lt;/element&gt;
      &lt;/schema&gt;
  &lt;/wsdl:types&gt;
  &lt;wsdl:message name="addRequest"&gt;
      &lt;wsdl:part element="impl:add" name="parameters"&gt;
      &lt;/wsdl:part&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:message name="addResponse"&gt;
      &lt;wsdl:part element="impl:addResponse" name="parameters"&gt;
      &lt;/wsdl:part&gt;
  &lt;/wsdl:message&gt;
  &lt;wsdl:portType name="Calculator"&gt;
      &lt;wsdl:operation name="add"&gt;
          &lt;wsdl:input message="impl:addRequest" name="addRequest"&gt;
          &lt;/wsdl:input&gt;
          &lt;wsdl:output message="impl:addResponse" name="addResponse"&gt;
          &lt;/wsdl:output&gt;
      &lt;/wsdl:operation&gt;
  &lt;/wsdl:portType&gt;
  &lt;wsdl:binding name="CalculatorSoapBinding" type="impl:Calculator"&gt;
      &lt;wsdlsoap:binding style="document"
          transport="http://schemas.xmlsoap.org/soap/http" /&gt;
      &lt;wsdl:operation name="add"&gt;
          &lt;wsdlsoap:operation soapAction="" /&gt;
          &lt;wsdl:input name="addRequest"&gt;
              &lt;wsdlsoap:body use="literal" /&gt;
          &lt;/wsdl:input&gt;
          &lt;wsdl:output name="addResponse"&gt;
              &lt;wsdlsoap:body use="literal" /&gt;
          &lt;/wsdl:output&gt;
      &lt;/wsdl:operation&gt;
  &lt;/wsdl:binding&gt;
  &lt;wsdl:service name="CalculatorService"&gt;
      &lt;wsdl:port binding="impl:CalculatorSoapBinding" name="Calculator"&gt;
          &lt;wsdlsoap:address location="http://localhost:8181/cxf/webservices/inputoutput" /&gt;
      &lt;/wsdl:port&gt;
  &lt;/wsdl:service&gt;
  &lt;/wsdl:definitions&gt;
  </code></pre>
  
  <p>I'm generating the java classes from the wsdl using the cxf-codegen-plugin in maven.</p>
  
  <p>Already trying to get this webservice to work since several days...
  Can anyone tell me what I'm still doing wrong? Any help is appreciated...</p>