日期:2014-05-20 浏览次数:20754 次
package com.allen; import javax.ejb.Remote; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; @Remote @WebService(name = "HelloWorldRemote") @SOAPBinding(style = SOAPBinding.Style.RPC) public interface HelloWorldRemote { String sayHello(String name); }
package com.allen; import javax.ejb.Remote; import javax.ejb.Stateless; import javax.jws.WebMethod; import javax.jws.WebService; import org.jboss.wsf.spi.annotation.WebContext; /** * Session Bean implementation class HelloWorld */ @Stateless @Remote(HelloWorldRemote.class) @WebService(endpointInterface ="com.allen.HelloWorldRemote",serviceName ="MyWorld") @WebContext(contextRoot="") public class HelloWorld implements HelloWorldRemote { @WebMethod public String sayHello(String name) { // TODO Auto-generated method stub return "Hello!"+name; } }
package com.allen; import javax.ejb.Local; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; @Local @WebService(name = "GoodByeWorldLocal") @SOAPBinding(style = SOAPBinding.Style.RPC) public interface GoodByeWorldLocal { String sayGoodBye(String name); }
package com.allen; import javax.ejb.Local; import javax.ejb.Stateless; import javax.ejb.TransactionManagement; import javax.ejb.TransactionManagementType; import javax.jws.WebService; /** * Session Bean implementation class GoodByeWorld */ @Stateless @Local(GoodByeWorldLocal.class) @WebService(endpointInterface ="com.allen.GoodByeWorldLocal",serviceName ="MyWorld") public class GoodByeWorld implements GoodByeWorldLocal { /* (non-Javadoc) * @see com.allen.GoodByeWorldLocal#sayGoodBye(java.lang.String) */ public String sayGoodBye(String name) { // TODO Auto-generated method stub return "GoodBye!Dear "+ name; } }
package com.huawei.datavoice.measurement.service; import javax.ejb.Remote; @Remote public interface MeasurementService { void recalculate(int indexInstanceId) throws Exception; }