On Fri, Mar 14, 2008 at 10:36 AM, Joshua Jackson <[EMAIL PROTECTED]>
wrote:

> Hi guys,
>
> I have taken a look at the tuscany's sample. But I'm quite confused
> here, does tuscany enforce you to call a Java method in some way?
> Please CMIIW. Because what I'll receive from the IVR is only a message
> in a String format from a socket and then I'll process this message
> and the give it back to the IVR in String format also. I don't think
> the IVR understand about calling Java methods. Is there any way I can
> achieve this in Tuscany?
>
> --
> Let's show the world what we've got.
>
> Blog: http://joshuajava.wordpress.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
Hi

To do any processing of the string that is received at your SCA service you
will have to call some function or other. If your component implementation
is implementation.java then that will be a Java method.  However that
doesn't mean that you need to invent some RPC protocol to indicate to the
service what method should be called.

Protocols like HTTP define a specific set of methods, e.g. GET, POST, PUT
etc. that a service can choose to implement.  If you take a look in the
binding.http [1] you will set that the (java in this case) test service
implementations provide "service" or "get" methods as examples of methods
that will perform processing as a result of an HTTP call arriving.

So you could say that a binding.socket dispatches message processing to a
method called process(message) for example. You are not expecting the
message arriving from the IVR to contain information about which method
should be called. Whenever a message arrives on the the socket,
binding.socket simply dispatches it to the process() method on the service.
The process() method just does whatever processing you need it to do on the
message.

Regards

Simon

[1]
http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/binding-http/

Reply via email to