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 Adrian 'Dagurashibanipal' von Bidder <av...@fortytwo.ch> on 2002/06/05 15:44:19 UTC
embedded webservices
Yo!
Hmmmm. Nobody else seems to be interested in this :-(
Ok, I think I'm on the right track now: I'm registering my own
axis.EngineConfigFactory, and deploy AxisServlet from Jetty.
But I see that it seems to absolutely need an attachment direcory, and
probably a WEB-INF directory. Is there no way to drive axis without any
filesystem access? After all, I'm just trying to handle JAX RPC calls -
needing a filesystem for procedure calls is a bit a joke, I find (quote
from the SOAP spec: '... *lightweight* ...' - I'm sure I read that).
Any hints?
cheers
-- vbi
--
secure email with gpg avbidder@fortytwo.ch: key id 0x92082481
avbidder@acter.ch: key id 0x5E4B731F
Re: embedded webservices
Posted by Steve Loughran <st...@iseran.com>.
>But I see that it seems to absolutely need an attachment direcory, and
>probably a WEB-INF directory. Is there no way to drive axis without any
>filesystem access? After all, I'm just trying to handle JAX RPC calls -
>needing a filesystem for procedure calls is a bit a joke,
Does it have to be a physical file system?
the WEB-INF dir will be to store the server deployment config file; axis
needs some form of persistence there. But I am sure it can/should be
refactored out, so that it could persistent differently (to a DB, to an LDAP
server, etc). Just a little exercise for the dedicated developer.
>I find (quote
>from the SOAP spec: '... *lightweight* ...' - I'm sure I read that).
must have been a typo :) I bet it will be out of the 1.2 spec. Maybe they
will rename the 'S' in SOAP to stand for something other than Simple too?
-Steve
Problem using MessageContext.getCurrentContext() (java.lang.NoClassDefFoundError)
Posted by Abhishek Agrawal <aa...@vt.edu>.
I am trying publish a webservice that can be configured at deploy time. For
this i add the following line to my deploy.wsdd
<parameter name="configFile"
value="/home/aagrawal/pathport/java/tomcat-4.0.3/webapps/axis/query/query/ws/config.properties"
/>
The config.properties file has some information which i try to get in the
constructor of my web service. Here is i uses the following code in the
constructor of the webservice.
MessageContext m = org.apache.axis.MessageContext.getCurrentContext();
SOAPService s = m.getService();
String filename = (String) s.getOption("ConfigFile");
When i run the webservice client i get "Internal server exception"
Looking at the log file is see the following exception on the line of the
constructor.
MessageContext m = org.apache.axis.MessageContext.getCurrentContext();
---- Root Cause -----
java.lang.NoClassDefFoundError
at query.QueryImpl.<init>(QueryImpl.java:36)
at query.ws.QuerySoapBindingImpl.<init>(QuerySoapBindingImpl.java:12)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:296)
at java.lang.Class.newInstance(Class.java:249)
at
org.apache.axis.providers.java.JavaProvider.getNewServiceObject(JavaProvider.java:378)
at
org.apache.axis.providers.java.JavaProvider.getServiceObject(JavaProvider.java:141)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:234)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:154)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:121)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:288)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:576)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
does anyone have any clue about it.
Abhishek
Re: embedded webservices
Posted by Adrian 'Dagurashibanipal' von Bidder <av...@fortytwo.ch>.
On Thu, 2002-06-06 at 11:14, Adrian 'Dagurashibanipal' von Bidder wrote:
> (1) How can I avoid this? I'll try to set a globalOption in my
> EngineConfig object.
which I subclassed from SimpleProvider. Would it make sense to make
globalOptions protected, or to offer a means of setting globalOptions?
cheers
-- vbi
--
secure email with gpg avbidder@fortytwo.ch: key id 0x92082481
avbidder@acter.ch: key id 0x5E4B731F
Re: embedded webservices
Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Adrian 'Dagurashibanipal' von Bidder" <av...@fortytwo.ch>
To: <ax...@xml.apache.org>
Sent: Thursday, June 06, 2002 2:14 AM
Subject: Re: embedded webservices
On Wed, 2002-06-05 at 15:44, Adrian 'Dagurashibanipal' von Bidder wrote:
> Yo!
>
> Hmmmm. Nobody else seems to be interested in this :-(
>
> Ok, I think I'm on the right track now: I'm registering my own
> axis.EngineConfigFactory, and deploy AxisServlet from Jetty.
>
> But I see that it seems to absolutely need an attachment direcory, and
>The exact problem is right now in DefaultAxisServerFactory:112:
>if(ret != null){
> attachmentsdirservlet= (String)
> ret.getOption(AxisEngine.PROP_ATTACHMENT_DIR);
> File attdirFile= new File(attachmentsdirservlet);
>
>where new File() throws a nullptr exception.
>
>(1) How can I avoid this? I'll try to set a globalOption in my
>EngineConfig object.
>(2) shouldn't this be caught, and a better error message be reported?
>NullPointerException is somewhat ugly...
looks like a bug to me. you could file it, though I doubt anyone but you
would rush to fix it.
If you add the handling to not create the attachmentdir File if there is no
attachment, what else breaks?
Re: embedded webservices
Posted by Adrian 'Dagurashibanipal' von Bidder <av...@fortytwo.ch>.
On Wed, 2002-06-05 at 15:44, Adrian 'Dagurashibanipal' von Bidder wrote:
> Yo!
>
> Hmmmm. Nobody else seems to be interested in this :-(
>
> Ok, I think I'm on the right track now: I'm registering my own
> axis.EngineConfigFactory, and deploy AxisServlet from Jetty.
>
> But I see that it seems to absolutely need an attachment direcory, and
The exact problem is right now in DefaultAxisServerFactory:112:
if(ret != null){
attachmentsdirservlet= (String)
ret.getOption(AxisEngine.PROP_ATTACHMENT_DIR);
File attdirFile= new File(attachmentsdirservlet);
where new File() throws a nullptr exception.
(1) How can I avoid this? I'll try to set a globalOption in my
EngineConfig object.
(2) shouldn't this be caught, and a better error message be reported?
NullPointerException is somewhat ugly...
(Yes, I'm still basically trying to get rid of all filesystem
requirements. Do I have to write my own ServerFactory, too?)
cheers
-- vbi
--
secure email with gpg avbidder@fortytwo.ch: key id 0x92082481
avbidder@acter.ch: key id 0x5E4B731F
Re: embedded webservices
Posted by Adrian 'Dagurashibanipal' von Bidder <av...@fortytwo.ch>.
On Wed, 2002-06-05 at 20:07, Steve Loughran wrote:
>
>
> >But I see that it seems to absolutely need an attachment direcory, and
> >probably a WEB-INF directory. Is there no way to drive axis without any
> >filesystem access? After all, I'm just trying to handle JAX RPC calls -
> >needing a filesystem for procedure calls is a bit a joke,
>
> Does it have to be a physical file system?
>
> the WEB-INF dir will be to store the server deployment config file; axis
> needs some form of persistence there. But I am sure it can/should be
> refactored out, so that it could persistent differently (to a DB, to an LDAP
> server, etc). Just a little exercise for the dedicated developer.
My question would then be: why does it need to have the deployment
config file at all? My understanding of the architecture was, that the
?wsdl requests generate a wsdl on the fly from the current
configuration. This configuration would be created on startup by
constructing an appropriate EngineConfig object.
Or do I understand the architecture the wrong way?
cheers
-- vbi
--
secure email with gpg avbidder@fortytwo.ch: key id 0x92082481
avbidder@acter.ch: key id 0x5E4B731F
Re: embedded webservices
Posted by Steve Loughran <st...@iseran.com>.
>But I see that it seems to absolutely need an attachment direcory, and
>probably a WEB-INF directory. Is there no way to drive axis without any
>filesystem access? After all, I'm just trying to handle JAX RPC calls -
>needing a filesystem for procedure calls is a bit a joke,
Does it have to be a physical file system?
the WEB-INF dir will be to store the server deployment config file; axis
needs some form of persistence there. But I am sure it can/should be
refactored out, so that it could persistent differently (to a DB, to an LDAP
server, etc). Just a little exercise for the dedicated developer.
>I find (quote
>from the SOAP spec: '... *lightweight* ...' - I'm sure I read that).
must have been a typo :) I bet it will be out of the 1.2 spec. Maybe they
will rename the 'S' in SOAP to stand for something other than Simple too?
-Steve