[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error with consuming and exposing soap service with camel and sprint-boot


Im trying to consume a SOAP WS and exposing it as soap too, using xml camel context file, so I defined the “cxf:cxfEndpoint” that would be the front end service exposed, and defined into the “camelcontext” tag an endpoint “callRealWebService” that contains the url of the SOAP WS.

Finally, I defined a route that uses “from" as the cxfendpoint and “to” the endpoint.

The problem is that when I deploy locally the project, cannot get the wsdl of my service so I don’t know if my config of camelcontext.xml is correct or the sprintboot.

These are my files:


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd        http://camel.apache.org/schema/spring  http://camel.apache.org/schema/spring/camel-spring.xsd         http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd";>

        endpointName="s:DocumentoPort" id="servicioSS"
        serviceName="s:Documento" wsdlURL="etc/dc_ws.wsdl" xmlns:s="urn:document">
        		<entry key="dataFormat" value="MESSAGE"/>
    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring";>
        <endpoint id="callRealWebService" uri="http://hostname/se/ws/dc_ws.php"/>
        <route id="_route1">
            <!-- CXF consumer using MESSAGE format -->
            <!-- log input received -->
            <!-- enrich the input by ensure the incidentId parameter is set 
	      <to uri="bean:enrichBean"/> -->
            <!-- Need to remove the http headers which could confuse the http endpoint -->
            <!-- send proxied request to real web service -->
            <from id="_from1" uri="cxf:bean:servicioSS"/>
            <!-- log answer from real web service -->
            <!-- removeHeaders id="_removeHeaders1" pattern="CamelHttp*"/> -->
            <to id="_to1" uri="log:input"/>
            <to id="_to2" ref="callRealWebService"/>
            <to id="_to3" uri="log:output"/>


public class Application extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);

I don’t define any configuration into the application.yml, I reviewed in other forums that have to define the cxf.path but it is necessary? 

could you please help me.