in Education by
I am trying to make requests to dedicated WSDL server with the help of Apache Camel CXF. I have the WSDL URL: http://www.learnwebservices.com/services/tempconverter?wsdl I've made the Java classes of WSDL using the cxf-codegen-plugin: org.apache.cxf cxf-codegen-plugin 3.4.2 generate-sources generate-sources wsdl2java ${basedir}/src/main/resources/wsdl/tempconverter.wsdl office.planet.integrations.merlion I have the following Camel route: @Component public class MerlionRoute extends RouteBuilder { @Override public void configure() throws Exception { from("direct:celsius-to-fahrenheit") .process(exchange -> { System.out.println("HELLO!!!!!"); CelsiusToFahrenheitRequest c = new CelsiusToFahrenheitRequest(); c.setTemperatureInCelsius(Double.valueOf(exchange.getIn().getHeader("num").toString())); exchange.getIn().setBody(c); }) .setHeader(CxfConstants.OPERATION_NAME, constant("CelsiusToFahrenheit")) .setHeader(CxfConstants.OPERATION_NAMESPACE, constant("{{endpoint.namespace}}")) .to("cxf:bean:cxfConvertTemp") .process(exchange -> { System.out.println("WE ARE HERE"); MessageContentsList response = (MessageContentsList) exchange.getIn().getBody(); CelsiusToFahrenheitResponse r = (CelsiusToFahrenheitResponse) response.get(0); exchange.getIn().setBody("Temp in Farenheit: "+r.getTemperatureInFahrenheit()); System.out.println(r.getTemperatureInFahrenheit()); }) .end(); } } The Bean class of the EndPoint: @Configuration public class CxfBeans { @Value("${endpoint.wsdl}") private String SOAP_URL; @Bean(name = "cxfConvertTemp") public CxfEndpoint buildCxfEndpoint() { CxfEndpoint cxf = new CxfEndpoint(); cxf.setAddress(SOAP_URL); cxf.setServiceClass(TempConverterEndpoint.class); cxf.setWsdlURL(SOAP_URL); return cxf; } } And the WSDL endpoint: endpoint.wsdl=http://www.learnwebservices.com/services/tempconverter?wsdl endpoint.namespace=http://learnwebservices.com/services/tempconverter When I am launching the project, my route starts, but nothing happens. Only this I can see: 2022-03-31 18:41:44.933 INFO 44313 --- [ restartedMain] o.a.c.w.s.f.ReflectionServiceFactoryBean : Creating Service {http://learnwebservices.com/services/tempconverter}TempConverterEndpointService from WSDL: http://www.learnwebservices.com/services/tempconverter?wsdl How shall I request the data from WSDL server within the Camel CXF? What am I doing wrong? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Your route needs to be triggered. As it stands, nothing calls your from endpoint "direct:celsius-to-fahrenheit", and thus indeed, nothing happens. Assuming you want this route to be triggered only once, you could define your from endpoint as "timer://celsius-to-fahrenheit?repeatCount=1". See Camel Timer component.

Related questions

0 votes
    I created a microservice project that consist of a few services. In one of these services, I added an ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    The embedded server that starts up with the Spring boot application is ____________. A. Tomcat server B. Weblogic server C. None of the options D. Server has to be configured...
asked Nov 8, 2022 in Education by JackTerrance
0 votes
    How to override or replace the Embedded tomcat server in Spring Boot?...
asked Jul 7, 2021 in Technology by JackTerrance
0 votes
    Is it possible to change the port of the embedded Tomcat server in Spring Boot?...
asked Jul 7, 2021 in Technology by JackTerrance
0 votes
    Spring Boot is example of __________. A. Service Deployment B. Service registry C. Chassis Framework D. API Gateway...
asked Jan 11, 2023 in Technology by JackTerrance
0 votes
    Spring boot follows Opinionated Defaults Configuration approach to reduce developer effort. A. True B. False...
asked Nov 8, 2022 in Education by JackTerrance
0 votes
    For which of the following criteria can Spring boot auto configuration be done? A. Presence of a System Property B. ... of a particular class in classpath E. All the options...
asked Nov 8, 2022 in Education by JackTerrance
0 votes
    I'm new to Java and Spring boot and I am trying to read and Parse RSS feed from a site. What's the ... XmlReader(feedSource)); pageNumber = pageNumber + 1; } while ( pageNumber...
asked Jun 3, 2022 in Education by JackTerrance
0 votes
    I am using spring boot command line runner app, it hangs at PostGIS dialect, the below stack trace contains ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 13, 2022 in Education by JackTerrance
0 votes
    I am using spring-boot latest 2.1.3 release and want to start with testcases, but this is not ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 13, 2022 in Education by JackTerrance
0 votes
    I am using spring-boot latest 2.1.3 release and want to start with testcases, but this is not ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 8, 2022 in Education by JackTerrance
0 votes
    Which of the following enables production-ready features to the spring boot application? 1. Endpoint 2. Actuators 3. Boot 4. None of the above...
asked Jul 25, 2021 in Technology by JackTerrance
0 votes
    How can we override the default properties of Spring boot projects?...
asked Jul 23, 2021 in Technology by JackTerrance
0 votes
    What is the role of actuator in spring boot?...
asked Jul 23, 2021 in Technology by JackTerrance
0 votes
    Explain about the spring cloud and spring boot?...
asked Jul 23, 2021 in Technology by JackTerrance
...