The CoapClient Connector can be used in Mule applications to implement CoAP clients. After installing the Connector into Anypoint Studio, CoAP clients can be configured by dragging CoAP elements into the flow, or by editing the xml content of the Mule configuration file directly. The CoAP client configuration is composed of a global coap-client configuration element, that defines the CoAP endpoint, message-processors and message-sources. With these Mule flows can issue CoAP requests to servers and handle their responses.
To use the CoAP Client, its namespace and schemaLocation need to be specified in every mule-config file containing CoAP Client elements:
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:coap-client="http://www.mulesoft.org/schema/mule/coap-client" xsi:schemaLocation= "http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/coap-client http://www.teslanet.nl/schema/mule/coap-client/1.0/mule-coap-client.xsd"> > ... </mule>
When CoAP Client elements are dragged from Studio's components panel into the Mule flow, the namespace and schemaLocation are added automatically.
To configure the CoAP Client Connector see the section called “Client Configuration”
To find CoAP resources see the section called “Server discovery”
To issue requests see the section called “Requests on CoAP resources”
To issue asynchronous requests see the section called “Asynchronous requests on CoAP resources”
To observe resources see the section called “Observing CoAP resources”
For an overview of available CoAP response codes see the section called “Response codes”
For an overview of available message properties see the section called “Message Properties”