What's the minimum classpath for an Axis2 client?

后端 未结 9 932
清歌不尽
清歌不尽 2021-02-01 15:24

I want to build an Axis2 client (I\'m only accessing a remote web service, I\'m not implementing one!) with Maven2 and I don\'t want to add 21MB of JARs to my project.

9条回答
  •  心在旅途
    2021-02-01 16:05

    Minimal dependency for a working client in summary


    • axiom-api-1.2.14.jar
    • axiom-impl-1.2.14.jar
    • axis2-adb-1.6.3.jar
    • axis2-kernel-1.6.3.jar
    • axis2-transport-http-1.6.3.jar
    • axis2-transport-local-1.6.3.jar
    • commons-codec-1.3.jar
    • commons-httpclient-3.1.jar
    • commons-logging-1.1.1.jar
    • httpcore-4.0.jar
    • mail-1.4.jar
    • neethi-3.0.2.jar
    • wsdl4j-1.6.2.jar
    • XmlSchema-1.4.7.jar

    Listed below the minimal dependencies with details

    client stub uses the ServiceClient Class generated with %AXIS2_HOME%\bin\WSDL2Java tool against a given WSDL (for generating you would need all axis jars on classpath, achieved most easily by setting AXIS_HOME)

    Classes required by Client stub at COMPILE time


    • axiom-api-1.2.14.jar -- required at compilation time by client stub for org.apache.axiom.om.OMElement, org.apache.axiom.soap.SOAPEnvelope, org.apache.axiom.soap.SOAPFactory, org.apache.axiom.om.OMNamespace
    • axis2-adb-1.6.3.jar -- required at compilation time by client stub for org.apache.axis2.databinding.ADBException
    • axis2-kernel-1.6.3.jar -- required at compilation time by client stub for org.apache.axis2.AxisFault Class

    Classes required for successful invocation of Client stub at RUN time

    • axiom-impl-1.2.14.jar (without this org.apache.axiom.om.OMException: No meta factory found for feature 'default'; this usually means that axiom-impl.jar is not in the classpath)
    • axis2-transport-http-1.6.3.jar (without this org.apache.axis2.deployment.DeploymentException: org.apache.axis2.transport.http.CommonsHTTPTransportSender)
    • axis2-transport-local-1.6.3.jar (without this org.apache.axis2.deployment.DeploymentException: org.apache.axis2.transport.local.LocalTransportSender)
    • commons-codec-1.3.jar (without this java.lang.NoClassDefFoundError: org/apache/commons/codec/DecoderException)
    • commons-httpclient-3.1.jar (without this org.apache.axis2.deployment.DeploymentException: org/apache/commons/httpclient/HttpException)
    • commons-logging-1.1.1.jar (without this java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory)
    • httpcore-4.0.jar (without this java.lang.NoClassDefFoundError: org/apache/http/HttpResponseFactory)
    • mail-1.4.jar (without this java.lang.NoClassDefFoundError: javax/mail/internet/ParseException)
    • neethi-3.0.2.jar (without this java.lang.NoClassDefFoundError: org/apache/neethi/PolicyComponent)
    • wsdl4j-1.6.2.jar (without this java.lang.NoClassDefFoundError: javax/wsdl/WSDLException)
    • XmlSchema-1.4.7.jar (without this java.lang.ClassNotFoundException: org/apache/ws/commons/schema/XmlSchema)

    org.apache.axis2.AxisFault: Connection refused: connect -> ERROR ONLY if the web service is not up or accessible for some other reason

    Note the exact version(s), however behavior would be generic enough subject to packaging changes across version, hence, mentionined the FQCNs above-

    Axis Version - 1.6.3

    Tomcat Version - Apache Tomcat/7.0.64

    Servlet version - 3.0

    java.runtime.version - 1.7.0_79-b15

提交回复
热议问题