In JBoss 5, I could do the following:
@Stateless
public class MyServiceBean implements MyService {
@WebServiceRef(name = "services/MyWebService")
MyWebPort myWebService;
...
}
and override myWebService endpoint URL in jboss.xml:
<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>
but in JBoss 7, jboss.xml is not used anymore and I can't find how to achieve the same with the new configuration file jboss-ejb3.xml.