Eclipse的WebSphere Application Server Developer Tools:未发布Web服务

时间:2016-02-28 10:30:09

标签: web-services websphere ibm-wdt

我正在使用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安装周期中应用endPtEnabler,并且我编写了jython脚本以在eclipse运行配置中用于安装/更新应用程序,但是,这样做很痛苦因为每次更改都没有热更新,我必须安装耳朵并运行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);
}

文件上下文:

enter image description here

1 个答案:

答案 0 :(得分:0)

查看IBM Knowledge Center WebSphere Developer Tools for web services development topic [WebSphere Application Server经典]创建路由器模块部分。有关“创建路由器模块”向导(以前称为“端点启动器”)的更多详细信息,请参见Creating web service router modules topic