0 Replies Latest reply: Apr 18, 2012 7:18 AM by Steffen Schmidt RSS

Changing the port number for an EJB exposed as a webservice

Steffen Schmidt Newbie

I have a stateless session bean with annotations to expose it as a web service:



@WebService(targetNamespace = "http://tempuri.org/", serviceName = "myService")

@WebContext(contextRoot = "/pushServices", urlPattern = "/")


public class PushBean implements PushBeanIF, PushBeanRemote {



Currently, the service is deployed on port 8080, but I would like the web service to be available on port 9090. I don't want to change the general server port because it will interfere with the web application.


I tried to set the property

<property name="webServicePort">9090</property>

in the jboss-beans.xml file for the WSServerConfig entry.


After setting this property, the web service seemed to be available on port 9090 according to the overview on JbossWS/Services page http://localhost:8080/jbossws/services. But this was a false alarm, because it still only responded on port 8080.


So, what do I do? My guess is, that is is a small piece of configuration - I just need to find the right place to do it...


I'm working on a Jboss AS 5.1