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 Amit <am...@yahoo.com> on 2005/04/12 20:20:22 UTC

Newbie:Calling EJB methods using AXIS

Hi All,
I have deployed an EAR file that contains axis.war
file and my EJB Jar file. I created a deploy.wsdd for
the EJB by looking at the samples. I use AdminClient
to deploy this. It is dpeloyed successfully. I can see
it when I do a list using AdminClient and it shows up
when I access the AXISServlet.

I want to call a method of this EJB over SOAP. I have
not created WSDL files for this EJB Jar. Is it
mandatory for me to create one in order to call an EJB
method over SOAP. (I am using  Apache Soap, and I dont
have to create a wsdl file with that. I am migrating
from Apache SOAP to AXIS.) 

My client code is as below:

String endpointURL = "http://<m/c>:<port>/<app
name>/services/ExampleEJB";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new
java.net.URL(endpointURL) );
call.setOperationName( new
QName("http://<m/c>:<port>/<appname>/services/ExampleEJB",
"<method name>") );
String return = (String) call.invoke( new Object[] {
"<string param"> } );

But the call does not even reach the AxisServlet. It
throws an ArrayIndexOutOfBoundsException before that.

Am I missing something very basic here? Any inputs on
writing the client for EJB Service would be greatly
appreciated. 
Thanks and Regards,

Amit


		
__________________________________ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail