Axis2 dependencies for a simple soap “rpc encoding

2019-09-03 10:14发布

问题:

we need to access an obsolete soap webservice with "RPC Encoding" style. unfortunately this is not supported by modern tools, such as JAX-WS, so we need to use the Axis2 library.

I've created the stubs with the maven plugin, as in this example: Error when using XmlBeans generated classes

However, when I call the webservice, it complains about missing dependencies. I can add the missing dependencies using a trial and error approach (every time that I get a ClassNotFoundException, I find out the jar and I add the dependency in the pom file), but that's not a very good idea.

I looked at the Axis2 documentation, but I didn't find information about the dependencies needed for a simple soap call. How can I know what are the minimum set of dependencies that I need in my case?

回答1:

USE MAVEN , that will automatically resolves your dependencies in optimized manner. add following to your pom.xml

<dependencies>
    <dependency>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2</artifactId>
        <version>1.5.1</version>
    </dependency>
</dependencies>


标签: java axis2