[EMAIL PROTECTED] 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
