You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Joshua Jackson <jo...@gmail.com> on 2008/03/14 03:45:15 UTC

Sending message to Tuscany

Dear all,

Is it possible to send message to Tuscany? I've got this Interactive
Voice Response program made by a vendor and it is able to send a
message to a socket. Now, can tuscany receive those message from a
certain port and then send back the response to the IVR ?

Thanks in advance

-- 
Let's show the world what we've got.

Blog: http://joshuajava.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Sending message to Tuscany

Posted by Simon Laws <si...@googlemail.com>.
On Fri, Mar 14, 2008 at 2:45 AM, Joshua Jackson <jo...@gmail.com>
wrote:

> Dear all,
>
> Is it possible to send message to Tuscany? I've got this Interactive
> Voice Response program made by a vendor and it is able to send a
> message to a socket. Now, can tuscany receive those message from a
> certain port and then send back the response to the IVR ?
>
> Thanks in advance
>
> --
> Let's show the world what we've got.
>
> Blog: http://joshuajava.wordpress.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>
Hi Joshua


If the IVR can deal with HTTP, RMI or SOAP/WebServices then you can probably
use one of the bindings we already have.  However it sounds like you are
talking about a proprietary socket based protocol.

If that is true you would need to construct a new binding.socket, for
example,  to allow you to listen to messages and the send messages out via a
plain socket. You will likely need a databinding to marshal the messages
into the appropriate format.

This may all sound a bit daunting but it's actually quite easy to use the
Tuscany SPI to create binding and databinding extensions. There is a binding
extension sample you can look at, see samples/binding-echo-extension, and of
course there are a number of bindings and databindings already implemented
that can be referred to.

Hope that helps

Simon

Re: Sending message to Tuscany

Posted by ant elder <an...@apache.org>.
On Tue, Mar 18, 2008 at 8:48 AM, Joshua Jackson <jo...@gmail.com>
wrote:

> On 3/18/08, ant elder <an...@gmail.com> wrote:
> > Yes there's a JMS binding that lets you talk to a JMS broker, see
> > http://incubator.apache.org/tuscany/sca-java-bindingjms.html
> >
> >   ...ant
>
> Where is the list of docs on databindings besides jms? I could not
> find the http data binding docs.
>
> cheers,
>

The doc needs work and is a little out of date, its likely to get improved
for the up coming 1.2 release, the list of whats there is at:
http://incubator.apache.org/tuscany/sca-java-user-guide.html#SCAJavaUserGuide-AvailableExtensions

   ...ant

Re: Sending message to Tuscany

Posted by Simon Laws <si...@googlemail.com>.
On Tue, Mar 18, 2008 at 8:48 AM, Joshua Jackson <jo...@gmail.com>
wrote:

> On 3/18/08, ant elder <an...@gmail.com> wrote:
> > Yes there's a JMS binding that lets you talk to a JMS broker, see
> > http://incubator.apache.org/tuscany/sca-java-bindingjms.html
> >
> >   ...ant
>
> Where is the list of docs on databindings besides jms? I could not
> find the http data binding docs.
>
> cheers,
>
>
> --
> Let's show the world what we've got.
>
> Blog: http://joshuajava.wordpress.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>
Hi

Our extension documentation is not complete yet so some of them are not
present in the user guide. Can you raise JIRA for the ones that you find are
missing and that will focus the mind a little. If you feel like contributing
some docs based on what you are very welcome to do so.

Regards

Simon

Re: Sending message to Tuscany

Posted by Joshua Jackson <jo...@gmail.com>.
On 3/18/08, ant elder <an...@gmail.com> wrote:
> Yes there's a JMS binding that lets you talk to a JMS broker, see
> http://incubator.apache.org/tuscany/sca-java-bindingjms.html
>
>   ...ant

Where is the list of docs on databindings besides jms? I could not
find the http data binding docs.

cheers,


-- 
Let's show the world what we've got.

Blog: http://joshuajava.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Sending message to Tuscany

Posted by ant elder <an...@gmail.com>.
On Tue, Mar 18, 2008 at 1:44 AM, Joshua Jackson <jo...@gmail.com>
wrote:

> On 3/14/08, Simon Laws <si...@googlemail.com> wrote:
> > Hi Joshua
> >
> > More comments in line
> >
> > Regards
> >
> > Simon
> ...
>
> Hi Simon,
>
> I've talked to the guy from the IVR vendor, and they are able to send
> a GET request to HTTP. Now receiving the message is clear, but another
> problem arised. I want to send those message back to a JMS broker. Can
> Tuscany do this?
>
>
Yes there's a JMS binding that lets you talk to a JMS broker, see
http://incubator.apache.org/tuscany/sca-java-bindingjms.html

   ...ant

Re: Sending message to Tuscany

Posted by Joshua Jackson <jo...@gmail.com>.
On 3/14/08, Simon Laws <si...@googlemail.com> wrote:
> Hi Joshua
>
> More comments in line
>
> Regards
>
> Simon
...

Hi Simon,

I've talked to the guy from the IVR vendor, and they are able to send
a GET request to HTTP. Now receiving the message is clear, but another
problem arised. I want to send those message back to a JMS broker. Can
Tuscany do this?

Best regards,

-- 
Let's show the world what we've got.

Blog: http://joshuajava.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Sending message to Tuscany

Posted by Simon Laws <si...@googlemail.com>.
Hi Joshua

More comments in line

Regards

Simon

On Fri, Mar 14, 2008 at 11:20 AM, Joshua Jackson <jo...@gmail.com>
wrote:

> On 3/14/08, Simon Laws <si...@googlemail.com> wrote:
> > On Fri, Mar 14, 2008 at 10:36 AM, Joshua Jackson <jo...@gmail.com>
> > wrote:
> > 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.
>
> Hi Simon,
>
> This is what I exactly need. So IVR won't understand what Java method
> it should call (although I don't know yet whether IVR can call an RPC
> method) and on the other side I expect tuscany would listen to any
> message that arrives and then do the processing.


Yep, sounds good.


>
>
> Btw,
> How reliable is this the message processing? Is the method uses
> 'handshake' or 'message listener' ? We had bad experience using
> handshake since the IVR socket is often restarted, and once it is
> restarted the program all the sudden hangs. I am expecting high
> reliability from tuscany and won't hang whenever the IVR is restarted.
> I think message listener is much better than the concept of handshake.
> Does tuscany provides message listener method?


I wasn't being prescriptive and saying how binding.socket should be
implemented so if you have particular ideas about how to make this more
reliable, for example, then that's great. We don't have any low level socket
handling code at the moment AFAIK but there is plenty of experience in the
Java world to call on.


>
>
> Thanks in advance
>
> --
> Let's show the world what we've got.
>
> Blog: http://joshuajava.wordpress.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>

Re: Sending message to Tuscany

Posted by Joshua Jackson <jo...@gmail.com>.
On 3/14/08, Simon Laws <si...@googlemail.com> wrote:
> On Fri, Mar 14, 2008 at 10:36 AM, Joshua Jackson <jo...@gmail.com>
> wrote:
> 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.

Hi Simon,

This is what I exactly need. So IVR won't understand what Java method
it should call (although I don't know yet whether IVR can call an RPC
method) and on the other side I expect tuscany would listen to any
message that arrives and then do the processing.

Btw,
How reliable is this the message processing? Is the method uses
'handshake' or 'message listener' ? We had bad experience using
handshake since the IVR socket is often restarted, and once it is
restarted the program all the sudden hangs. I am expecting high
reliability from tuscany and won't hang whenever the IVR is restarted.
I think message listener is much better than the concept of handshake.
Does tuscany provides message listener method?

Thanks in advance

-- 
Let's show the world what we've got.

Blog: http://joshuajava.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Sending message to Tuscany

Posted by Simon Laws <si...@googlemail.com>.
On Fri, Mar 14, 2008 at 10:36 AM, Joshua Jackson <jo...@gmail.com>
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: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>
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/

Re: Sending message to Tuscany

Posted by Joshua Jackson <jo...@gmail.com>.
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: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Sending message to Tuscany

Posted by Simon Nash <na...@apache.org>.
Joshua Jackson wrote:
> Dear all,
> 
> Is it possible to send message to Tuscany? I've got this Interactive
> Voice Response program made by a vendor and it is able to send a
> message to a socket. Now, can tuscany receive those message from a
> certain port and then send back the response to the IVR ?
> 
> Thanks in advance
> 
Hi Joshua,
Tuscany supports the use of custom protocols like this through the
ability to create a binding extension.

Is the message to the socket sent using HTTP, or does it use some
other custom protocol?  If it is HTTP, we have a number of bindings
in Tuscany that do this kind of thing and it would not be hard to
adapt one of these to do what you need.  If it is a custom protocol,
you will need to write a bit more code to handle the socket protocol
yourself in the binding, but it shouldn't be too bad.

For examples of how to write bindings in Tuscany you can look at the
bindings that Tuscany provides for Axis2 Web Services, JMS, RMI, JSON,
Atom, RSS, etc.  There is also a sample called binding-echo-extension,
but (unfortunately) I don't think the code in this is as easy to
understand as some of the other bindings that I mentioned.

I'd be interested in working with you to help you create a custom
socket binding, especially if it could be used to derive a simple
sample that Tuscany can use to show how to do something like this.

   Simon

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org