Thx, I find the page and used it.

I have some problem with AxisFault, because instead client get fault response 
it get Tomcat HTTP Status 500 response(client expect XML)

My POJO service:

public boolean start() {
        MessageContext messageContext = 
MessageContext.getCurrentMessageContext();
        ServiceContext sc = messageContext.getServiceContext();
        if((Double) sc.getProperty("sessionID_same") == null){
                double sessionID = Math.random();
                sc.setProperty("sessionID_same", sessionID);
                System.out.print("\n start:: NEW sessionID="+sessionID);
                return true;                                            
        }
        else{
                double sessionID = (Double) sc.getProperty("sessionID_same");
                System.out.print("\n start:: The same sessionID="+sessionID);
                return false;                   
        }                       
}


public boolean commit() throws AxisFault {
        MessageContext messageContext = 
MessageContext.getCurrentMessageContext();
        ServiceContext sc = messageContext.getServiceContext();
        if((Double) sc.getProperty("sessionID_same") != null){                  
                double sessionID = (Double) sc.getProperty("sessionID_same");
                System.out.print("\n commit:: OK old sessionID="+sessionID);
                return true;                                            
        }
        else{
                System.out.print("\n commit:: error new sessionID");
                throw new AxisFault("You can call commit only in the same 
session");                                            
        }                       
}

What I'm trying to do:
Client can call 'commit' only in same session, if not in same session commit 
throw AxisFault so that client know what is wrong.

I have this problem whit AxisFault because Tomcat response is HTML internal 
error.

Have I need to configure Tomcat or axis2??

Regards, Tomaz




charitha kankanamge wrote:
> Hi Tomaz,
> Please have a look at [1].
> 
> [1]http://wso2.org/library/3264
> 
> Regards
> Charitha
> 
> http://charithaka.blogspot.com
> 
> TomazM wrote:
> 
>> Is there any example how the service control that the same (cookie)
>> session client invoke this service.
>>
>> Regards, Tomaz
>>  
>>
> 

begin:vcard
fn:Tomaz Majerhold
n:Majerhold;Tomaz
org:ARNES, Slovenian NREN;Development team
adr:;;Jamova 39;Ljubljana;Ljubljana;1000;Slovenia
email;internet:[email protected]
title:Developer
tel;work:+386 14798930
tel;fax:+386 1 479 88 99
tel;home:+386 1425 38 01
tel;cell:+386 40757229
url:http://www.arnes.si/
version:2.1
end:vcard

Reply via email to