I try to send a POST request to a SOAP Webservice throw camel route, and i got this error message :
org.apache.cxf.service.factory.ServiceConstructionException: Could not find definition for service {http://www.webserviceX.NET/}GlobalWeather.
This is the route:
<route id="my_Sample_Camel_Route_with_CXF">
<from uri="file:src/data?noop=true"/>
<log loggingLevel="INFO" message=">>> ${body}"/>
<to uri="cxf://http://www.webservicex.net/globalweather.asmx?wsdlURL=http://www.webservicex.net/globalweather.asmx?wsdl&serviceName={http://www.webserviceX.NET/}GlobalWeather&portName={http://www.webserviceX.NET/}GlobalWeatherSoap&dataFormat=MESSAGE"/>
<log loggingLevel="INFO" message=">>> ${body}"/>
</route>
service defenition in WSDL:
<wsdl:service name="GlobalWeather">
<wsdl:port name="GlobalWeatherSoap" binding="tns:GlobalWeatherSoap">
<soap:address location="http://www.webservicex.net/globalweather.asmx"/>
</wsdl:port>
<wsdl:port name="GlobalWeatherSoap12" binding="tns:GlobalWeatherSoap12">
<soap12:address location="http://www.webservicex.net/globalweather.asmx"/>
</wsdl:port>
<wsdl:port name="GlobalWeatherHttpGet" binding="tns:GlobalWeatherHttpGet">
<http:address location="http://www.webservicex.net/globalweather.asmx"/>
</wsdl:port>
<wsdl:port name="GlobalWeatherHttpPost" binding="tns:GlobalWeatherHttpPost">
<http:address location="http://www.webservicex.net/globalweather.asmx"/>
</wsdl:port>
</wsdl:service>
How can i fix it ?
"/"
at the end must be deleted.
it should be like this:
serviceName={http://www.webserviceX.NET}GlobalWeather&
portName={http://www.webserviceX.NET}GlobalWeatherSoap