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 Steven Zimmer <st...@gmail.com> on 2008/01/30 17:30:56 UTC

Accessing properties in an aar archive.

Hello,

I've find a similar post that suggests:

The correct way is get the ServiceDescription from , MessageContxt and then
you can get the correct classloader for that service (which has all you lib
files) from serviceDescription
ClassLoader cl = sd.getClassLoader();

However, I'm not sure how to even get at the ServiceDescription or
Message Context objects.

For example, how would I get the ServiceDescription object in the
getProvIdentityDD Function:

public class LocationLookupService{
       public OMElement getProvIdentityDD(OMElement objLatLongitude)
       {}
}

the .properties file is in
ca/gc/agr/locationlookup/connection.properties file inside the aar
file.

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


Re: Accessing properties in an aar archive.

Posted by Steven Zimmer <st...@gmail.com>.
Thanks alot!!! Very interesting, I did not know you could store
variables in a local thread. This knowledge may help me in other
area's too, again thanks!

On Jan 31, 2008 10:50 PM, Deepal jayasinghe <de...@gmail.com> wrote:
>
> > Hello,
> >
> > Thanks alot for your help. So MessageContext is a static
> its stored in the ThreadLocal.
> >  object that
> > doesnt need to be initialized,
> It is initialized when Axis2 receive a message.
> >  what would happen if
> > MessageContext.getCurrentMessageContext() was ran by a normal class
> > that wasn't being run by the axis2 server. Also is this anywhere in
> > the documentation on the site.
> No :)
> > As I dont see this as an obivious way
> > to add properties to a web service (which is probably a really common
> > thing).
> >
> please have a look at the following article
> http://www.developer.com/java/web/article.php/3620661
>
> Thanks
> Deepal
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>



-- 
Steve Zimmer
aka steveZ1337
founder of:
www.ninjacomputing.com

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


Re: Accessing properties in an aar archive.

Posted by Deepal jayasinghe <de...@gmail.com>.
> Hello,
>
> Thanks alot for your help. So MessageContext is a static
its stored in the ThreadLocal.
>  object that
> doesnt need to be initialized,
It is initialized when Axis2 receive a message.
>  what would happen if
> MessageContext.getCurrentMessageContext() was ran by a normal class
> that wasn't being run by the axis2 server. Also is this anywhere in
> the documentation on the site. 
No :)
> As I dont see this as an obivious way
> to add properties to a web service (which is probably a really common
> thing).
>   
please have a look at the following article
http://www.developer.com/java/web/article.php/3620661

Thanks
Deepal

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


Re: Accessing properties in an aar archive.

Posted by Steven Zimmer <st...@gmail.com>.
Hello,

Thanks alot for your help. So MessageContext is a static object that
doesnt need to be initialized, what would happen if
MessageContext.getCurrentMessageContext() was ran by a normal class
that wasn't being run by the axis2 server. Also is this anywhere in
the documentation on the site. As I dont see this as an obivious way
to add properties to a web service (which is probably a really common
thing).

On Jan 30, 2008 10:42 PM, Deepal jayasinghe <de...@gmail.com> wrote:
>
> > Hello,
> >
> > I've find a similar post that suggests:
> >
> > The correct way is get the ServiceDescription from , MessageContxt and then
> > you can get the correct classloader for that service (which has all you lib
> > files) from serviceDescription
> > ClassLoader cl = sd.getClassLoader();
> >
> > However, I'm not sure how to even get at the ServiceDescription or
> > Message Context objects.
> >
> MessgeContext.getCurrentMessageContext();
> > For example, how would I get the ServiceDescription object in the
> > getProvIdentityDD Function:
> >
> > public class LocationLookupService{
> >        public OMElement getProvIdentityDD(OMElement objLatLongitude)
> >        {}
> > }
> >
> > the .properties file is in
> > ca/gc/agr/locationlookup/connection.properties file inside the aar
> > file.
> >
> > ---------------------------------------------------------------------
> > 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
>
>



-- 
Steve Zimmer
aka steveZ1337
founder of:
www.ninjacomputing.com

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


Re: Accessing properties in an aar archive.

Posted by Deepal jayasinghe <de...@gmail.com>.
> Hello,
>
> I've find a similar post that suggests:
>
> The correct way is get the ServiceDescription from , MessageContxt and then
> you can get the correct classloader for that service (which has all you lib
> files) from serviceDescription
> ClassLoader cl = sd.getClassLoader();
>
> However, I'm not sure how to even get at the ServiceDescription or
> Message Context objects.
>   
MessgeContext.getCurrentMessageContext();
> For example, how would I get the ServiceDescription object in the
> getProvIdentityDD Function:
>
> public class LocationLookupService{
>        public OMElement getProvIdentityDD(OMElement objLatLongitude)
>        {}
> }
>
> the .properties file is in
> ca/gc/agr/locationlookup/connection.properties file inside the aar
> file.
>
> ---------------------------------------------------------------------
> 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