axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hurst, Cyrus" <Cyrus_Hu...@tvratings.com>
Subject RE: Exposing EJBs as web services...
Date Thu, 13 Jun 2002 22:02:45 GMT
Hello,

	To solve the NoClassDefFoundErrors I had to copy the Remote and Home
interfaces for my EJB and any classes that the 		Remote interface has
dependencies on into the axis/WEB-INF/classes/ directory . Once I got thru
that I kept 
      getting unknown operation(on both client and server console)  on the
exposed method of the EJB . So I 
      wrote and deployed  a class
       as a web-service(using provider="java:RPC")  that basically acts as a
delegate to the EJB . I used the 
       same client code to test it and it ran fine . I undeployed that
web-service and re-deployed the other
     web-service using provider ="java:EJB"  and I still get the unkown
operation on the method of the EJB. 
     My deployment descriptors are as follows: 

For RPC -
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
	xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
	xmlns:xsi="http:/www.w3.org/2000/10/XMLSchema-instance">
	<service name="AssociateInfo" provider="java:RPC">
		<parameter name="className" value="TestCprEJBClient" />
		<parameter name="allowedMethods"
value="getAssociateIDFromDMZID" />
	</service>
</deployment>

For EJB - 
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
            xmlns:xsi="http:/www.w3.org/2000/10/XMLSchema-instance">
    <service name="AssociateInfo" provider="java:EJB">
        <parameter name="beanJndiName" value="jndi/ejb/AssociateSessionEJB"
/>
        <parameter name="homeInterfaceName"
value="com.nielsenmedia.lrs.cpr.associate.AssociateSessionHome" />
        <parameter name="allowedMethods" value="getAssociateIDFromDMZID"/>
        <parameter name="jndiURL" value="t3://d2loc:9023" />
        <parameter name="jndiContextClass"
value="weblogic.jndi.WLInitialContextFactory" />
    </service>
</deployment>

As you can see I'm using the same operation name for both styles . In the
delegate class(TestCprEJBClient) I use the same parameters in the EJB wsdd
to do  jndi lookup, create Home interface, etc .... Am I missing something?


Thanks,
-Cyrus    
 



-----Original Message-----
From: thomas.cherel@ascentialsoftware.com
[mailto:thomas.cherel@ascentialsoftware.com]
Sent: Wednesday, June 12, 2002 6:01 PM
To: axis-user@xml.apache.org
Subject: RE: Exposing EJBs as web services...


Exception messages can just be serialized and passed form one client to
another. 
May be trying to write an independent EJB client and making it work first
can be a good idea. It will remove the Axis piece. This EJB client should be
able to work only with the Home and remote interface in the classpath. If
you are still getting some exceptions on the weblogic console, it means that
your bean is not correctly deployed.
-----Original Message----- 
From: Hurst, Cyrus [mailto:Cyrus_Hurst@tvratings.com] 
Sent: Wednesday, June 12, 2002 5:41 PM 
To: 'axis-user@xml.apache.org' 
Subject: RE: Exposing EJBs as web services... 


  Both ..On the client console I get :  
      weblogic.rmi.extensions.RemoteRuntimeException - with nested 
exception: 
    [java.lang.NoClassDefFoundError: 
com/nielsenmedia/lrs/cpr/common/CPREnterpriseException] 
        at 
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:13

4) 
        at 
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati

onCo 
        at 
org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403) 
        at 
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator

.jav 
        at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM

LDoc 
        at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.

java 
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) 
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) 
        at 
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon

text 
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:455) 
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:321) 
        at org.apache.axis.client.Call.invoke(Call.java:1954) 
        at org.apache.axis.client.Call.invoke(Call.java:1707) 
        at org.apache.axis.client.Call.invoke(Call.java:1635) 
        at org.apache.axis.client.Call.invoke(Call.java:1184) 
        at TestCprRpcClient.main(TestCprRpcClient.java:36) 
[INFO] Call - -Mapping Exception to AxisFault 
<weblogic.rmi.extensions.RemoteRuntimeExcepti 
on: 
[java.lang.NoClassDefFoundError: 
com/nielsenmedia/lrs/cpr/common/CPREnterpriseException]> 
weblogic.rmi.extensions.RemoteRuntimeException - with nested exception: 
[java.lang.NoClassDefFoundError: 
com/nielsenmedia/lrs/cpr/common/CPREnterpriseException] 


 On the server(running Weblogic 6.1)  console I get :   
   
   weblogic.rmi.extensions.RemoteRuntimeException - with nested exception: 
[java.lang.NoClassDefFoundError: 
com/nielsenmedia/lrs/cpr/common/CPREnterpriseException] 
        at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:60) 
        at $Proxy56.lookup(Unknown Source) 
        at 
weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:323) 
        at javax.naming.InitialContext.lookup(InitialContext.java:350) 
        at 
org.apache.axis.providers.java.EJBProvider.getEJBHome(EJBProvider.java:300) 
        at 
org.apache.axis.providers.java.EJBProvider.getNewServiceObject(EJBProvider.j

ava:109) 
        at 
org.apache.axis.providers.java.JavaProvider.getServiceObject(JavaProvider.ja

va:126) 
        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 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:265) 
        at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java

:200) 
        at 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo

ntext.java:2456) 
        at 
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java

:2039) 
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) 
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) 
  Thanks again , 
-Cyrus 
   
-----Original Message----- 
From: thomas.cherel@ascentialsoftware.com 
[mailto:thomas.cherel@ascentialsoftware.com] 
Sent: Wednesday, June 12, 2002 5:35 PM 
To: axis-user@xml.apache.org 
Subject: RE: Exposing EJBs as web services... 


Mime
View raw message