I have some problems deploying a JAX-WS webservice with Spring 3.0.6 on JBoss AS Final 7.1.1.
I have tried two first method from this tutorial: http://www.javacodegeeks.
I am also having problems deploying JAX-WS with similiar configuration. Indeed using the SpringBeanAutowiringSupport as described in Spring doc chapter "19.5.5 Exposing servlet-based web services using JAX-WS" doesn't work as expected.
See doc http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/remoting.html#remoting-web-services
But you are wrong here trying to use SimpleJaxWsServiceExporter. Chapter "19.5.6 Exporting standalone web services using JAX-WS" of spring doc.
This is making a conflict with web service that was was already registered by jboss.
For prove try following configuration with updated port number application context:
<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter">
<property name="baseAddress" value="http://localhost:8081/"/>
</bean>
In final you will run with two services exposed
http://localhost:8080/war-root/MyService?wsdl
http://localhost:8081/MyService?wsdl
As for now I found two workarounds proposed by other people:
Both workarounds are working fine.
It's definitely a port issue. The exception is pretty clear on that.
Caused by: javax.xml.ws.WebServiceException: java.lang.RuntimeException: java.net.BindException: Address already in use: bind
From your comment you indicate there is something listening on port 9999, <property name="baseAddress" value="http://localhost:9999/ws/" />
. The management-native
default port is port 9999. If you look in your standalone.xml
under the <socket-binding-group/>
You'll likely see something like the following.
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
<socket-binding name="ajp" port="8009"/>
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
<socket-binding name="osgi-http" interface="management" port="8090"/>
<socket-binding name="remoting" port="4447"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
For a test start standalone with the following command.
$JBOSS_HOME/bin/standalone.sh -Djboss.management.native.port=19999