tim08 commented on issue #656:
URL: https://github.com/apache/camel-karaf/issues/656#issuecomment-3612314164

   I don't know how correct this is, I also tried to do the following:
   
   - Install pax-web 11 (in karaf 4.4.8, for some reason, it's still the old 
version in the default distribution) 
https://mvnrepository.com/artifact/org.ops4j.pax.web/pax-web-features/11.1.0 
   
   - install the following blueprint:
   
   ```
   <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
              xmlns:cxf="http://cxf.apache.org/blueprint/core";
              xsi:schemaLocation="
                http://www.osgi.org/xmlns/blueprint/v1.0.0
                https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd";>
   
       <cxf:bus/>
       <reference id="destinationRegistry" 
interface="org.apache.cxf.transport.http.DestinationRegistry"/>
   
       <service id="cxfServletService" interface="jakarta.servlet.Servlet">
           <service-properties>
               <entry key="alias" value="/cxf"/>
               <entry key="servlet-name" value="Services list"/>
           </service-properties>
           <bean class="org.apache.cxf.transport.servlet.CXFNonSpringServlet">
               <argument ref="destinationRegistry"/>
           </bean>
       </service>
       
   </blueprint>
   ```
   I tried to reproduce part of the logic that I found in the 
org.apache.camel.component.cxf.transport.http.osgi package. 
   
   ` <reference id="destinationRegistry" 
interface="org.apache.cxf.transport.http.DestinationRegistry"/>`   - this is 
getting a registered service 
https://github.com/apache/camel-karaf/blob/camel-karaf-4.10.7/components/camel-cxf/camel-cxf-all/src/main/java/org/apache/camel/component/cxf/transport/http/osgi/HTTPTransportActivator.java#L62
 
    
   Now the page http://localhost:8181/cxf is available, but I don't see the 
service that I launched on camel-cxf. 
   I suspect that there might be a problem with the route (namely, with how the 
address property is now specified)
   
   ```
   <osgi:blueprint
           xmlns:xs="http://www.w3.org/2001/XMLSchema";
           xmlns:camel="http://camel.apache.org/schema/blueprint";
           xmlns:osgi="http://www.osgi.org/xmlns/blueprint/v1.0.0";
           xmlns:cxf="https://camel.apache.org/schema/blueprint/cxf";>
       
   
       <cxf:cxfEndpoint id="VerySimple" depends-on="VerySimple-context" 
                        address="http://localhost:8182/VerySimple";
                        
xmlns:service="http://www.examples.com/wsdl/HelloService.wsdl";
                        serviceName="service:Hello_Service" 
                        endpointName="service:Hello_Port" 
                        wsdlURL="test_wsdl.WSDL">
           <cxf:properties>
               <osgi:entry key="dataFormat" value="PAYLOAD"/>
           </cxf:properties>
       </cxf:cxfEndpoint>
   
       <camel:camelContext id="VerySimple-context">
           <camel:route id="VerySimple-route">
               <camel:from uri="cxf:bean:VerySimple"/>
               <camel:to uri="log:proxy.VerySimple"/>
           </camel:route>
       </camel:camelContext>
   
   </osgi:blueprint>    
   ```
   
   Previously, it was enough to specify `address=/VerySimple `and the service 
was accessible at http://localhost:8181/cxf/VerySimple , but now if you specify 
it this way (`address=/VerySimple`) the bundle starts normally, but the service 
is unavailable
   
   ```
   16:31:32.826 INFO [fileinstall-C:\karaf\apache-karaf-4.4.8/deploy] Blueprint 
bundle test-cxf-camel4-v2.xml/0.0.0 has been started
   16:31:32.827 INFO [Blueprint Event Dispatcher: 1] Attempting to start 
CamelContext: VerySimple-context
   16:31:32.832 INFO [Blueprint Event Dispatcher: 1] Apache Camel 4.10.7 
(VerySimple-context) is starting
   16:31:32.838 WARN [Blueprint Event Dispatcher: 1] The  endpoint/port name of 
cxf://bean:VerySimple is empty, cxf will try to load the first one in wsdl for 
you.
   16:31:32.838 WARN [Blueprint Event Dispatcher: 1] The  service name of 
cxf://bean:VerySimple is empty, cxf will try to load the first one in wsdl for 
you.
   16:31:32.846 INFO [Blueprint Event Dispatcher: 1] Creating Service 
{http://www.examples.com/wsdl/HelloService.wsdl}Hello_Service from WSDL: 
test_wsdl.WSDL
   16:31:32.857 INFO [Blueprint Event Dispatcher: 1] Setting the server's 
publish address to be /VerySimple
   16:31:32.858 INFO [Blueprint Event Dispatcher: 1] Initialized CXF Server: 
org.apache.cxf.endpoint.ServerImpl@e1ede6 in Payload mode with allow streaming: 
true
   16:31:32.859 INFO [Blueprint Event Dispatcher: 1] Routes startup (total:1)
   16:31:32.859 INFO [Blueprint Event Dispatcher: 1]     Started 
VerySimple-route (cxf://bean:VerySimple)
   16:31:32.859 INFO [Blueprint Event Dispatcher: 1] Apache Camel 4.10.7 
(VerySimple-context) started in 27ms (build:0ms init:0ms start:27ms)
   ```
   Maybe I need to somehow use the services that are registered in 
https://github.com/apache/camel-karaf/blob/main/components/camel-cxf/camel-cxf-all/src/main/java/org/apache/camel/component/cxf/transport/http/osgi/HTTPTransportActivator.java


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to