You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Winkler Lisa-P29719 <Li...@motorola.com> on 2001/11/30 20:38:00 UTC

FW: solved: calling stateless EJB via SOAP

Here is a problem I am discussing on the soap-user list.  I was wondering if the developers have any comments or knowledge as to how one is supposed to tell soap where to find application-specific java classes.  I'm not subscribed to soap-dev so please cc me on replies.

Thanks,
Lisa

-----Original Message-----
From: Winkler Lisa-P29719 
Sent: Thursday, November 29, 2001 9:28 AM
To: 'soap-user@xml.apache.org'
Subject: RE: solved: calling stateless EJB via SOAP


Bernd,

That's a good idea, thanks for the info.

I solved the problem differently - I added my jar to JBOSS_HOME/dist/lib/ext.  But it accomplishes the same thing - it gets the jar into Tomcat's classpath.

So, I am up and running but I don't think either of these solutions is ideal.  I don't like junking up startup scripts or lib/ext with application-specific stuff.  When I deploy a web application, I can add jars to the application's classpath by putting them WEB-INF/lib or adding to the manifest.  Is there no way to do something similar in the soap deployment descriptor when deploying a soap service?  It requires you to specify the name of the java class that implements the service but doesn't seem to provide any way for you to tell it where to find that class.  This sounds like a deficiency to me...

Lisa


-----Original Message-----
From: Bernd Proissl [mailto:lists@proissl.de]
Sent: Thursday, November 29, 2001 7:23 AM
To: soap-user@xml.apache.org
Subject: RE: solved: calling stateless EJB via SOAP



It was at least a classpath problem, i  did the follwing:

- dropped soap.war in in jboss/deploy (thanks to
  http://www.jboss.org/forums/thread.jsp?forum=51&thread=917&hilite=true&q=soap+%22Error+in+connecting+to+EJB%22&start=0)

- checked that JAF, javamail-api and soap.jar where in the classpath on the server
  thanks to http://www.soapuser.com/server3.html

- modified JBOSS_HOME/bin/run.sh to have the classpath contain the jboss/deploy
  directory:
  JBOSS_CLASSPATH=$JBOSS_CLASSPATH:/opt/JBoss-2.4.3_Tomcat-3.2.3/jboss/deploy/helloservice.jar
  I guess this expaned tomcat's classpath the the ejb-jar?

Bernd


> > -----Original Message-----
> > From: Winkler Lisa-P29719 [mailto:Lisa.Winkler@motorola.com]
> > Sent: Wednesday, November 28, 2001 9:45 PM
> > To: 'soap-user@xml.apache.org'
> > Cc: 'mccook@oneok.com'
> > Subject: calling stateless EJB via SOAP
> > 
> > 
> > I found the following post on the archives and was wondering if there was any resolution.  I am having exactly the same 
> > problem.  I'm sure it's a classpath problem but I don't know where I could put my ejb jar to make SOAP happy.  I even 
> > tried stuffing it in the soap.war that is deployed in Tomcat, which I shouldn't have to do but I was getting desperate!  
> > Has anyone solved this problem?
> > 
> > Thanks,
> > Lisa
> > 
> > ---------------------------------
> > List:     soap-user
> > Subject:  calling stateless EJB via SOAP
> > From:     "Cook, Martin" <mc...@Oneok.com>
> > Date:     2001-08-27 16:47:22
> > [Download message RAW]
> > 
> > I am attempting to use Apache ver 2.2 SOAP to call a stateless EJB deployed
> > in JBOSS ver 2.2.2. The error I get back from Apache is:
> > 
> >   Fault Code   = SOAP-ENV:Server
> >   Fault String = Error in connecting to EJB
> > 
> > The JBOSS log shows this:
> > 
> >   [EmbeddedTomcatSX] In TemplateProvider.locate() 
> >   [EmbeddedTomcatSX] URI: urn:getAddressTypes
> >   [EmbeddedTomcatSX] DD.ServiceClass:
> > org.apache.soap.providers.StatelessEJBProvider
> >   [EmbeddedTomcatSX] DD.ProviderClass: null
> >   [EmbeddedTomcatSX] Call.MethodName: getXML
> >   [EmbeddedTomcatSX] Exception caught: javax.naming.CommunicationException
> > [Root exception is java.lang.ClassNot
> >   FoundException: oneok.ocms.bll.getAddressTypesHome]
> > 
> > 
> > My client code is roughly:
> > 
> >   URL urlRouter = new URL ("http://localhost:8080/soap/servlet/rpcrouter");
> > 
> >   Call call = new Call ();
> >   call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> >   call.setTargetObjectURI ("urn:getAddressTypes");
> >   call.setMethodName ("getXML");
> >   Response resp = call.invoke(urlRouter, "");
> > 
> > 
> > My SOAP deployment descriptor is:
> > 
> >   <?xml version="1.0"?>
> >   <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> >              id="urn:getAddressTypes">
> >     <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> >                 scope="Application"
> >                 methods="create">
> >       <isd:option key="JNDIName" value="ejb/bll/getAddressTypes"/>
> >       <isd:option key="FullHomeInterfaceName"
> > value="oneok.ocms.bll.getAddressTypesHome" />
> >       <isd:option key="ContextProviderURL" value="jnp://localhost:1099" />
> >       <isd:option key="FullContextFactoryName"
> > value="org.jnp.interfaces.NamingContextFactory" />
> >     </isd:provider>
> >  
> > <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListene
> > r>
> >   </isd:service>
> > 
> > 
> > My EJB works with "traditional" java clients, just not with the SOAP client.
> > 
> > I haven't noticed any other problems with my Apache or JBOSS installations,
> > and yes, I do have the xerces.jar file listed first in my classpath...
> > 
> > I even tried adding the jar file for my EJB to the classpath, and
> > restarting, but that didn't help either!
> > 
> > Does anyone have any ideas?
> > 
> > 
>