<p>I am using Apache Axis to connect my Java app to a web server. I used wsdl2java to create the stubs for me, but when I try to use the stubs, I get the following exception:</p>

<blockquote>
  <p>org.apache.axis.ConfigurationException: No service named <code>&lt;web service name&gt;</code> is available</p>
</blockquote>

<p>any idea?</p>

[{'answer_id': 65575, 'author': 'ScArcher2', 'author_id': 1310, 'author_profile': 'https://Stackoverflow.com/users/1310', 'pm_score': 0, 'selected': False, 'text': '<p>This is what my code looks like. It seems to work fine.\nAre you using a service locator or just creating your service?</p>\n\n<pre><code>SomeServiceLocator locator = new SomeServiceLocator();\nSomeService service = null;\ntry\n{\n    service = locator.getSomeServiceImplPort();\n}\ncatch (ServiceException e)\n{\n    e.printStackTrace();\n}\n</code></pre>\n'}, {'answer_id': 179414, 'author': 'KC Baltz', 'author_id': 9910, 'author_profile': 'https://Stackoverflow.com/users/9910', 'pm_score': 3, 'selected': True, 'text': '<p>Just a guess, but it looks like that error message is reporting that you\'ve left the service name blank.  I imagine the code that generates that error message looks like this:</p>\n\n<pre><code>throw new ConfigurationException("No service named" + serviceName + " is available");\n</code></pre>\n'}, {'answer_id': 200824, 'author': 'Vinze', 'author_id': 26859, 'author_profile': 'https://Stackoverflow.com/users/26859', 'pm_score': 0, 'selected': False, 'text': "<p>I don't know what version of Axis you're using but I'm using Axis2 for both server and client and the Java2WSDL create a default endpoint for the service on localhost. If you create the client stub with WSDL2Java, the default constructor of the stub will then point to localhost. If the service is on other endpoint you must use the constructor with the endpoint as parameter...\nMaybe the problem is not that at all but as said on other answers, without the WSDL you're using as WSDL2Java input it's hard to say.</p>\n"}, {'answer_id': 6496124, 'author': 'arnonym', 'author_id': 817796, 'author_profile': 'https://Stackoverflow.com/users/817796', 'pm_score': 1, 'selected': False, 'text': '<p>It is an exception used by Axis\' control flow. </p>\n\n<p><a href="http://wiki.apache.org/ws/FrontPage/Axis/DealingWithCommonExceptions" rel="nofollow">http://wiki.apache.org/ws/FrontPage/Axis/DealingWithCommonExceptions</a>\n--> org.apache.axis.ConfigurationException: No service named XXX is available</p>\n'}, {'answer_id': 17981199, 'author': 'kldavis4', 'author_id': 290918, 'author_profile': 'https://Stackoverflow.com/users/290918', 'pm_score': 5, 'selected': False, 'text': '<p>According to the <a href="http://wiki.apache.org/ws/FrontPage/Axis/DealingWithCommonExceptions">documentation</a> linked to by @arnonym, this exception is somewhat misleading. In the first attempt to find the service a ConfigurationException is thrown and caught. It is logged at DEBUG level by the ConfigurationException class. Then another attempt is made using a different method to find the service that may then succeed. The workaround for this is to just change the log level on the ConfigurationException class to INFO in your log4j.properties:</p>\n\n<pre><code>log4j.logger.org.apache.axis.ConfigurationException = INFO\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/65310', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2328/']