title: RESTful services with AXL
body: <p>I am trying to create a few restful webservices that will add a bit functionality to the company cisco phones. The basic idea is simple, the users get a small client on which they need to enter login and password. When they have done so, their phone/phones are 'registered' to my restful service and they get added functions on their phone. When they log out, they get unregistered. To provide the extra functions (like adjusted caller information etc etc) I need the Cisco AXL API. This is a SOAP based API. I have generated the java classes using the wsdl already. When I make a testclient using the generated classes, all works fine. </p>
  
  <p>But here comes the problem: When I try to run a soap request while my application is deployed on my Tomcat 7 container, it doesn't work anymore. </p>
  
  <p>The problem seems to be the AXLAPIService, which hangs when executing the following piece of code: </p>
  
  <pre><code>@WebEndpoint(name = "AXLPort")
  public AXLPort getAXLPort() {
      return super.getPort(new QName("http://www.cisco.com/AXLAPIService/", "AXLPort"), AXLPort.class);
  }
  </code></pre>
  
  <p>In other words, i am not getting a port for the soap request and it makes the tomcat crash i f you wait long enough. </p>
  
  <p>I went googling. Somebody on some forum once had a problem because of an out of date stax version. I adjusted the stax version in my POM and tried again, to no help. </p>
  
  <p>I also read somewhere that the underlaying javax.xml.ws.Service actually has an enumeration of ports, and when you do getPort(), you will get the most appropiate port. I then looked up the default port for SOAP and that would be 80, just like the port used for RESTful services. Could it be that the soap service would be wanting port 80, but that it can't have it because it is already in use? </p>
  
  <p>So, to summarize my question: </p>
  
  <ul>
  <li>can it be that my restful services consume the same port that my soap
  request would want to use?</li>
  <li>if not, what could be the problem then and how should I fix it?</li>
  </ul>
  
  <p>As additional information, this is how the axl wsdl defines the service: </p>
  
  <pre><code>&lt;service name="AXLAPIService"&gt;
  &lt;port binding="s0:AXLAPIBinding" name="AXLPort"&gt;
    &lt;soap:address location="https://CCMSERVERNAME:8443/axl/"/&gt;
  &lt;/port&gt;
  </code></pre>
  
  <p></p>
  
  <p>I was thinking about changing the soap port myself. Some googling tells me I should do that in the wsdl but I wouldn't really know how. There is post  already <a href="https://stackoverflow.com/questions/4704148/wsdl-first-approach-how-to-specify-different-names-for-wsdlport-and-wsdlbindi">here</a> but I fail to see how binding another portname could help me out....</p>