You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Reji Mathews <co...@gmail.com> on 2020/11/12 01:12:05 UTC
Unable to map @UriPath values in Endpoint class
Hello component builders here!
Am trying to create a camel component to connect with the Huawei cloud
services.
I started developing with camel v3.4.0 archetype ->
mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes
-DarchetypeArtifactId=camel-archetype-component
-DarchetypeVersion=3.4.0-SNAPSHOT
I have my SimpleNotificationEndpoint extending DefaultEndpoint as follows
@UriEndpoint(firstVersion = "3.4.0-SNAPSHOT", scheme = "hwcloud-smn", title
= "SimpleNotification", syntax="hwcloud-smn:smnService",
category = {Category.CLOUD, Category.MESSAGING}, producerOnly
= true)
public class SimpleNotificationEndpoint extends DefaultEndpoint {
@UriPath(description = "service name")
@Metadata(required = true)
private String smnService;
@UriParam(label = "producer", defaultValue = "publish", description =
"operation to invoke")
private String operation;
while testing, my producer endpoint is configured as following
.to("hwcloud-smn:publishmessage?operation=publishTextMessage&authKey=*******")
I assume, with @UriPath, the String value "publishmessage" should be copied
to the endpoint class member smnService. But, when I test, its null. Any
suggestions?
Cheers
Reji Mathews