You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Nirmit Desai <ni...@us.ibm.com> on 2006/12/01 18:55:06 UTC

[Axis2 1.1.1] accessing context within service skeleton

Hi,

I recently switched to the 1.1.1 latest nighty. In my service
implementation, I used to capture the operationContext by implementing the
method:

public void setOperationContext(OperationContext oCtx)
{
}

This was supposedly called before any of the service operation was being
called and it workd fine. However, in the latest nightly this does not
work, this method is not being called.

My purpose is to access a service parameter from my services.xml. Can
anyone tell me how I can do this in the 1.1.1 era?

Thanks,

-Nirmit


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2 1.1] using java2wsdl with interfaces

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Fri, 2006-12-01 at 14:52 -0500, Steve Terrell wrote:
> I have several interface classes I am using to generate my WSDL. The
> element names that come out are meaningless (param0, param1, etc...) I
> expect that from an interface, though. However, is there a way I can
> tell java2wsdl which class to use to derive the 'real' parameter names?
> I believe this was possible in Axis 1.4?

This is a known limitation .. we'd welcome a patch! 

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Director; Open Source Initiative; http://www.opensource.org/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


[Axis2 1.1] using java2wsdl with interfaces

Posted by Steve Terrell <St...@guideworkstv.com>.
I have several interface classes I am using to generate my WSDL. The
element names that come out are meaningless (param0, param1, etc...) I
expect that from an interface, though. However, is there a way I can
tell java2wsdl which class to use to derive the 'real' parameter names?
I believe this was possible in Axis 1.4?

--Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2 1.1.1] accessing context within service skeleton

Posted by David Illsley <da...@gmail.com>.
Hi Nirmit,
There was a threading problem with that model so it was removed and
replaced with access to a ThreadLocal MessageContext from which you
can access the OperationContext.

The code you need is:
org.apache.axis2.context.MessageContext.getCurrentMessageContext().getOperationContext()

David

On 01/12/06, robert lazarski <ro...@gmail.com> wrote:
> If your goal is to get a param from services.xml, at least one way is
> via AxisService. One way these days to get that on startup as you were
> doing before is to implement the ServiceLifeCycle interface. See the
> spring tutorial for an example:
>
> http://ws.apache.org/axis2/1_1/spring.html#261
>
> HTH,
> Robert
>
> On 12/1/06, Nirmit Desai <ni...@us.ibm.com> wrote:
> >
> > Hi,
> >
> > I recently switched to the 1.1.1 latest nighty. In my service
> > implementation, I used to capture the operationContext by implementing the
> > method:
> >
> > public void setOperationContext(OperationContext oCtx)
> > {
> > }
> >
> > This was supposedly called before any of the service operation was being
> > called and it workd fine. However, in the latest nightly this does not
> > work, this method is not being called.
> >
> > My purpose is to access a service parameter from my services.xml. Can
> > anyone tell me how I can do this in the 1.1.1 era?
> >
> > Thanks,
> >
> > -Nirmit
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
David Illsley - IBM Web Services Development

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2 1.1.1] accessing context within service skeleton

Posted by robert lazarski <ro...@gmail.com>.
If your goal is to get a param from services.xml, at least one way is
via AxisService. One way these days to get that on startup as you were
doing before is to implement the ServiceLifeCycle interface. See the
spring tutorial for an example:

http://ws.apache.org/axis2/1_1/spring.html#261

HTH,
Robert

On 12/1/06, Nirmit Desai <ni...@us.ibm.com> wrote:
>
> Hi,
>
> I recently switched to the 1.1.1 latest nighty. In my service
> implementation, I used to capture the operationContext by implementing the
> method:
>
> public void setOperationContext(OperationContext oCtx)
> {
> }
>
> This was supposedly called before any of the service operation was being
> called and it workd fine. However, in the latest nightly this does not
> work, this method is not being called.
>
> My purpose is to access a service parameter from my services.xml. Can
> anyone tell me how I can do this in the 1.1.1 era?
>
> Thanks,
>
> -Nirmit
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org