Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 36336 invoked from network); 24 Nov 2006 21:21:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Nov 2006 21:21:13 -0000 Received: (qmail 7035 invoked by uid 500); 24 Nov 2006 21:21:19 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 7011 invoked by uid 500); 24 Nov 2006 21:21:19 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 7000 invoked by uid 99); 24 Nov 2006 21:21:19 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2006 13:21:19 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_POST,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [80.247.70.7] (HELO smtp-out2.email.it) (80.247.70.7) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2006 13:21:07 -0800 Received: by smtp-out2.email.it (Email.it, from userid 101) id 288251BC027; Fri, 24 Nov 2006 22:20:54 +0100 (CET) Received: from [127.0.0.1] (host154-159-dynamic.16-87-r.retail.telecomitalia.it [87.16.159.154])by smtp-out2.email.it (Email.it) with ESMTP id 8D1D21BC01Cfor ; Fri, 24 Nov 2006 22:20:53 +0100 (CET) Message-ID: <4567621E.2070800@email.it> Date: Fri, 24 Nov 2006 22:20:30 +0100 From: Francesco Sessa User-Agent: Mozilla Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: user@geronimo.apache.org Subject: Ejb web services and jndi name Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Copyrighted-Material: Please visit http://www.email.it/ita/privacy.html X-Virus-Checked: Checked by ClamAV on apache.org Hi all, I'm a new user of geronimo. To complete my bachelor thesis, i need to create simples web services with ejb. I create the Jar file and deploy it on application server, but, when i try to connect my client to my web services, i receive the message that the jndi name isn't correct. I think that the error was in the deployment xml of the client, but i don't be able to get the wsdl of the service via browser (i try with the url written in the wsdl, but, evidently, it isn't correct). Please, i must deliver my work monday morning. endpoint interface package org.eclipse.Ciao; import java.rmi.RemoteException; import java.rmi.Remote; public interface CiaoWSService extends Remote{ public String getString(String name) throws RemoteException; } home interface package org.eclipse.Ciao; import java.rmi.RemoteException; import javax.ejb.*; public interface CiaoWSHome extends EJBHome{ CiaoWS create() throws RemoteException, CreateException; } remote interface package org.eclipse.Ciao; import java.rmi.RemoteException; import javax.ejb.*; public interface CiaoWS extends EJBObject{ public String getString(String name) throws RemoteException; } bean implementation package org.eclipse.Ciao; import javax.ejb.*; import java.rmi.RemoteException; public class CiaoWSBean implements SessionBean{ public String getString(String name) throws RemoteException{ return "Ciao " + name; } public void ejbCreate(){} public void ejbRemove(){} public void ejbActivate(){} public void ejbPassivate(){} public void setSessionContext(SessionContext sc){} } ---------------------------------------------------------------------------------------------- wsdl generated with jwsdp ------------------------------------------------------------------------------------- ejb-jar.xml Web Service CiaoWS Ciao WS CiaoWSBean org.eclipse.Ciao.CiaoWSHome org.eclipse.Ciao.CiaoWS org.eclipse.Ciao.CiaoWSBean Stateless Container -------------------------------------------------------------------------------------------- openejb-jar.xml default CiaoWSBean_artifact_in_openejb 1.0 car geronimo geronimo-webservices jar geronimo geronimo-axis jar CiaoWSBean CiaoWSBean --------------------------------------------------------------------------------------- webservices.xml CiaoWS META-INF/CiaoWSService.wsdl META-INF/mapping.xml CiaoWS ger:CiaoWSServicePort org.eclipse.Ciao.CiaoWSService CiaoWSBean ------------------------------------------------------------------------------------------ mapping.xml generated with jwsdp org.eclipse http://ciaows.org/types org.eclipse http://ciaows.org/wsdl org.eclipse.CiaoWSService serviceNS:CiaoWSService CiaoWSServicePort CiaoWSServicePort org.eclipse.Ciao.CiaoWSService portTypeNS:CiaoWSService bindingNS:CiaoWSServiceBinding getString getString 0 java.lang.String wsdlMsgNS:CiaoWSService_getString String_1 IN java.lang.String wsdlMsgNS:CiaoWSService_getStringResponse result ------------------------------------------------------------------------------------- client jsp implementation <%@ page import="org.eclipse.Ciao.CiaoWSHome, org.eclipse.Ciao.CiaoWS, javax.naming.InitialContext, javax.naming.Context, java.util.*"%> OpenEJB -- EJB for Tomcat Stateless Session bean - HelloBean - says: <% Context initCtx = new InitialContext(); Object object = initCtx.lookup("java:comp/env/ejb/CiaoWSBean"); CiaoWSHome ciaoHome = (CiaoWSHome) javax.rmi.PortableRemoteObject.narrow(object, CiaoWSHome.class); CiaoWS bean = ciaoHome.create(); %> <%= bean.getString("Francesco") %> --------------------------------------------------------------------- web.xml JSP 2.0 Examples. JSP 2.0 Examples CiaoWSClient.jsp --------------------------------------------------------------------------- geronimo-web.xml default ejbref-war 1.0-SNAPSHOT car /CiaoWSClient ejb/CiaoWS CiaoWS http://localhost:8080/CiaoWS ------------------------------------------------------------------------------ I hope in one quick answer. thanks Francesco PS. Sorry for my english.