Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here is a breakdown of what happens when you hit the 'send' button on the client.html page. Image Removed

  1. When send button is clicked, a javascript function(send()) is invoked.
  2. 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.
  3. Wiki Markup
    The Httpendpoint  receives the http+soap request and sends the request to the 'proxied' pojo endpoint(proxied endpoint reference configuration is shown 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" />
    
  4. The servicemix-jsr181 receives the request from the NMR and invokes the 'SimpleService' pojo' 'ping' method.
  5. 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
    Code Block
    titleSimpleService.java
    borderStylesolid
    public PingResponse ping(PingRequest request)
    {  PingResponse response = new PingResponse();  response.setMessage("Ping: " + request.getMessage());  return response;  }
    
    This method prefixes a "Ping:" to request recieved and sends it back as the response
  6. The Servicemix-http sends the response back the browser instance from which the ajax request was sent.
  7. The browser invokes java script function that sets the response field value to the response received.

...