在JBoss 5中,我可以执行以下操作:
@Stateless
public class MyServiceBean implements MyService {
@WebServiceRef(name = "services/MyWebService")
MyWebPort myWebService;
...
}
并覆盖jboss.xml中的myWebService端点URL:
<session>
<ejb-name>MyServiceBean</ejb-name>
<service-ref>
<service-ref-name>services/MyWebService</service-ref-name>
<service-impl-class>eg.MyWebService</service-impl-class>
<port-component-ref>
<service-endpoint-interface>eg.MyWebPort</service-endpoint-interface>
<stub-property>
<prop-name>javax.xml.ws.service.endpoint.address</prop-name>
<prop-value>http://some.url.here</prop-value>
</stub-property>
</port-component-ref>
</service-ref>
</session>
但是在JBoss 7中,jboss.xml不再使用了,我找不到如何使用新配置文件jboss-ejb3.xml实现相同的功能。