Nishant Joshi wrote:
Thanks for reply, I have generated wsdl by modifying composite file as you
have suggested, Now i have two wsdl generated on my Tomcat you can see the
log below....
INFO: initContextPath: /sample-simple-callback-ws
Oct 25, 2007 10:35:24 AM
org.apache.tuscany.sca.host.webapp.WebAppServletHost addServletMapping
INFO: addServletMapping: /MyClientComponent
Oct 25, 2007 10:35:24 AM
org.apache.tuscany.sca.host.webapp.WebAppServletHost addServletMapping
INFO: addServletMapping: /MyServiceComponent
Now i want to understand how callback service work from client side. I m
creating client in Eclipse which was non-Tuscany client means i m using
eclipse's facility to create web services client.
So how i get callback facility in my cleint?
>
This isn't possible. Callbacks require extra information to be passed
on the wire. Currently only Tuscany can send and receive this extra
information. The extra information is:
(mandatory) callback URI, so the service knows where to direct the
callback request
(optional) application-specified callback ID, used by the application
to correlate callbacks with the related application state
(optional) conversation ID, used by Tuscany to correlate forward
calls and callbacks with the related application state
Meanwhile i have created one sample in which i have used polling mechanism
to get result. So i want to understand how callback facility work i have
read somewhere that we need server on client side to get result from service
in callback, is it so?
>
Here's the end-to-end flow for a callback between a Tuscany client and
a Tuscany service.
1. Client exposes a callback URI for the reference that is making
the call to the service. You can think of this as turning the
reference into a callback service.
2. Client makes a call to the service, passing the necessary callback
information.
3. Service receives the call with the callback information.
4. Service uses the callback information to make a callback to the
client URI exposed in step 1.
If the client is a non-Tuscany Web service client, then steps 1 and 2
don't happen. This is why you are getting an error from step 4.
I have also seen the axis2 client they have also used callback plus polling
mechanism so i m bit confused about callback and polling mechanism.
>
Axis2 callbacks aren't the same as Tuscany callbacks. In Axis2, a
callback tells the client that the forward service invocation has
completed. In SCA and Tuscany, a callback is a separate service
invocation that can occur either before or after the forward call
has completed.
Is it mandatory to use @OneWay method in callback service? means one method
is of type void(@OneWay) and other method gives me the result which i have
done in polling
>
Callbacks can be used with or without @OneWay on either or both of the
forward call and the callback call.
Is it necessary to use polling mechanism with callback service to get
result?if not than using only callback how i get result?can you provide me
one sample client with only callback facility?
If a Tuscany client is talking to a Tuscany service, there is no need
to ever use polling, because a callback can be used instead. You can
use a callback to send a result from a forward call if you want to,
or for any other application-specific purpose. Here are two
examples showing both styles of using callbacks:
1. A client makes an "order" call. The response to the call informs
the client that the order is "out of stock". Some time later,
a callback is made to inform the client of the item's expected
availability date. Later still, another callback informs the
client that the item is available.
2. A client makes an "order" call. No response is sent (the method
has void return type). A callback is made saying that the order
is "out of stock".
In the second case, the callback carries the response from the forward
call. In the first case, there is a response from the forward call
and also some callbacks with additional information.
If the client placing the order is a non-Tuscany Web service client,
then it would need to either use polling or define its own callback
protocol that doesn't use SCA callbacks.
Sorry to ask you so much question but i m not able to clarify myself by
searching on net :)
It will be very helpful if you can clarify my confusion.
No problem! There is no documentation on this yet (I need to write
some :-) I am very happy to answer any more questions that you have.
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]