THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
Understanding the 'soap-binding' (http://www.servicemix.org/site/soap-binding-example.html) example
The soap-binding example aims to demonstrate how one can use the Servicemix-http and servicemix-jsr181 components to invoke a pojo object as a web service over HTTP.
...
- When send button is clicked, a javascript function(send()) is invoked.
- The javascript function submits an Ajax request to the http endpoint deployed using the serviceunit(binding-su.zip) on the Servicemix-http component.The soap request present in the textfield on the left hand side(see circled content in the above image) is sent a parameter to Ajax request.
Wiki Markup The Httpendpoint receives the http+soap request and sends the request to the 'proxied' pojo endpoint(proxied endpoint referencesreference configuration areis shown as bolded text in the xbean.xml excerpt below) deployed using engine-su.zip over the NMR. Here is the excerpt from the xbean.xml file under \[Serivemix installation directory\]\servicemix-3.0-M1\examples\soap-binding\src\components\soap
Code Block xml xml <http:endpoint service="demo:simple-service" endpoint="simple-service" role="consumer" locationURI="http://localhost:8192/Service/" defaultMep="http://www.w3.org/2004/08/wsdl/in-out" soap="true" />
- The servicemix-jsr181 receives the request from the NMR and invokes the 'SimpleService' pojo' 'ping' method.
- The 'SimpleService' returns the response to the 'ping' method and servicemix-jsr181 sends to response back the Httpendpoint over the NMR.
Here is the excerpt of the implemenation for the ping method
This method prefixes a "Ping:" to request recieved and sends it back as the responseCode Block title SimpleService.java borderStyle solid public PingResponse ping(PingRequest request) { PingResponse response = new PingResponse(); response.setMessage("Ping: " + request.getMessage()); return response; }
- The Servicemix-http sends the response back the browser instance from which the ajax request was sent.
- The browser invokes java script function that sets the response field value to the response received.
...