[ https://issues.apache.org/jira/browse/CAMEL-7503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-7503: ------------------------------- Fix Version/s: 2.14.0 2.13.3 2.12.5 > PAYLOAD Producer select first available operation if OPERATION_NAME don't > specified > ----------------------------------------------------------------------------------- > > Key: CAMEL-7503 > URL: https://issues.apache.org/jira/browse/CAMEL-7503 > Project: Camel > Issue Type: Bug > Components: camel-cxf > Affects Versions: 2.13.0 > Reporter: Alexey Markevich > Assignee: Willem Jiang > Fix For: 2.12.5, 2.13.3, 2.14.0 > > > Webservice [1] contains two operations. > Following route works: > from("timer:cTimer_1?period=1&repeatCount=1&delay=1") > .setBody().constant("<web:GetWeather > xmlns:web='http://www.webserviceX.NET'><web:CityName>Minsk</web:CityName></web:GetWeather>") > .to("cxf://http://www.webservicex.net/globalweather.asmx?wsdlURL=F:/globalweather.wsdl&dataFormat=PAYLOAD&serviceName={http://www.webserviceX.NET}GlobalWeather&endpointName={http://www.webserviceX.NET}GlobalWeatherSoap") > .to("log:cLog_1?level=INFO") > But with body > <web:GetCitiesByCountry > xmlns:web='http://www.webserviceX.NET'><web:CountryName>Belarus</web:CountryName></web:GetCitiesByCountry> > there is exception [2]. > Looking into the sources [3] I found that first available opration used. > Expected that operation lookup is based on payload root element (which is > different for operations) > 1. http://www.webservicex.net/globalweather.asmx?WSDL > 2. > [WARN ]: org.apache.camel.component.timer.TimerConsumer - Error processing > exchange. Exchange[Message: <web:GetCitiesByCountry > xmlns:web='http://www.webserviceX.NET'><web:CountryName>Belarus</web:CountryName></web:GetCitiesByCountry>]. > Caused by: [java.lang.IllegalArgumentException - The PayLoad elements cannot > fit with the message parts of the BindingOperation. Please check the > BindingOperation and PayLoadMessage.] > java.lang.IllegalArgumentException: The PayLoad elements cannot fit with the > message parts of the BindingOperation. Please check the BindingOperation and > PayLoadMessage. > at > org.apache.camel.component.cxf.CxfEndpoint$CamelCxfClientImpl.setParameters(CxfEndpoint.java:1011) > at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:526) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:472) > at > org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:112) > at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:113) > at > org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72) > at > org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:118) > at org.apache.camel.processor.Pipeline.process(Pipeline.java:80) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) > at > org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:139) > at > org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:64) > at java.util.TimerThread.mainLoop(Timer.java:555) > at java.util.TimerThread.run(Timer.java:505) > 3. > https://github.com/apache/camel/blob/master/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java#L344 -- This message was sent by Atlassian JIRA (v6.2#6252)