You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Aleksander Slominski <as...@cs.indiana.edu> on 2001/11/10 17:57:24 UTC

callbacks [Re: SOAP Performance and when SOAP should be used]

Chuck.King@ubsw.com wrote:

> I also had a question regarding callbacks.  I don't see how callbacks
> can be used currently with SOAP.  If a client makes a SOAP request to
> the server and the process takes one hour, I can't hold the
> connection for that long and thus will send the request
> asynchronously.  When the job finishes on the server, how then is my
> client called back and notified?  I see this as a current drawback to
> SOAP due to the fact it isn't designed to handle these kind of
> requests.  Am I missing something?

hi,

we had exactly the same problem in our applications that are started
by scheduler and are also long running jobs. so we need to be notified
when theyu start execution and then to monitor their progress essentially
by sending to us events as callbacks to provide asynchronous notification.

to make it work the application must know how to contact back
the event listener and as we do not want to hardcode the listener location
so we obtain it from LDAP - it is a very simple XML document that
contains portType name (uri + localName) and URL. we use
portType to make sure that the event listener is of expected type.
we call this document remote reference and for more details please see
http://www.extreme.indiana.edu/soap/rmi/design/

we have also extended this mechanism with the use of SOAP event channel
that accepts subscriptions. the subscription message contains as one
of the parts the above mentioned remote reference that is used by the event
channel to send callback messages with events, for example:

<SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/‘
xmlns:xsi='http://www.w3.org/1999/XMLSchema/instance/'
xmlns:xsd='http://www.w3.org/1999/XMLSchema/'
xmlns:xsoap='urn:soaprmi-v11:temp-java-xml-type'
SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<SOAP-ENV:Body>
<subscribeLease>
<listener xsi:type='xsoap:soaprmi.port.Port'>
<endpoint xsi:type='xsoap:soaprmi.port.Endpoint'>
<location
xsi:type='xsd:string'>http://192.168.1.7:4561/urn:soaprmi-v11:simple-listener</location>

<binding xsi:type='xsoap:soaprmi.port.Binding'>
<name xsi:type='xsd:string'>urn:soaprmi-v11:simple-listener</name>
</binding>
</endpoint>
<portType xsi:type='xsoap:soaprmi.port.PortType'>
<name xsi:type='xsd:string'>soaprmi.events.EventListener</name>
<uri xsi:type='xsd:string'>urn:soaprmi-v11:temp-java-port-type</uri>
</portType>
<name xsi:type='xsd:string'>urn:soaprmi-v11:simple-listener</name>
</subscribeLease>
<leaseDuration xsi:type='xsd:long'>240000</leaseDuration>
<filter xsi:type='xsoap:soaprmi.events.Event' xsi:null='1'/>
<handback xsi:type='xsd:string' xsi:null='1'/>
</subscribeLease>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

this request when accepted by the event channel will be responded with
granted event lease and the event channel will start sending events to
the subscribed event listener at
http://192.168.1.7:4561/urn:soaprmi-v11:simple-listener
that must implement portType
urn:soaprmi-v11:temp-java-port-type:soaprmi.events.EventListener

for more on how we use events over SOAP in our XSOAP implementation
pelase see (a bit outdated): http://www.extreme.indiana.edu/soap/events/

thanks,

alek



what does this error mean

Posted by Ken Chang <wh...@ihug.com.au>.
hi,
can someone tell me what is the meaning of  following error which appears in
the server console when i try to invoke from client

In TemplateProvider.locate()
URI: urn:ECRM
DD.ServiceClass: org.apache.soap.providers.StatelessEJBProvider
DD.ProviderClass: null
Call.MethodName: logFeedback
Exception caught: java.lang.ClassNotFoundException:
dsp.ass2.ken00123051.CcWorkerHome



Ken


what does this error mean

Posted by Ken Chang <wh...@ihug.com.au>.
hi,
can someone tell me what is the meaning of  following error which appears in
the server console when i try to invoke from client

In TemplateProvider.locate()
URI: urn:ECRM
DD.ServiceClass: org.apache.soap.providers.StatelessEJBProvider
DD.ProviderClass: null
Call.MethodName: logFeedback
Exception caught: java.lang.ClassNotFoundException:
dsp.ass2.ken00123051.CcWorkerHome



Ken


Re: callbacks [Re: SOAP Performance and when SOAP should be used]

Posted by Saradhi Vemuri <sa...@yahoo.com>.
Chuck : As you can see SOAP is not a transport
mechanism. Having said that it would be unfair to
except the API (which has not been standardized) to
provide you that. What you could do however is use a
better mechanism like JMA or MQ orany messaging system
to do notification stuff. Now callbacks implemented
using RMI / RPC / CORBA are not a very clean mechanism
the reason being
1) The clients would have to be within firewall.
2) The language bindings might not be available for
all languages
3) The callsbacks cannot be used for realtime data, as
marshalling and unmarshalling during transport take
lot of time.

The other alternative is use HTTP keep alive and
maintain the connection for streaming in data, I did
it and is very useful.
Saradhi.


__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

Re: callbacks [Re: SOAP Performance and when SOAP should be used]

Posted by Saradhi Vemuri <sa...@yahoo.com>.
Chuck : As you can see SOAP is not a transport
mechanism. Having said that it would be unfair to
except the API (which has not been standardized) to
provide you that. What you could do however is use a
better mechanism like JMA or MQ orany messaging system
to do notification stuff. Now callbacks implemented
using RMI / RPC / CORBA are not a very clean mechanism
the reason being
1) The clients would have to be within firewall.
2) The language bindings might not be available for
all languages
3) The callsbacks cannot be used for realtime data, as
marshalling and unmarshalling during transport take
lot of time.

The other alternative is use HTTP keep alive and
maintain the connection for streaming in data, I did
it and is very useful.
Saradhi.


__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com