【发布时间】:2016-02-28 10:30:09
【问题描述】:
我正在使用 eclipse Mars,面向开发人员的 IBM WebSphere Application Server 8.5,并使用 WAS 8.5 Developer Tools for Eclipse 插件。
当我在 Eclipse 中右键单击我的 ear 项目并选择运行我的应用程序时,应用程序已发布并部署在服务器上,但未发布 Web 服务。我知道在 webspehere 中发布我的 web 服务我必须在我的 ear 文件上运行 endPtEnabler,然后在服务器上安装以修改 ear 文件并为 web 服务添加所需的 websphere 工件。
作为目前的解决方法,我必须在 maven 安装周期中生成 ear 并应用 endPtEnabler,并且我编写了 jython 脚本以在 eclipse 运行配置中使用来安装/更新应用程序,但是这样做很痛苦每次更改,因为更改不是热部署的,我必须安装 ear 并运行 jython 脚本。
有没有办法配置eclipse插件在通过eclipse运行应用时直接发布web服务??
更新 1:
服务类:
package com.home.da.services.mq.simulators;
import static com.home.core.common.constants.ConstantValues.*;
import javax.annotation.Resource;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.jms.Queue;
import javax.jws.WebService;
import com.home.core.mq.xml.bind.bill.req.SendSystemNotificationRequest;
import com.home.da.services.mq.MQAccessorLocal;
@WebService(serviceName="ReceiveTransactionService",
endpointInterface = "com.home.da.services.mq.simulators.ReceiveTransaction",
portName = "ReceiveTransactionPort",
targetNamespace = "http://home.com/BILL")
@Stateless
public class ReceiveTransactionWS implements ReceiveTransaction{
@EJB
private MQAccessorLocal mqAccessorLocal;
@Override
public void sendTransaction(SendSystemNotificationRequest trx) {
mqAccessorLocal.sendMQMessage(Boolean.FALSE, trx, "com.home.core.mq.xml.bind.bill.req", null, JNDI_NOTF_BILL_SYS_REQ, null, null, null, "999999999");
}
}
SEI:
package com.home.da.services.mq.simulators;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import com.home.core.mq.xml.bind.bill.req.SendSystemNotificationRequest;
@WebService(name = "ReceiveTransaction", targetNamespace = "http://home.com/BILL")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED,
use = SOAPBinding.Use.LITERAL,
style = SOAPBinding.Style.DOCUMENT)
public interface ReceiveTransaction {
public void sendTransaction(SendSystemNotificationRequest trx);
}
文件上下文:
【问题讨论】:
标签: web-services websphere ibm-wdt