axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyril Furtado <cyr...@skire.com>
Subject RE: MessageContext is null, is something wrong? Still not working! Code given
Date Wed, 05 Aug 2009 02:02:01 GMT
Zip file did not go thru sending the f.aar file in .txt, rename to web_services.aar

From: Cyril Furtado
Sent: Tuesday, August 04, 2009 6:55 PM
To: 'axis-user@ws.apache.org'
Subject: RE: MessageContext is null, is something wrong? Still not working! Code given


Thanks
Deepal,
I am enclosing the java file (DocumentService2.java) & the web_services.aar file , in
fact I just ran the code again to re verify , same result, MessageContext is null.
Thanks
Cyril



Deepal wrote
I am not sure why that does not work for you, if you can send me your
service. I will give it a try.

Thanks,
Deepal



From: Cyril Furtado
Sent: Tuesday, August 04, 2009 3:45 PM
To: 'axis-user@ws.apache.org'
Subject: RE: MessageContext is null, is something wrong? Still not working!

Thank you Deepal
 I changed my implementation class as given from the below articles
& now my class looks like
public classMy service implements Lifecycle {
        public void init(ServiceContext context) throws AxisFault {
               System.out.println("DocumentService2 init context ****"); // no output
               System.out.println("DocumentService2 message checking***");// no output
    }
    public void destroy(ServiceContext context) {
        System.out.println("DocumentService2 destroy context ****"); // no output
    }
        public getRecord(int id){
               System.out.println("create***static ******:"+MessageContext.getCurrentMessageContext());
// output null
               return Record.getId();
        }
}

my service response gets the correct info ( I have no problem here, its only when I want to
check the MessageContext)
but the ONLY sys out is create***static ******:null
other sys outs are not seen init does not show up
Im using axis2-1.4.1
MessageContext still elusive



I am sorry, those methods does not work anymore. Please refer to the
following article.

https://wso2.org/library/articles/axis2-session-management
http://blogs.deepal.org/2009/06/axis2-tutorials-and-articles.html

Thanks,
Deepal



From: Cyril Furtado
Sent: Tuesday, August 04, 2009 1:50 PM
To: 'axis-user@ws.apache.org'
Subject: MessageContext is null, is something wrong?

I have in my implementation class added two methods as given in Axis2 articles
public void init(MessageContext inMessge, MessageContext outMessage) {
                                 // store the message contexts
                                System.out.println("init message called"); // is not seen
in output & inMesssage is null
                                this.inMessge = inMessge;
}

                public void setOperationContext(OperationContext opContext){
                                System.out.println("setOperationContext message called ****");
// not seen in output
}

In my method
String getRecord(int id){

System.out.println("message context ****:"+ MessageContext.getCurrentMessageContext());

}

getRecord when called from webservices
the only sys out I see is  message context ****:null
I do not see any of the other sys outs
Is there any other way to get the messageContext or am I doing something wrong?
Cyril




Mime
View raw message