I created Axis2
web service as a maven project ProjectB
and packaged it as jar.I added this ProjectB
jar as dependency to the another maven project which is ProjectA
in pom.xml.
jar file of my ProjectB
added as dependency to ProjectA
pom.xml
.
<dependency>
<groupId>axis2</groupId>
<artifactId>Axis2WebService</artifactId>
<version>0.1</version>
</dependency>
In web services jar which I added to another project doesn't contain Webcontent
folder. So, my concern would be
How to invoke my webservice which is inside jar in the ProjectA
?
Do I need to add anything in my web.xml
of ProjectA
in order to find my webservice?
How can I access my webservice in the browser(i.e. http://localserver:port/ProjectA/Myservice
). Is this the right way to access my webservice?
Do I need to again specify all axis2 dependent jars in projectA
pom.xml or Axis 2 servlets mappings in ProjectA
web.xml?
I am struck on this for a day.Can someone please help me?
I'm assuming you're calling your Web Service projectB, and your Web Service Client projectA. If that's the case, then you have a little confusion there. You need to deploy your Web Service (projectB) in an application server (i.e as a war in a tomcat server or ear in jboss or weblogic, etc). Then, you need to generate your client stubs with "Maven2 WSDL2Code Plug-in" and use that client as dependency in your projectA. This proyectA will use the stubs in the generated dependency to access your Web Service. Sorry that I can't format this answer, I'm begind a proxy that blocks all java script (I can't even post comments)...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With