Hi Jeff,
Actually the link I posted misses an "L" at the end :p it's a link to a
question I have asked in another forum. Sorry for the mistake :) the
corrected link is http://www.nabble.com/Axis2-File-Caching-t4402803.html
this
Fahd.
dreamryder wrote:
>
> Hi Fahd,
> I don't know Axis2 at all. I work with the older Axis 1.4.
> Also, I haven't seen that problem.
> But, a 404 is when HTTP can't find the request URI (as you probably
> already know).
> So, it's looking for the page /Axis2-File-Caching-t4402803.htm, which
> looks suspiciously like a generated page to me. If you are actually
> familiar with this html page, then I would suggest that the page is in
> the wrong location. Else, I don't have any other ideas. Sorry.
> -jeff
>
>
> -----Original Message-----
> From: Elmouj [mailto:[EMAIL PROTECTED]
> Sent: Sunday, September 09, 2007 6:01 PM
> To: [email protected]
> Subject: RE: Axis2 events handling
>
>
> Hello Jeff,
>
> do u have any idea abou this issue :
> "http://www.nabble.com/Axis2-File-Caching-t4402803.htm"
>
> Tnx in advance,
>
> Fahd.
>
>
> Elmouj wrote:
>>
>> Hi Jeff,
>>
>> I've been out of office the last 2 days and I've just came. Well
> for
>> the problem, I have found a way to solve it using Phases in Axis2
> (this is
>> directly related to what you have said about handlers :) ). a solution
>> (for anybody who may need it) is to created a class called MyPhase
> that
>> extends the org.apache.axis2.engine.Phase class. instantiate an object
>> from this class and insert it at the end of the Output Pipe so that to
> be
>> executed last. The org.apache.axis2.engine.Phase class has a method
> called
>> 'flowComplete' which will be called on each registered handler that
> had
>> its invoke(...) method called during the processing of the message,
> once
>> the message processing has completed. The code to execute after the
> last
>> byte is sent to the client (in my case deleing a file) is put in this
>> method and since there is no handler in the phase we created
> (MyPhase),
>> this method will be called right after the phase on the top of our
> phase
>> in the Output pipe has finished.
>>
>> Thanks for your concern Jeff
>>
>> Fahd.
>>
>> A phase can be added to the Output Pipe using:
>> outMessageContext.addOutboundExecutedPhase(MP); Where
> outMessageContext is
>> the output MessageContext and MP is a MyPhase Object
>>
>> dreamryder wrote:
>>>
>>> Well,
>>> I'm not that knowledgeable on Axis 2 (I'm an old Axis 1.3 guy) but
>>> anyway, a handler is another class you write and register that can be
>>> called on incoming requests (gets entire soap msg before the impl
> gets
>>> it) and on outgoing responses (gets soap msg after the impl has
> finished
>>> with it), for both client and service. There is a good example in the
>>> Axis2 samples. The example I am referring too is called
>>> userguide/loggingmodule. This should give you a feel for how a
> handler
>>> looks and gets registered.
>>> Again, using handlers is just one way of doing it.
>>> -jeff
>>>
>>>
>>> -----Original Message-----
>>> From: Elmouj [mailto:[EMAIL PROTECTED]
>>> Sent: Wednesday, September 05, 2007 11:20 AM
>>> To: [email protected]
>>> Subject: RE: Axis2 events handling
>>>
>>>
>>> Hi jeff,
>>>
>>> thanks for your concern. Can you please be clear on "using
> response
>>> handler" because I don't know if this is an interface that we need to
>>> implement or ... for me the last thing I do in the server side is a
>>> simple
>>> return of an OMElement.
>>> here is the signature of my methof if it could help:
>>>
> ************************************************************************
>>> *******
>>> OMElement encryptFile(String attchmentID, String keyID,String
>>> applicationID,
>>> String applicationPassword)
>>>
> ************************************************************************
>>> *******
>>>
>>> thanks again,
>>>
>>> Elmouj,
>>>
>>>
>>> dreamryder wrote:
>>>>
>>>> You could do it another way.
>>>> If you don't trust the client to return an ack, then the last piece
> of
>>>> code on the serverside that can get called is a response handler. In
>>> the
>>>> response handler, you get access to the entire soap message. The
>>>> response handler will not get the response soap message until the
>>>> implementation has completed its processing (hence the streaming of
>>> the
>>>> output file must have completed too). Therefore, you could do the
> file
>>>> deletion, or the triggering at least, in the response handler.
>>> (Response
>>>> handlers are meant for post-processing work, such as cleanup).
>>>> -jeff
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Andrew Martin [mailto:[EMAIL PROTECTED]
>>>> Sent: Wednesday, September 05, 2007 10:05 AM
>>>> To: [email protected]
>>>> Subject: Re: Axis2 events handling
>>>>
>>>> How are you passing the file to Axis2? If you're just passing an
>>>> InputStream, you could write your own wrapper FilterInputStream that
>>>> erases the file in its close method or in its read methods whenever
> -1
>>>> is returned.
>>>>
>>>> Andrew
>>>>
>>>> Elmouj wrote:
>>>>> Hello Upul,
>>>>>
>>>>> Thanks for your reply. Actually this will work and I have
>>>> already
>>>>> thought about it; the problem I found with this solution is that
> the
>>>>> deletion of the file (in the server side) is after an
> acknowledgment
>>>> FROM
>>>>> the client. this ACK could be easily bypassed: I mean, no one is
>>>> obliging
>>>>> people using my service to develop a client that acknowledges
> receipt
>>>> of the
>>>>> file !!! hence making it possible for the file to reside on the
>>>> server. For
>>>>> your concern about if the file is lost, this is not a problem
> because
>>>> the
>>>>> file the server sends to a client is an encryption of a file sent
>>> from
>>>>> Client to Server, hence if there is any problem (which is very very
>>>> very
>>>>> rare since Axis2 over TCP is almost error free I guess), the client
>>>> will
>>>>> just re-request the encryption of his file. So, I am really looking
>>>> for a
>>>>> thing that tells me that the last byte has been sent to the client.
>>>>>
>>>>> Thanks again,
>>>>>
>>>>> Elmouj,
>>>>>
>>>>>
>>>>> Upul Godage wrote:
>>>>>> Hi,
>>>>>>
>>>>>> If you mean you are having a web service which provides files on
>>>> request,
>>>>>> let's say, requested by reference number, best thing to do is to
>>> have
>>>>>> another operation in the web service. So that after client gets
> the
>>>>>> payload
>>>>>> and, let's say client has processed or saved it successfully, it
>>> will
>>>> call
>>>>>> that operation, saying 'got the payload okay for this reference
>>>> number.'
>>>>>> Otherwise even though the file is transferred successfully, there
>>>> could be
>>>>>> an exception on the client side and the file is lost from both
>>> sides.
>>>>>>
>>>>>> Upul
>>>>>>
>>>>>>
>>>>>> On 9/5/07, Elmouj <[EMAIL PROTECTED]> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I have been using Axis2 for a month now and it's really powerful
>>> and
>>>> easy
>>>>>>> to
>>>>>>> use. However, the last two days I got stuck looking for a way to
>>>> access
>>>>>>> an
>>>>>>> event triggered when the last byte of the server response is sent
>>> to
>>>> the
>>>>>>> client; so I decided to post on this forum hoping to get a clue
> to
>>>> this
>>>>>>> issue :( . In other words, I want a way by which I could be
>>> informed
>>>> when
>>>>>>> the last byte of the server's response is sent because I need to
>>>> execute
>>>>>>> some tasks after this event has been triggered (I need to delete
> a
>>>> file
>>>>>>> after the client downloads it).
>>>>>>>
>>>>>>> Thanks in advance,
>>>>>>>
>>>>>>> Elmouj
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>>
>>> http://www.nabble.com/Axis2-events-handling-tf4383721.html#a12496874
>>>>>>> Sent from the Axis - User mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>
> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>> --
>>>> Andrew Martin
>>>> Computer Programmer
>>>> Regenstrief Institute, Inc.
>>>> 410 West 10th Street, Suite 2000
>>>> Indianapolis, IN 46202-3012
>>>> Phone: (317) 423-5542
>>>> Fax: (317) 423-5695
>>>> [EMAIL PROTECTED]
>>>>
>>>>
>>>> Confidentiality Notice: The contents of this message and any files
>>>> transmitted with it may contain confidential and/or privileged
>>>> information and are intended solely for the use of the named
>>>> addressee(s). Additionally, the information contained herein may
> have
>>>> been disclosed to you from medical records with confidentiality
>>>> protected by federal and state laws. Federal regulations and State
>>> laws
>>>> prohibit you from making further disclosure of such information
>>> without
>>>> the specific written consent of the person to whom the information
>>>> pertains or as otherwise permitted by such regulations. A general
>>>> authorization for the release of medical or other information is not
>>>> sufficient for this purpose.
>>>>
>>>> If you have received this message in error, please notify the sender
>>> by
>>>> return e-mail and delete the original message. Any retention,
>>>> disclosure, copying, distribution or use of this information by
> anyone
>>>> other than the intended recipient is strictly prohibited.
>>>>
>>>>
> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>>
>>>>
> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Axis2-events-handling-tf4383721.html#a12499992
>>> Sent from the Axis - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Axis2-events-handling-tf4383721.html#a12583700
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Axis2-events-handling-tf4383721.html#a12594377
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]