Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 21005 invoked from network); 5 Aug 2009 17:31:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Aug 2009 17:31:09 -0000 Received: (qmail 51594 invoked by uid 500); 5 Aug 2009 17:15:05 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 51521 invoked by uid 500); 5 Aug 2009 17:15:05 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 51512 invoked by uid 99); 5 Aug 2009 17:15:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 17:15:05 +0000 X-ASF-Spam-Status: No, hits=3.5 required=10.0 tests=HTML_MESSAGE,PLING_QUERY,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [64.161.222.3] (HELO mack.skire.com) (64.161.222.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 17:14:52 +0000 Received: from mack.skire.com ([12.12.12.12]) by mack.skire.com ([12.12.12.12]) with mapi; Wed, 5 Aug 2009 10:11:50 -0700 From: Cyril Furtado To: "axis-user@ws.apache.org" Date: Wed, 5 Aug 2009 10:11:46 -0700 Subject: RE: MessageContext is null, is something wrong? Still not working! Code given Thread-Topic: MessageContext is null, is something wrong? Still not working! Code given Thread-Index: AcoVRRyW5VMh1AjfRgmVeLwaN48jegADwMhgAAaqz0AAAHHusAAfIlZw Message-ID: <08EE6DAA4E26034FA998942EFC3E25A70142A4890875@mack.skire.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-hashedpuzzle: AGED A0/E BBQ/ DlDI FYg9 FnWQ FpqG GV6y HF/n Het8 HxDJ Inz6 JpfI LKxG Ltp3 MCkY;1;YQB4AGkAcwAtAHUAcwBlAHIAQAB3AHMALgBhAHAAYQBjAGgAZQAuAG8AcgBnAA==;Sosha1_v1;7;{3467D450-D533-42F8-AF68-ECE3999CA1A9};YwB5AHIAaQBsAGYAQABzAGsAaQByAGUALgBjAG8AbQA=;Wed, 05 Aug 2009 17:11:46 GMT;UgBFADoAIABNAGUAcwBzAGEAZwBlAEMAbwBuAHQAZQB4AHQAIABpAHMAIABuAHUAbABsACwAIABpAHMAIABzAG8AbQBlAHQAaABpAG4AZwAgAHcAcgBvAG4AZwA/ACAAUwB0AGkAbABsACAAbgBvAHQAIAB3AG8AcgBrAGkAbgBnACEAIABDAG8AZABlACAAZwBpAHYAZQBuAA== x-cr-puzzleid: {3467D450-D533-42F8-AF68-ECE3999CA1A9} acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_08EE6DAA4E26034FA998942EFC3E25A70142A4890875mackskireco_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_08EE6DAA4E26034FA998942EFC3E25A70142A4890875mackskireco_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable After several failed attempts of putting in the zip :), Java file public class DocumentService2 implements Lifecycle { static com.skire.bluedoor.log.Log logger =3D com.skire.bluedoor.log.LogSource.getInstance(DocumentServic= e2.class); public void init(ServiceContext context) throws AxisFault { logger.debug("DocumentService2 init context= ****"); logger.debug("DocumentService2 message chec= king***"); } public void destroy(ServiceContext context) { logger.debug("DocumentService2 destroy context ****"); } private MessageContext inMessge; public XMLObject getBPRecord ( String a1 , String a2 , String a3 , String a4 , String a5 ) { logger.debug("create*******= **:"+this.inMessge); logger.debug("create***stat= ic ******:"+MessageContext.getCurrentMessageContext()); XMLObject xobj =3D new XMLO= bject(); xobj.setStatusCode(200); xobj.setXmlcontents("just e= cho"); return xobj; } } Services.xml file document literal Service com.skire.webservices.service.general.= DocumentService2 From: Cyril Furtado Sent: Tuesday, August 04, 2009 7:02 PM To: 'axis-user@ws.apache.org' Subject: RE: MessageContext is null, is something wrong? Still not working!= Code given Zip file did not go thru sending the f.aar file in .txt, rename to web_serv= ices.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, Messa= geContext 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 onl= y 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 artic= les 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 =3D inMessge; } public void setOperationContext(OperationContext opContext)= { System.out.println("setOperationContext mes= sage called ****"); // not seen in output } In my method String getRecord(int id){ System.out.println("message context ****:"+ MessageContext.getCurrentMessag= eContext()); } 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 wr= ong? Cyril --_000_08EE6DAA4E26034FA998942EFC3E25A70142A4890875mackskireco_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

After several failed att= empts of putting in the zip J,

Java file

public class DocumentSer= vice2 implements Lifecycle {

    =             static com.skire.bluedoor.log.Log logger =3D

     = ;           com.skire.blu= edoor.log.LogSource.getInstance(DocumentService2.class);   &= nbsp;       

    =            

    =             public void init(ServiceContext context) throws AxisFault {

    =             &nb= sp;            =    logger.debug("DocumentService2 init context ****");

    =             &nb= sp;            =    logger.debug("DocumentService2 message checking***");

    }

 =

    publi= c void destroy(ServiceContext context) {

     = ;           logger.debug(= "DocumentService2 destroy context ****");

    }

    =             private MessageContext inMessge;

    =             public XMLObject getBPRecord (

    =             &nb= sp;            =             &nb= sp;       String a1

    =             &nb= sp;            =             &nb= sp;            =           , String a2

    =             &nb= sp;            =             &nb= sp;            =           , String a3

    =             &nb= sp;            =             &nb= sp;            =           , String a4

    =             &nb= sp;            =             &nb= sp;            =           , String a5

    =             )

    =             {

    =             &nb= sp;            =             &nb= sp;      logger.debug("create*********:"= +this.inMessge);

    =             &nb= sp;            =             &nb= sp;      logger.debug("create***static ******:"+MessageContext.getCurrentMessageContext());=

    =            

    =             &nb= sp;            =             &nb= sp;      XMLObject xobj =3D new XMLObject();

    =             &nb= sp;            =             &nb= sp;      xobj.setStatusCode(200);

    =             &nb= sp;            =             &nb= sp;      xobj.setXmlcontents("just echo");

    =             &nb= sp;            =    return xobj;

    =             }

}

Services.xml file

<service name=3D"UnifierWebServices" scope=3D"Request" >=

    <description>

    =      document literal Service

    </description>

    <messageReceivers>

    =     <messageReceiver mep=3D"http://www.w3.org/2004/08/wsdl/in-only"= ;

    =             &nb= sp;        class=3D"org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"= />

    =     <messageReceiver mep=3D"http://www.w3.org/2004/08/wsdl/in-out"=

    =             &nb= sp;        class=3D"org.apache.axis2.rpc.receivers.RPCMessageReceiver"/><= o:p>

    </messageReceivers>

    <p= arameter name=3D"ServiceClass">com.skire.webservices.service.general.Do= cumentService2</parameter>

    =             <oper= ation name=3D"getBPRecord" mep=3D"http://www.w3.org/2004/08/wsdl/in-out" />

    =

</service>

 =

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

 

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.a= ar 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 sen= d 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 {

           &nbs= p;   System.out.println("DocumentService2 init context ****"); // no output

           &nbs= p;   System.out.println("DocumentService2 message checking***");// no output

    }

    public void destroy(ServiceContext context) {

        System.out.println("DocumentService2 destroy contex= t ****"); // no output

    }

        public getRecord(int id){

           &nbs= p;   System.out.println("create***static ******:"+MessageContext.getCurrentMessageContext()); // output null

           &nbs= p;   return Record.getId();

        }

}

 

my service response gets the correct info ( I have no problem here, its only w= hen 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<= /o:p>

 

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, MessageConte= xt outMessage) {

         =             &nb= sp;           // store the message contexts

         =             &nb= sp;          System.out.println("init message called"); // is not seen in outp= ut & inMesssage is null

         =             &nb= sp;          this.inMessge =3D inMessge;

}

 

         =        public void setOperationContext(OperationContext opContext){

         =             &nb= sp;          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 ****:n= ull

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

 

 

 

--_000_08EE6DAA4E26034FA998942EFC3E25A70142A4890875mackskireco_--