Balasaheb
Balasaheb

Reputation: 635

exception: The AXIS engine could not find a target service to invoke! targetService is SecurityDepositServiceImpl

I am new to web-service and I have created one web service in my existing project using eclipse 'Bottom Up java Bean service', server is Tomcat 6, Spring Framework 2.5, and not using Maven and Ant. In my project eclipse automatically included all required jars in lib but when I try to invoke getName() from browser it gives error like: exception: The AXIS engine could not find a target service to invoke! targetService is SecurityDepositServiceImpl So please suggest me what should I do to run my service?

Upvotes: 10

Views: 31361

Answers (3)

Narendra Ingle
Narendra Ingle

Reputation: 11

Sample ant file for build a webService project where deployment descriptor web.xml will route all Services

<path id="compile.classpath">
    <fileset dir="WebContent/WEB-INF/lib">
        <include name="*.jar" />
    </fileset>
</path>

<target name="init">
    <mkdir dir="build/classes" />
    <mkdir dir="dist" />
</target>

<target name="compile" depends="init">
    <javac destdir="build/classes" debug="true" srcdir="src">
        <classpath refid="compile.classpath" />
    </javac>
</target>

<target name="war" depends="compile">
    <war destfile="dist/MyProjectWebService.war"
        webxml="WebContent/WEB-INF/web.xml">
        <fileset dir="WebContent" />
        <lib dir="WebContent/WEB-INF/lib" />
        <classes dir="build/classes" />
    </war>
</target>

<target name="clean">
    <delete dir="dist" />
    <delete dir="build" />
</target>

Upvotes: 0

18446744073709551615
18446744073709551615

Reputation: 16852

If you suddenly see this error in a project that used to compile and run, this is what helped me:

In my case, it was a maven build, the application (an Atlassian plugin) was normally run from under IntelliJ idea. My guess is that there was not enough free disk space, and some build artifact was truncated, but maven could not tell a part from the whole. I had to delete .m2/repository and target/, and run atlas-unit-test.bat and atlas-run.bat from the command line just to download the dependencies (this does not work from IntelliJ Idea, no idea why).

Upvotes: 0

pixelbobby
pixelbobby

Reputation: 4440

I have recieved this error in the past. You will get this error if it cannot find the service name in the URL. Keep in mind the URL is also case-sensative. You should be able to hit the URL in the browser and recieve a message like so:

YourWebServiceName
Hi there, this is an AXIS service!
Perhaps there will be a form for invoking the service here...

I also fixed this issue before when there was a trailing slash "YourService/" in the URL! Watch out for that one too! Took me FOREVER to find it.

Upvotes: 17

Related Questions