You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Paul Tamas <pa...@hotmail.com> on 2001/06/29 21:00:10 UTC

SOAP & EJB

Hi all,

I am using JBoss-2.2.2_Tomcat-3.2.2, Apache-Soap 2.2, Apache-Xerces 1.4.0 on 
Win.2K.
I deployed my bean, I deployed a soap service for this bean, but when I run 
the soap client I get the following error:

Ouch, the call failed:
Fault Code   = SOAP-ENV:Server
Fault String = Error in connecting to EJB

And in the jBoss console:

[EmbeddedTomcatSX] =============================================
[EmbeddedTomcatSX] In TemplateProvider.locate()
[EmbeddedTomcatSX] URI: urn:servicetest
[EmbeddedTomcatSX] DD.ServiceClass: 
org.apache.soap.providers.StatelessEJBProvider
[EmbeddedTomcatSX] DD.ProviderClass: okiok.fp.ejb.AllTables
[EmbeddedTomcatSX] Call.MethodName: getApplicationsOfUser
[EmbeddedTomcatSX] Exception caught: javax.naming.CommunicationException 
[Root exception is java.lang.ClassNotFoundException: 
okiok.fp.ejb.AllTablesHome]


I have the following directory structure :

C:\test_ejb
	META-INF
		ejb-jar.xml
		DeploymentDescriptor.xml

	okiok
		fp
			ejb
				{java source & class files here}


C:\test_client_soap
	{java source & class file for client}


Here is my ejb-jar.xml:

<?xml version="1.0" encoding="Cp1252"?>
<ejb-jar>
   <description>Application EJB</description>
   <display-name>EJB's</display-name>
   <enterprise-beans>
      <session>
         <ejb-name>AllTablesEJB</ejb-name>
         <home>okiok.fp.ejb.AllTablesHome</home>
	 <remote>okiok.fp.ejb.AllTables</remote>
	 <ejb-class>okiok.fp.ejb.AllTablesBean</ejb-class>
	 <session-type>Stateless</session-type>
	 <transaction-type>Container</transaction-type>
      </session>
   </enterprise-beans>
</ejb-jar>


and my DeploymentDescriptor.xml:

<?xml version="1.0" encoding="Cp1252"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
                   id="urn:servicetest">
   <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
                 scope="Application"
                 methods="create">
      <isd:java class="okiok.fp.ejb.AllTables"/>
      <isd:option key="JNDIName" value="AllTablesEJB"/>
      <isd:option key="FullHomeInterfaceName" 
value="okiok.fp.ejb.AllTablesHome" />
      <isd:option key="ContextProviderURL" value="localhost:1099" />
      <isd:option key="FullContextFactoryName" 
value="org.jnp.interfaces.NamingContextFactory" />
   </isd:provider>
      
<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>



Please, can somebody help me.
Thanks in advance,
Paul

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Re: SOAP & EJB

Posted by Max Bocchini <Ma...@valtech.co.uk>.
Javier,
in particular in order for Tomcat - soap to be able to call
an ejb sitting on an app server of your choice,
you should have in tomcat classpath:
1. Home & Remote interface of your EJB
2. the jndi lookup factory classes of your app server.
Regards,
Max
----- Original Message -----
From: "Javier A. Soltero" <ja...@covalent.net>
To: <so...@xml.apache.org>
Sent: Saturday, June 30, 2001 4:23 AM
Subject: Re: SOAP & EJB


> Are the classes for your ejb's in the system classpath? I've found that
Tomcat
> can not load a class through soap unless that class (or jar which contains
it) is
> in the classpath it starts with. I asked about this and it seems like it
is the
> expected behavior.
>
> hope that helps.
>
> -javier
>
> Paul Tamas wrote:
>
> > Hi all,
> >
> > I am using JBoss-2.2.2_Tomcat-3.2.2, Apache-Soap 2.2, Apache-Xerces
1.4.0 on
> > Win.2K.
> > I deployed my bean, I deployed a soap service for this bean, but when I
run
> > the soap client I get the following error:
> >
> > Ouch, the call failed:
> > Fault Code   = SOAP-ENV:Server
> > Fault String = Error in connecting to EJB
> >
> > And in the jBoss console:
> >
> > [EmbeddedTomcatSX] =============================================
> > [EmbeddedTomcatSX] In TemplateProvider.locate()
> > [EmbeddedTomcatSX] URI: urn:servicetest
> > [EmbeddedTomcatSX] DD.ServiceClass:
> > org.apache.soap.providers.StatelessEJBProvider
> > [EmbeddedTomcatSX] DD.ProviderClass: okiok.fp.ejb.AllTables
> > [EmbeddedTomcatSX] Call.MethodName: getApplicationsOfUser
> > [EmbeddedTomcatSX] Exception caught: javax.naming.CommunicationException
> > [Root exception is java.lang.ClassNotFoundException:
> > okiok.fp.ejb.AllTablesHome]
> >
> > I have the following directory structure :
> >
> > C:\test_ejb
> >         META-INF
> >                 ejb-jar.xml
> >                 DeploymentDescriptor.xml
> >
> >         okiok
> >                 fp
> >                         ejb
> >                                 {java source & class files here}
> >
> > C:\test_client_soap
> >         {java source & class file for client}
> >
> > Here is my ejb-jar.xml:
> >
> > <?xml version="1.0" encoding="Cp1252"?>
> > <ejb-jar>
> >    <description>Application EJB</description>
> >    <display-name>EJB's</display-name>
> >    <enterprise-beans>
> >       <session>
> >          <ejb-name>AllTablesEJB</ejb-name>
> >          <home>okiok.fp.ejb.AllTablesHome</home>
> >          <remote>okiok.fp.ejb.AllTables</remote>
> >          <ejb-class>okiok.fp.ejb.AllTablesBean</ejb-class>
> >          <session-type>Stateless</session-type>
> >          <transaction-type>Container</transaction-type>
> >       </session>
> >    </enterprise-beans>
> > </ejb-jar>
> >
> > and my DeploymentDescriptor.xml:
> >
> > <?xml version="1.0" encoding="Cp1252"?>
> > <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> >                    id="urn:servicetest">
> >    <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> >                  scope="Application"
> >                  methods="create">
> >       <isd:java class="okiok.fp.ejb.AllTables"/>
> >       <isd:option key="JNDIName" value="AllTablesEJB"/>
> >       <isd:option key="FullHomeInterfaceName"
> > value="okiok.fp.ejb.AllTablesHome" />
> >       <isd:option key="ContextProviderURL" value="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>
> >
> > Please, can somebody help me.
> > Thanks in advance,
> > Paul
> >
> >
_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.


Re: SOAP & EJB

Posted by Max Bocchini <Ma...@valtech.co.uk>.
Javier,
in particular in order for Tomcat - soap to be able to call
an ejb sitting on an app server of your choice,
you should have in tomcat classpath:
1. Home & Remote interface of your EJB
2. the jndi lookup factory classes of your app server.
Regards,
Max
----- Original Message -----
From: "Javier A. Soltero" <ja...@covalent.net>
To: <so...@xml.apache.org>
Sent: Saturday, June 30, 2001 4:23 AM
Subject: Re: SOAP & EJB


> Are the classes for your ejb's in the system classpath? I've found that
Tomcat
> can not load a class through soap unless that class (or jar which contains
it) is
> in the classpath it starts with. I asked about this and it seems like it
is the
> expected behavior.
>
> hope that helps.
>
> -javier
>
> Paul Tamas wrote:
>
> > Hi all,
> >
> > I am using JBoss-2.2.2_Tomcat-3.2.2, Apache-Soap 2.2, Apache-Xerces
1.4.0 on
> > Win.2K.
> > I deployed my bean, I deployed a soap service for this bean, but when I
run
> > the soap client I get the following error:
> >
> > Ouch, the call failed:
> > Fault Code   = SOAP-ENV:Server
> > Fault String = Error in connecting to EJB
> >
> > And in the jBoss console:
> >
> > [EmbeddedTomcatSX] =============================================
> > [EmbeddedTomcatSX] In TemplateProvider.locate()
> > [EmbeddedTomcatSX] URI: urn:servicetest
> > [EmbeddedTomcatSX] DD.ServiceClass:
> > org.apache.soap.providers.StatelessEJBProvider
> > [EmbeddedTomcatSX] DD.ProviderClass: okiok.fp.ejb.AllTables
> > [EmbeddedTomcatSX] Call.MethodName: getApplicationsOfUser
> > [EmbeddedTomcatSX] Exception caught: javax.naming.CommunicationException
> > [Root exception is java.lang.ClassNotFoundException:
> > okiok.fp.ejb.AllTablesHome]
> >
> > I have the following directory structure :
> >
> > C:\test_ejb
> >         META-INF
> >                 ejb-jar.xml
> >                 DeploymentDescriptor.xml
> >
> >         okiok
> >                 fp
> >                         ejb
> >                                 {java source & class files here}
> >
> > C:\test_client_soap
> >         {java source & class file for client}
> >
> > Here is my ejb-jar.xml:
> >
> > <?xml version="1.0" encoding="Cp1252"?>
> > <ejb-jar>
> >    <description>Application EJB</description>
> >    <display-name>EJB's</display-name>
> >    <enterprise-beans>
> >       <session>
> >          <ejb-name>AllTablesEJB</ejb-name>
> >          <home>okiok.fp.ejb.AllTablesHome</home>
> >          <remote>okiok.fp.ejb.AllTables</remote>
> >          <ejb-class>okiok.fp.ejb.AllTablesBean</ejb-class>
> >          <session-type>Stateless</session-type>
> >          <transaction-type>Container</transaction-type>
> >       </session>
> >    </enterprise-beans>
> > </ejb-jar>
> >
> > and my DeploymentDescriptor.xml:
> >
> > <?xml version="1.0" encoding="Cp1252"?>
> > <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> >                    id="urn:servicetest">
> >    <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
> >                  scope="Application"
> >                  methods="create">
> >       <isd:java class="okiok.fp.ejb.AllTables"/>
> >       <isd:option key="JNDIName" value="AllTablesEJB"/>
> >       <isd:option key="FullHomeInterfaceName"
> > value="okiok.fp.ejb.AllTablesHome" />
> >       <isd:option key="ContextProviderURL" value="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>
> >
> > Please, can somebody help me.
> > Thanks in advance,
> > Paul
> >
> >
_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.


Re: SOAP & EJB

Posted by "Javier A. Soltero" <ja...@covalent.net>.
Are the classes for your ejb's in the system classpath? I've found that Tomcat
can not load a class through soap unless that class (or jar which contains it) is
in the classpath it starts with. I asked about this and it seems like it is the
expected behavior.

hope that helps.

-javier

Paul Tamas wrote:

> Hi all,
>
> I am using JBoss-2.2.2_Tomcat-3.2.2, Apache-Soap 2.2, Apache-Xerces 1.4.0 on
> Win.2K.
> I deployed my bean, I deployed a soap service for this bean, but when I run
> the soap client I get the following error:
>
> Ouch, the call failed:
> Fault Code   = SOAP-ENV:Server
> Fault String = Error in connecting to EJB
>
> And in the jBoss console:
>
> [EmbeddedTomcatSX] =============================================
> [EmbeddedTomcatSX] In TemplateProvider.locate()
> [EmbeddedTomcatSX] URI: urn:servicetest
> [EmbeddedTomcatSX] DD.ServiceClass:
> org.apache.soap.providers.StatelessEJBProvider
> [EmbeddedTomcatSX] DD.ProviderClass: okiok.fp.ejb.AllTables
> [EmbeddedTomcatSX] Call.MethodName: getApplicationsOfUser
> [EmbeddedTomcatSX] Exception caught: javax.naming.CommunicationException
> [Root exception is java.lang.ClassNotFoundException:
> okiok.fp.ejb.AllTablesHome]
>
> I have the following directory structure :
>
> C:\test_ejb
>         META-INF
>                 ejb-jar.xml
>                 DeploymentDescriptor.xml
>
>         okiok
>                 fp
>                         ejb
>                                 {java source & class files here}
>
> C:\test_client_soap
>         {java source & class file for client}
>
> Here is my ejb-jar.xml:
>
> <?xml version="1.0" encoding="Cp1252"?>
> <ejb-jar>
>    <description>Application EJB</description>
>    <display-name>EJB's</display-name>
>    <enterprise-beans>
>       <session>
>          <ejb-name>AllTablesEJB</ejb-name>
>          <home>okiok.fp.ejb.AllTablesHome</home>
>          <remote>okiok.fp.ejb.AllTables</remote>
>          <ejb-class>okiok.fp.ejb.AllTablesBean</ejb-class>
>          <session-type>Stateless</session-type>
>          <transaction-type>Container</transaction-type>
>       </session>
>    </enterprise-beans>
> </ejb-jar>
>
> and my DeploymentDescriptor.xml:
>
> <?xml version="1.0" encoding="Cp1252"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
>                    id="urn:servicetest">
>    <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
>                  scope="Application"
>                  methods="create">
>       <isd:java class="okiok.fp.ejb.AllTables"/>
>       <isd:option key="JNDIName" value="AllTablesEJB"/>
>       <isd:option key="FullHomeInterfaceName"
> value="okiok.fp.ejb.AllTablesHome" />
>       <isd:option key="ContextProviderURL" value="localhost:1099" />
>       <isd:option key="FullContextFactoryName"
> value="org.jnp.interfaces.NamingContextFactory" />
>    </isd:provider>
>
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
> </isd:service>
>
> Please, can somebody help me.
> Thanks in advance,
> Paul
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Re: SOAP & EJB

Posted by Max Bocchini <Ma...@valtech.co.uk>.
Paul,
I believe the StatelessEJBProvider (like the stateful one)
uses the name in the class attribute of the Java element as your JNDI name
and NOT what you specify as JNDIName.
I have not used it with Jboss, but with Weblogic6 I built a client to a
statefulEJb and the
JNDI name was  the value of the class attribute ....

DeploymentDescriptor.xml (WL6)

<?xml version="1.0"?>

<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:ejbhello">

<isd:provider type="org.apache.soap.providers.StatefulEJBProvider"
scope="Application" methods="create">

<isd:java class="soap.HelloService"/>

<isd:option key="FullHomeInterfaceName" value="soapejb.HelloServiceHome"/>

<isd:option key="ContextProviderURL" value="t3://localhost:7001"/>

<isd:option key="FullContextFactoryName"
value="weblogic.jndi.WLInitialContextFactory"/>

</isd:provider>

<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListene
r>

</isd:service>

with ejb-jar.xml
<?xml version="1.0"?>

<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>

<ejb-jar>

<enterprise-beans>

<session>

<ejb-name>helloServiceSession</ejb-name>

<home>soapejb.HelloServiceHome</home>

<remote>soapejb.HelloService</remote>

<ejb-class>soapejb.HelloServiceBean</ejb-class>

<session-type>Stateful</session-type>

<transaction-type>Container</transaction-type>

</session>

</enterprise-beans>

</ejb-jar>

and weblogic-ejb-jar.xml

<?xml version="1.0"?>

<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0
EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>

<weblogic-ejb-jar>

<weblogic-enterprise-bean>

<ejb-name>helloServiceSession</ejb-name>

<caching-descriptor>

<max-beans-in-free-pool>100</max-beans-in-free-pool>

</caching-descriptor>

<jndi-name>soap.HelloService</jndi-name>
<++++++++++++++++++++++++++++++++++this is the JNDI Name in the class
attribute of the Java element in the SOAP Deployment
decriptor++++++++++++++++++++++++++++++++++++++++++

</weblogic-enterprise-bean>

</weblogic-ejb-jar>

Regards,
Max
----- Original Message -----
From: "Paul Tamas" <pa...@hotmail.com>
To: <so...@xml.apache.org>
Sent: Friday, June 29, 2001 8:00 PM
Subject: SOAP & EJB


> Hi all,
>
> I am using JBoss-2.2.2_Tomcat-3.2.2, Apache-Soap 2.2, Apache-Xerces 1.4.0
on
> Win.2K.
> I deployed my bean, I deployed a soap service for this bean, but when I
run
> the soap client I get the following error:
>
> Ouch, the call failed:
> Fault Code   = SOAP-ENV:Server
> Fault String = Error in connecting to EJB
>
> And in the jBoss console:
>
> [EmbeddedTomcatSX] =============================================
> [EmbeddedTomcatSX] In TemplateProvider.locate()
> [EmbeddedTomcatSX] URI: urn:servicetest
> [EmbeddedTomcatSX] DD.ServiceClass:
> org.apache.soap.providers.StatelessEJBProvider
> [EmbeddedTomcatSX] DD.ProviderClass: okiok.fp.ejb.AllTables
> [EmbeddedTomcatSX] Call.MethodName: getApplicationsOfUser
> [EmbeddedTomcatSX] Exception caught: javax.naming.CommunicationException
> [Root exception is java.lang.ClassNotFoundException:
> okiok.fp.ejb.AllTablesHome]
>
>
> I have the following directory structure :
>
> C:\test_ejb
> META-INF
> ejb-jar.xml
> DeploymentDescriptor.xml
>
> okiok
> fp
> ejb
> {java source & class files here}
>
>
> C:\test_client_soap
> {java source & class file for client}
>
>
> Here is my ejb-jar.xml:
>
> <?xml version="1.0" encoding="Cp1252"?>
> <ejb-jar>
>    <description>Application EJB</description>
>    <display-name>EJB's</display-name>
>    <enterprise-beans>
>       <session>
>          <ejb-name>AllTablesEJB</ejb-name>
>          <home>okiok.fp.ejb.AllTablesHome</home>
> <remote>okiok.fp.ejb.AllTables</remote>
> <ejb-class>okiok.fp.ejb.AllTablesBean</ejb-class>
> <session-type>Stateless</session-type>
> <transaction-type>Container</transaction-type>
>       </session>
>    </enterprise-beans>
> </ejb-jar>
>
>
> and my DeploymentDescriptor.xml:
>
> <?xml version="1.0" encoding="Cp1252"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
>                    id="urn:servicetest">
>    <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
>                  scope="Application"
>                  methods="create">
>       <isd:java class="okiok.fp.ejb.AllTables"/>
>       <isd:option key="JNDIName" value="AllTablesEJB"/>
>       <isd:option key="FullHomeInterfaceName"
> value="okiok.fp.ejb.AllTablesHome" />
>       <isd:option key="ContextProviderURL" value="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>
>
>
>
> Please, can somebody help me.
> Thanks in advance,
> Paul
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Re: SOAP & EJB

Posted by Max Bocchini <Ma...@valtech.co.uk>.
Paul,
I believe the StatelessEJBProvider (like the stateful one)
uses the name in the class attribute of the Java element as your JNDI name
and NOT what you specify as JNDIName.
I have not used it with Jboss, but with Weblogic6 I built a client to a
statefulEJb and the
JNDI name was  the value of the class attribute ....

DeploymentDescriptor.xml (WL6)

<?xml version="1.0"?>

<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:ejbhello">

<isd:provider type="org.apache.soap.providers.StatefulEJBProvider"
scope="Application" methods="create">

<isd:java class="soap.HelloService"/>

<isd:option key="FullHomeInterfaceName" value="soapejb.HelloServiceHome"/>

<isd:option key="ContextProviderURL" value="t3://localhost:7001"/>

<isd:option key="FullContextFactoryName"
value="weblogic.jndi.WLInitialContextFactory"/>

</isd:provider>

<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListene
r>

</isd:service>

with ejb-jar.xml
<?xml version="1.0"?>

<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>

<ejb-jar>

<enterprise-beans>

<session>

<ejb-name>helloServiceSession</ejb-name>

<home>soapejb.HelloServiceHome</home>

<remote>soapejb.HelloService</remote>

<ejb-class>soapejb.HelloServiceBean</ejb-class>

<session-type>Stateful</session-type>

<transaction-type>Container</transaction-type>

</session>

</enterprise-beans>

</ejb-jar>

and weblogic-ejb-jar.xml

<?xml version="1.0"?>

<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0
EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>

<weblogic-ejb-jar>

<weblogic-enterprise-bean>

<ejb-name>helloServiceSession</ejb-name>

<caching-descriptor>

<max-beans-in-free-pool>100</max-beans-in-free-pool>

</caching-descriptor>

<jndi-name>soap.HelloService</jndi-name>
<++++++++++++++++++++++++++++++++++this is the JNDI Name in the class
attribute of the Java element in the SOAP Deployment
decriptor++++++++++++++++++++++++++++++++++++++++++

</weblogic-enterprise-bean>

</weblogic-ejb-jar>

Regards,
Max
----- Original Message -----
From: "Paul Tamas" <pa...@hotmail.com>
To: <so...@xml.apache.org>
Sent: Friday, June 29, 2001 8:00 PM
Subject: SOAP & EJB


> Hi all,
>
> I am using JBoss-2.2.2_Tomcat-3.2.2, Apache-Soap 2.2, Apache-Xerces 1.4.0
on
> Win.2K.
> I deployed my bean, I deployed a soap service for this bean, but when I
run
> the soap client I get the following error:
>
> Ouch, the call failed:
> Fault Code   = SOAP-ENV:Server
> Fault String = Error in connecting to EJB
>
> And in the jBoss console:
>
> [EmbeddedTomcatSX] =============================================
> [EmbeddedTomcatSX] In TemplateProvider.locate()
> [EmbeddedTomcatSX] URI: urn:servicetest
> [EmbeddedTomcatSX] DD.ServiceClass:
> org.apache.soap.providers.StatelessEJBProvider
> [EmbeddedTomcatSX] DD.ProviderClass: okiok.fp.ejb.AllTables
> [EmbeddedTomcatSX] Call.MethodName: getApplicationsOfUser
> [EmbeddedTomcatSX] Exception caught: javax.naming.CommunicationException
> [Root exception is java.lang.ClassNotFoundException:
> okiok.fp.ejb.AllTablesHome]
>
>
> I have the following directory structure :
>
> C:\test_ejb
> META-INF
> ejb-jar.xml
> DeploymentDescriptor.xml
>
> okiok
> fp
> ejb
> {java source & class files here}
>
>
> C:\test_client_soap
> {java source & class file for client}
>
>
> Here is my ejb-jar.xml:
>
> <?xml version="1.0" encoding="Cp1252"?>
> <ejb-jar>
>    <description>Application EJB</description>
>    <display-name>EJB's</display-name>
>    <enterprise-beans>
>       <session>
>          <ejb-name>AllTablesEJB</ejb-name>
>          <home>okiok.fp.ejb.AllTablesHome</home>
> <remote>okiok.fp.ejb.AllTables</remote>
> <ejb-class>okiok.fp.ejb.AllTablesBean</ejb-class>
> <session-type>Stateless</session-type>
> <transaction-type>Container</transaction-type>
>       </session>
>    </enterprise-beans>
> </ejb-jar>
>
>
> and my DeploymentDescriptor.xml:
>
> <?xml version="1.0" encoding="Cp1252"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
>                    id="urn:servicetest">
>    <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
>                  scope="Application"
>                  methods="create">
>       <isd:java class="okiok.fp.ejb.AllTables"/>
>       <isd:option key="JNDIName" value="AllTablesEJB"/>
>       <isd:option key="FullHomeInterfaceName"
> value="okiok.fp.ejb.AllTablesHome" />
>       <isd:option key="ContextProviderURL" value="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>
>
>
>
> Please, can somebody help me.
> Thanks in advance,
> Paul
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Re: SOAP & EJB

Posted by "Javier A. Soltero" <ja...@covalent.net>.
Are the classes for your ejb's in the system classpath? I've found that Tomcat
can not load a class through soap unless that class (or jar which contains it) is
in the classpath it starts with. I asked about this and it seems like it is the
expected behavior.

hope that helps.

-javier

Paul Tamas wrote:

> Hi all,
>
> I am using JBoss-2.2.2_Tomcat-3.2.2, Apache-Soap 2.2, Apache-Xerces 1.4.0 on
> Win.2K.
> I deployed my bean, I deployed a soap service for this bean, but when I run
> the soap client I get the following error:
>
> Ouch, the call failed:
> Fault Code   = SOAP-ENV:Server
> Fault String = Error in connecting to EJB
>
> And in the jBoss console:
>
> [EmbeddedTomcatSX] =============================================
> [EmbeddedTomcatSX] In TemplateProvider.locate()
> [EmbeddedTomcatSX] URI: urn:servicetest
> [EmbeddedTomcatSX] DD.ServiceClass:
> org.apache.soap.providers.StatelessEJBProvider
> [EmbeddedTomcatSX] DD.ProviderClass: okiok.fp.ejb.AllTables
> [EmbeddedTomcatSX] Call.MethodName: getApplicationsOfUser
> [EmbeddedTomcatSX] Exception caught: javax.naming.CommunicationException
> [Root exception is java.lang.ClassNotFoundException:
> okiok.fp.ejb.AllTablesHome]
>
> I have the following directory structure :
>
> C:\test_ejb
>         META-INF
>                 ejb-jar.xml
>                 DeploymentDescriptor.xml
>
>         okiok
>                 fp
>                         ejb
>                                 {java source & class files here}
>
> C:\test_client_soap
>         {java source & class file for client}
>
> Here is my ejb-jar.xml:
>
> <?xml version="1.0" encoding="Cp1252"?>
> <ejb-jar>
>    <description>Application EJB</description>
>    <display-name>EJB's</display-name>
>    <enterprise-beans>
>       <session>
>          <ejb-name>AllTablesEJB</ejb-name>
>          <home>okiok.fp.ejb.AllTablesHome</home>
>          <remote>okiok.fp.ejb.AllTables</remote>
>          <ejb-class>okiok.fp.ejb.AllTablesBean</ejb-class>
>          <session-type>Stateless</session-type>
>          <transaction-type>Container</transaction-type>
>       </session>
>    </enterprise-beans>
> </ejb-jar>
>
> and my DeploymentDescriptor.xml:
>
> <?xml version="1.0" encoding="Cp1252"?>
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
>                    id="urn:servicetest">
>    <isd:provider type="org.apache.soap.providers.StatelessEJBProvider"
>                  scope="Application"
>                  methods="create">
>       <isd:java class="okiok.fp.ejb.AllTables"/>
>       <isd:option key="JNDIName" value="AllTablesEJB"/>
>       <isd:option key="FullHomeInterfaceName"
> value="okiok.fp.ejb.AllTablesHome" />
>       <isd:option key="ContextProviderURL" value="localhost:1099" />
>       <isd:option key="FullContextFactoryName"
> value="org.jnp.interfaces.NamingContextFactory" />
>    </isd:provider>
>
> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
> </isd:service>
>
> Please, can somebody help me.
> Thanks in advance,
> Paul
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.