I have a more complex situation: one internal JBoss server with the web service, and several forwards from externals apache web servers (sorry for my bad english). Different customers have different access points thought differents urls and domains (the customer A access to http://serverA/ws, customer B to http://serverB/ws, etc), but the internal web service and jboss are the same. The annotation solution doesn't work in my case. Another idea?

"memema" wrote:I have a more complex situation: one internal JBoss server with the web service, and several forwards from externals apache web servers (sorry for my bad english). Different customers have different access points thought differents urls and domains (the customer A access to http://serverA/ws, customer B to http://serverB/ws, etc), but the internal web service and jboss are the same. The annotation solution doesn't work in my case. Another idea?

Not sure if this is exactly your use case, however you could comment out this

<property name="webServiceHost">${jboss.bind.address}</property>

in your jbossws.beans/META-INF/jboss-beans.xml file (leave modifySOAPAddress to true). This way the engine should rewrite the soap:address using the host/port used to invoke the servlet providing you the wsdl.

Sorry for bumping this old topic, but i have the same problem as memema.I have commented out the webServiceHost and the rewrite worked just fine on JBossAS4.2.0 (JBossWS1.2).Recently i updated to JBossAS4.2.2 (JBossWS2.0.1) and now it don't work anymore. it always generates the endpoint to http://jbossws.undefined.host:8080Is this a knows issue in the current JBossWS?

<!-- An abstraction of server configuration aspects. -->
<bean name="WSServerConfig" class="org.jboss.wsf.stack.jbws.NativeServerConfig">
<property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
<!--
The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless 'modifySOAPAddress' is true.
If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
If 'webServiceHost' is not set, JBossWS uses requesters protocol host when rewriting the <soap:address>.
-->
<!--
<property name="webServiceHost">${jboss.bind.address}</property>
-->
<property name="modifySOAPAddress">true</property>
<!--
Set these properties to explicitly define the ports that will be used for rewriting the SOAP address.
Otherwise the ports will be identified by querying the list of installed connectors.
If multiple connectors are found the port of the first connector is used.
<property name="webServiceSecurePort">8443</property>
<property name="webServicePort">8080</property>
-->
<property name="webServicePort">80</property>
</bean>

I commented out the webServiceHost property and uncommented the webServicePort port setting it to 80.

It would be better if JBossWS could also get the port from the requesters protocol port.