odata - Apache Camel-Oling2 read endpoint is not working -
i using apache camel , trying read odata using camel-olingo2 component got "serviceuri" error everytime. i've tried documentation implementation couldn't find success. please let me know way of connectivity odata using camel-olingo2 component.
code:
<bean id="parambean" class="org.springframework.beans.factory.config.mapfactorybean"> <property name="sourcemap"> <map key-type="java.lang.string" value-type="java.lang.string"> <entry key="serviceuri" value="http://services.odata.org/odata/odata.svc"/> </map> </property> </bean> <camelcontext id="camel" xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="olingo2://read/persons?queryparams=#parambean" /> <to uri="file:d:\camel\output" /> </route> </camelcontext>
exception:
exception in thread "main" org.apache.camel.failedtocreaterouteexception: failed create route route1 at: >>> to[olingo2://read/services.odata.org/odata/odata.svc/persons] <<< in route: route(route1)[[from[direct:...]] -> [to[olingo2://read/http:... because of failed resolve endpoint: olingo2://read/services.odata.org/odata/odata.svc/persons due to: serviceuri @ org.apache.camel.model.routedefinition.addroutes(routedefinition.java:1072)
you need add serviceuri end of olingo component endpoint below:
<from uri="olingo2://read/persons?serviceuri=http://services.odata.org/odata/odata.svc" /> <to uri="file:d:\ca...
is there reason wanted create map , use reference of component's properties rather adding end of endpoint?
Comments
Post a Comment