How to change soap address in jboss 7 java webservice

How to change the soap address in a web service. I am working on JBoss 7.1.1.

I have this class of web services:

@WebService public class Card { @WebMethod public CardResponseDTO insertCard( @WebParam(name = "cardRequestCardDTO") CardDTO cardDTO, @WebParam(name = "userName") String userName) { Date today; CardResponseDTO cardResponseDTO = new CardResponseDTO(); try { today = Calendar.getInstance().getTime(); // My logic in here... return cardResponseDTO; } catch (Exception ex) { log.error(ex.getMessage(), ex); cardResponseDTO.setErrorCode(-2); cardResponseDTO.setErrorMessage(ex.getMessage()); return cardResponseDTO; } } } 

And when I work on my localhost, it works fine with this WSDL:

 <wsdl:service name="CardService"> <wsdl:port binding="tns:CardServiceSoapBinding" name="CardPort"> <soap:address location="http://localhost:8080/inventory-ws/Card"/> </wsdl:port> </wsdl:service> 

But when I deploy to my server, which has the name server1.somedomain.com, it doesn’t work because I only got http: // server1: 8080 / ...

 <wsdl:service name="CardService"> <wsdl:port binding="tns:CardServiceSoapBinding" name="CardPort"> <soap:address location="http://server1:8080/inventory-ws/Card"/> </wsdl:port> </wsdl:service> 

I need how to make it work on my server with the full URL: server1.domedomain.com.

Thanks in advance.

+4
source share
3 answers

You need to configure jboss to listen on the required interface. To do this, you need to edit the standalone.xml file and add new interface tags. I think this post might be helpful. https://community.jboss.org/message/614897

0
source

If you need to deploy SOAP web services for open access, for example. through Apache you can delete this line in standalone.xml: <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host> in general.
Then the host name will be migrated from the WSDL URL.
In this case, you do not need to change the configuration for each deployment phase. For example, dev.myhost.com, qa.myhost.com or ww.myhost.com.

This avoids the problem with the wrong 8443 SSL port for public services.

+12
source

To clarify,

In standalone.xml, just below the tag:

 <subsystem xmlns="urn:jboss:domain:webservices:1.1"> 

You must change these entries.

 <modify-wsdl-address>true</modify-wsdl-address> <wsdl-host>www.myhost.com</wsdl-host> 
+5
source

All Articles