External SOAP service issue
moraleslos Dec 31, 2014 10:19 AMI'm trying to create a simple switchyard app where it invokes an external SOAP service (doc/lit) to get weather results given a zip code. The public site and WSDL can be found here: http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL
Now when I deploy this switchyard app, I get the folllowing error message:
org.switchyard.extensions.wsdl.WSDLReaderException: SWITCHYARD012801: Service operations on a WSDL interface must have exactly one parameter.
at org.switchyard.extensions.wsdl.WSDLReader.getParts(WSDLReader.java:361)
at org.switchyard.extensions.wsdl.WSDLReader.readWSDL(WSDLReader.java:101)
at org.switchyard.extensions.wsdl.WSDLService.fromWSDL(WSDLService.java:100)
at org.switchyard.extensions.wsdl.WSDLService.fromWSDL(WSDLService.java:83)
at org.switchyard.deploy.internal.Deployment.loadServiceInterface(Deployment.java:413)
... 10 more
The WSDL looks correct to me and this is something I can't change obviously so how do I go about getting this to work? Below is my switchyard xml:
<sca:component name="Route">
<camel:implementation.camel>
<camel:xml path="route.xml"/>
</camel:implementation.camel>
<sca:service name="WeatherService">
<sca:interface.java interface="net.test.weather.WeatherService"/>
</sca:service>
<sca:reference name="WeatherSoap">
<sca:interface.wsdl interface="Weather.wsdl#wsdl.porttype(WeatherSoap)"/>
</sca:reference>
</sca:component>
<sca:reference name="WeatherSoap" multiplicity="0..1" promote="Route/WeatherSoap">
<sca:interface.wsdl interface="Weather.wsdl#wsdl.porttype(WeatherSoap)"/>
<soap:binding.soap name="WeatherExternalSoap">
<soap:messageComposer unwrapped="true"/>
<soap:wsdl>Weather.wsdl</soap:wsdl>
<soap:wsdlPort>WeatherSoap12</soap:wsdlPort>
</soap:binding.soap>
</sca:reference>
<sca:service name="WeatherService" promote="Route/WeatherService">
<sca:interface.java interface=net.test.weather.WeatherService"/>
<resteasy:binding.rest name="WeatherServiceRest">
<resteasy:interfaces>net.test.weather.WeatherServiceRest</resteasy:interfaces>
<resteasy:contextPath>weather-soap</resteasy:contextPath>
</resteasy:binding.rest>
</sca:service>
Below is my route:
<routes xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="switchyard://WeatherService"/>
<log message="WeatherService - message received: ${body}"/>
<to uri="switchyard://WeatherExternalSoap"/>
</route>
</routes>
Any ideas? Thanks in advanced.