title: How can I change soap address in a JBoss 7 java webservice
body: <p>How can I change the soap address in a web service. I'm working on JBoss 7.1.1.</p>
  
  <p>I have this web service class:</p>
  
  <pre><code>@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;
         }
     }
  }
  </code></pre>
  
  <p>And when I'm working at my localhost works fine with this WSDL:</p>
  
  <pre><code>&lt;wsdl:service name="CardService"&gt;
    &lt;wsdl:port binding="tns:CardServiceSoapBinding" name="CardPort"&gt;
      &lt;soap:address location="http://localhost:8080/inventory-ws/Card"/&gt;
    &lt;/wsdl:port&gt;
  &lt;/wsdl:service&gt;
  </code></pre>
  
  <p>But when I deploy to my server, that has a name server1.somedomain.com, doesn't work because I got just http:// server1:8080/ ...</p>
  
  <pre><code>&lt;wsdl:service name="CardService"&gt;
    &lt;wsdl:port binding="tns:CardServiceSoapBinding" name="CardPort"&gt;
       &lt;soap:address location="http://server1:8080/inventory-ws/Card"/&gt;
    &lt;/wsdl:port&gt;
  &lt;/wsdl:service&gt;
  </code></pre>
  
  <p>What I need is how to make it work in my server with the complete url: server1.domedomain.com.</p>
  
  <p>Thanks in advance.</p>