-
1. Re: Web Services usign EJB2.1
submarin Sep 26, 2003 6:49 AM (in response to damiano.altomare)i arrived to produce a web service(following the examples) from a stateless session bean . Bean may be the spec 1.x the code is below :
regards
submarin@gsu.linux.org.tr
--- cut here ---
package net.glassPrison.ejb;
import javax.ejb.CreateException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import org.apache.log4j.Category;
/**
* @ejb:bean name="glassPrison"
* jndi-name="glassPrison"
* type="Stateless"
* view-type="local"
* @ejb:ejb-ref ejb-name="glassPrison"
* view-type="local"
* ref-name="glassPrison"
* @ejb:transaction type="Required"
* @ejb:transaction-type type="Container"
*
* @jboss-net:web-service urn="glassPrison"
* expose-all="true"
* @author SubmariN
* @version $Revision: 1.2 $
*/
public class glassPrisonBean implements SessionBean
{
protected transient Category log = Category.getInstance( getClass() );
/**
* @ejb:interface-method view-type="local"
*/
public String zerogunner( String name )
{
return "zerogunner " + name;
}
/**
* @ejb:interface-method view-type="local"
*/
public String cleric( String name )
{
return "cleric " + name;
}
public void ejbCreate() throws CreateException {}
public void setSessionContext( SessionContext sessionContext ) {}
public void ejbActivate() {}
public void ejbPassivate() {}
public void ejbRemove() {}
} // of class HelloBean