You don't mention what technologies are you using on the server, so I'll try to make this server-agnostic.
You have to point your form action to a different url than your web service (in rails this would be some other "controller action").
<form id="input_form" action="your/non-SOA/action">
<input type="text" name="user" />
<input type="submit" value="Submit"/>
</form>
Somewhere else (probably on a js file loaded on the head of the html) you should have a javascript code that modifies how the submit "click" event is handled:
$(function(){ // jQuery DOM ready function.
var form = $("#input_form");
var submit_button = $("#input_form .input[type=submit]");
submit_button.bind('click', function() {
// serialize form with JSON and send it here
});
});
This code will execute only if javascript is enabled. If it isn't, then the form will be sent to the your/non-SOA/action
via a POST request, usually in form of 'associative hash' on the action params. So you have to transform this hash into a json structure on the server, and send it to the corresponding web service.
It will look like this in your server (pseudo-code):
function your.non-SOA.action(params)
// you might need more treatment than just doing to_json, depending on your ws syntax
serialized_text = params['input_form'].to_json
myWebservice = Webservice.new('your-webservice-uri')
try
myWebservice.send(serialized_text)
catch(exception e)
// handle exceptions
end
end