...
- the endpoint name, in this case the id referring to the endpoint defined in Spring XML in the camelContext element.
- the payload, can be any kind of object
- the key for the header, in this case a Camel keyword to set the filename
- and the value for the header
Running the example
We start our integration with maven using mvn jetty:run
. Then we open a browser and hit http://localhost:8080
. Jetty is so smart that it display a frontpage with links to the deployed application so just hit the link and you get our application. Now we hit append /services to the URL to access the AXIS frontpage. The URL should be http://localhost:8080/camel-example-axis/services
.
You can then test it using a web service test tools such as SoapUI.
Hitting the service will output to the console
Code Block |
---|
2008-09-06 15:01:41.718::INFO: Started SelectChannelConnector @ 0.0.0.0:8080
[INFO] Started Jetty Server
Hello ReportIncidentService is called from Ibsen
|
And there should be a file in the target subfolder.
Code Block |
---|
dir target /b
123.txt
|
Unit Testing
TODO: How to embed Jetty and run a unit test by hitting a webservice call and expect the file output