Axis2 1.6.4 到 1.7.9 - AxisFault:找不到端点引用 (EPR) 的服务

Axis2 1.6.4 to 1.7.9 - AxisFault: The service cannot be found for the endpoint reference (EPR)

由于各种情况,我想从 Axis2 1.6.4 切换到 1.7.9。 pom.xml 和 axis2.xml 已相应调整(由 Apache Migration Guide)。 以前我通过 Eclipse 构建项目,但现在它应该通过 maven 构建。 Axis2 通过 maven-war-plugin.

嵌入到项目中

现在我无法像切换到 1.7.9 之前那样显示端点。 非常感谢您的帮助。

我的端点应该是:https://localhost:8443/SoapEndpoint/services/MainService.MainServiceHttpsSoap11Endpoint/

编辑:我也从 Java 8 切换到 11

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>de.applicodata.serviceportal</groupId>
    <artifactId>soap-endpoint</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>soap-endpoint</name>
    <properties>
        <axis2.version>1.7.9</axis2.version>
<!--        <axis2.version>1.6.4</axis2.version> -->
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <build>
        <finalName>SoapEndpoint</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <overlays>
                        <overlay>
                            <groupId>org.apache.axis2</groupId>
                            <artifactId>axis2-webapp</artifactId>
                            <excludes>
                                <exclude>/WEB-INF/lib/**</exclude>
                            </excludes>
                        </overlay>
                    </overlays>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>4.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-webapp</artifactId>
            <version>${axis2.version}</version>
            <type>war</type>
            <exclusions>
                <exclusion>
                    <artifactId>httpcore</artifactId>
                    <groupId>org.apache.httpcomponents</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>mail</artifactId>
                    <groupId>javax.mail</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>geronimo-javamail_1.4_spec</artifactId>
                    <groupId>org.apache.geronimo.specs</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-spring</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-soapmonitor-servlet</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-saaj</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-mtompolicy</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-metadata</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-json</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-jibx</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-jaxws-mar</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-jaxws</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-jaxbri</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-java2wsdl</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-fastinfoset</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-corba</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-clustering</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>axis2-adb-codegen</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-webapp</artifactId>
            <version>${axis2.version}</version>
            <type>pom</type>
            <exclusions>
                <exclusion>
                    <artifactId>httpcore</artifactId>
                    <groupId>org.apache.httpcomponents</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>mail</artifactId>
                    <groupId>javax.mail</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-http</artifactId>
            <version>${axis2.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>httpcore</artifactId>
                    <groupId>org.apache.httpcomponents</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-local</artifactId>
            <version>${axis2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-xmlbeans</artifactId>
            <version>${axis2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <version>2.3.1</version>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz-jobs</artifactId>
            <version>2.3.1</version>
        </dependency>
        <dependency>
            <groupId>com.opencsv</groupId>
            <artifactId>opencsv</artifactId>
            <version>4.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>1.6</version>
        </dependency>
        <dependency>
            <groupId>net.bull.javamelody</groupId>
            <artifactId>javamelody-core</artifactId>
            <version>1.77.0</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.rampart</groupId>
            <artifactId>rampart-core</artifactId>
            <version>1.7.1</version>
            <scope>runtime</scope>
            <exclusions>
                <exclusion>
                    <artifactId>axis2-mtompolicy</artifactId>
                    <groupId>org.apache.axis2</groupId>
                </exclusion>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-dom</artifactId>
            <version>1.2.22</version>
            <scope>runtime</scope>
            <exclusions>
                <exclusion>
                    <artifactId>geronimo-javamail_1.4_spec</artifactId>
                    <groupId>org.apache.geronimo.specs</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-impl</artifactId>
            <version>1.2.22</version>
            <scope>runtime</scope>
            <exclusions>
                <exclusion>
                    <artifactId>geronimo-javamail_1.4_spec</artifactId>
                    <groupId>org.apache.geronimo.specs</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-api</artifactId>
            <version>1.2.22</version>
            <exclusions>
                <exclusion>
                    <artifactId>geronimo-javamail_1.4_spec</artifactId>
                    <groupId>org.apache.geronimo.specs</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.25.0-GA</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>3.7</version>
            <exclusions>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        
        <!--  -->
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <version>2.14</version>
        </dependency>
    </dependencies>
</project>

services.xml

<service name="MainService" scope="transportsession">
    <Description>
        Main Web Service for the service portal
    </Description>
    <messageReceivers>
        <messageReceiver mep="http://www.w3.org/ns/wsdl/in-only"
            class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
        <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
            class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
    </messageReceivers>
    <parameter name="ServiceClass" locked="false">de.applicodata.serviceportal.appconnector.webservices.main.MainWebService
    </parameter>
</service>

axis2.xml

<axisconfig name="AxisJava2.0">
    <!-- ================================================= -->
    <!-- Parameters -->
    <!-- ================================================= -->
    <parameter name="hotdeployment">true</parameter>
    <parameter name="hotupdate">false</parameter>
    <parameter name="enableMTOM">false</parameter>
    <parameter name="enableSwA">false</parameter>

    <parameter name="EnableChildFirstClassLoading">false</parameter>

    <parameter name="exposeServiceMetadata">true</parameter>

    <parameter name="ConfigContextTimeoutInterval">30000</parameter>

    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>

    <parameter name="DrillDownToRootCauseForFaultReason">true</parameter>

    <parameter name="userName">axis2-admin</parameter>
    <parameter name="password">yCiBFX7AfeUSowvcyTnr</parameter>

    <parameter name="disableREST" locked="false">false</parameter>

    <parameter name="disableSOAP12" locked="true">false</parameter>

    <deployer extension=".class" directory="pojo"
        class="org.apache.axis2.deployment.POJODeployer" />
    <deployer extension=".jar" directory="servicejars"
        class="org.apache.axis2.jaxws.framework.JAXWSDeployer" />
    <deployer extension=".jar" directory="transports"
        class="org.apache.axis2.deployment.TransportDeployer" />

    <parameter name="useGeneratedWSDLinJAXWS">false</parameter>

    <threadContextMigrators>
        <threadContextMigrator listId="JAXWS-ThreadContextMigrator-List"
            class="org.apache.axis2.jaxws.addressing.migrator.EndpointContextMapMigrator" />
    </threadContextMigrators>

    <!-- ================================================= -->
    <!-- Message Receivers -->
    <!-- ================================================= -->
    <messageReceivers>
        <messageReceiver mep="http://www.w3.org/ns/wsdl/in-only"
            class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver" />
        <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
            class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver" />
        <messageReceiver mep="http://www.w3.org/ns/wsdl/in-only"
            class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver" />
        <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
            class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver" />
        <messageReceiver mep="http://www.w3.org/ns/wsdl/in-only"
            class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver" />
        <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"
            class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver" />
    </messageReceivers>

    <!-- ================================================= -->
    <!-- Message Formatter -->
    <!-- ================================================= -->
    <messageFormatters>
        <messageFormatter contentType="application/x-www-form-urlencoded"
            class="org.apache.axis2.transport.http.XFormURLEncodedFormatter" />
        <messageFormatter contentType="multipart/form-data"
            class="org.apache.axis2.transport.http.MultipartFormDataFormatter" />
        <messageFormatter contentType="application/xml"
            class="org.apache.axis2.transport.http.ApplicationXMLFormatter" />
        <messageFormatter contentType="text/xml"
            class="org.apache.axis2.transport.http.SOAPMessageFormatter" />
        <messageFormatter contentType="application/soap+xml"
            class="org.apache.axis2.transport.http.SOAPMessageFormatter" />
    </messageFormatters>

    <!-- ================================================= -->
    <!-- Message Builders -->
    <!-- ================================================= -->
    <messageBuilders>
        <messageBuilder contentType="application/xml"
            class="org.apache.axis2.builder.ApplicationXMLBuilder" />
        <messageBuilder contentType="application/x-www-form-urlencoded"
            class="org.apache.axis2.builder.XFormURLEncodedBuilder" />
        <messageBuilder contentType="multipart/form-data"
            class="org.apache.axis2.builder.MultipartFormDataBuilder" />
    </messageBuilders>

    <!-- ================================================= -->
    <!-- Transport Ins -->
    <!-- ================================================= -->
    <transportReceiver name="https"
        class="org.apache.axis2.transport.http.AxisServletListener">
        <parameter name="port">443</parameter>
    </transportReceiver>

    <!-- ================================================= -->
    <!-- Transport Outs -->
    <!-- ================================================= -->
    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender" />
    <transportSender name="http" class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender">
        <parameter name="PROTOCOL">HTTP/1.1</parameter>
        <parameter name="Transfer-Encoding">chunked</parameter>
    </transportSender>
    <transportSender name="https" class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender">
        <parameter name="PROTOCOL">HTTP/1.1</parameter>
        <parameter name="Transfer-Encoding">chunked</parameter>
    </transportSender>
    
    
    <!-- ================================================= -->
    <!-- Clustering -->
    <!-- ================================================= -->
    <clustering class="org.apache.axis2.clustering.tribes.TribesClusteringAgent" enable="false">
        <parameter name="AvoidInitiation">true</parameter>
        <parameter name="membershipScheme">multicast</parameter>
        <parameter name="domain">wso2.carbon.domain</parameter>
        <parameter name="synchronizeAll">true</parameter>
        <parameter name="maxRetries">10</parameter>
        <parameter name="mcastAddress">228.0.0.4</parameter>
        <parameter name="mcastPort">45564</parameter>
        <parameter name="mcastFrequency">500</parameter>
        <parameter name="memberDropTime">3000</parameter>
        <parameter name="mcastBindAddress">127.0.0.1</parameter>
        <parameter name="localMemberHost">127.0.0.1</parameter>
        <parameter name="localMemberPort">4000</parameter>
        <parameter name="preserveMessageOrder">true</parameter>
        <parameter name="atmostOnceMessageSemantics">true</parameter>
        <parameter name="properties">
            <property name="backendServerURL" value="https://${hostName}:${httpsPort}/services/" />
            <property name="mgtConsoleURL" value="https://${hostName}:${httpsPort}/" />
        </parameter>
        <members>
            <member>
                <hostName>127.0.0.1</hostName>
                <port>4000</port>
            </member>
            <member>
                <hostName>127.0.0.1</hostName>
                <port>4001</port>
            </member>
        </members>
        <groupManagement enable="false">
            <applicationDomain name="apache.axis2.application.domain"
                description="Axis2 group"
                agent="org.apache.axis2.clustering.management.DefaultGroupManagementAgent" />
        </groupManagement>
        <nodeManager
            class="org.apache.axis2.clustering.management.DefaultNodeManager"
            enable="true" />
        <stateManager class="org.apache.axis2.clustering.state.DefaultStateManager"
            enable="true">
            <replication>
                <defaults>
                    <exclude name="local_*" />
                    <exclude name="LOCAL_*" />
                </defaults>
                <context class="org.apache.axis2.context.ConfigurationContext">
                    <exclude name="local_*" />
                </context>
                <context class="org.apache.axis2.context.ServiceGroupContext">
                    <exclude name="local_*" />
                </context>
                <context class="org.apache.axis2.context.ServiceContext">
                    <exclude name="local_*" />
                </context>
            </replication>
        </stateManager>
    </clustering>

    <!-- ================================================= -->
    <!-- Phases -->
    <!-- ================================================= -->
    <phaseOrder type="InFlow">
        <!-- System predefined phases -->
        <phase name="Transport">
            <handler name="RequestURIBasedDispatcher"
                class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
                <order phase="Transport" />
            </handler>
            <handler name="SOAPActionBasedDispatcher"
                class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
                <order phase="Transport" />
            </handler>
        </phase>
        <phase name="Addressing">
            <handler name="AddressingBasedDispatcher"
                class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
                <order phase="Addressing" />
            </handler>
        </phase>
        <phase name="Security" />
        <phase name="PreDispatch" />
        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
            <handler name="RequestURIBasedDispatcher"
                class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher" />
            <handler name="SOAPActionBasedDispatcher"
                class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher" />
            <handler name="RequestURIOperationDispatcher"
                class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher" />
            <handler name="SOAPMessageBodyBasedDispatcher"
                class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher" />
            <handler name="HTTPLocationBasedDispatcher"
                class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher" />
            <handler name="GenericProviderDispatcher"
                class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher" />
            <handler name="MustUnderstandValidationDispatcher"
                class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher" />
        </phase>
        <phase name="RMPhase" />
        <!-- System predefined phases -->
        <!-- After Postdispatch phase module author or service author can add any 
            phase he want -->
        <phase name="OperationInPhase">
            <handler name="MustUnderstandChecker"
                class="org.apache.axis2.jaxws.dispatchers.MustUnderstandChecker">
                <order phase="OperationInPhase" />
            </handler>
        </phase>
        <phase name="soapmonitorPhase" />
    </phaseOrder>
    <phaseOrder type="OutFlow">
        <!-- user can add his own phases to this area -->
        <phase name="soapmonitorPhase" />
        <phase name="OperationOutPhase" />
        <!--system predefined phase -->
        <!--these phase will run irrespective of the service -->
        <phase name="RMPhase" />
        <phase name="PolicyDetermination" />
        <phase name="MessageOut" />
        <phase name="Security" />
    </phaseOrder>
    <phaseOrder type="InFaultFlow">
        <phase name="Addressing">
            <handler name="AddressingBasedDispatcher"
                class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
                <order phase="Addressing" />
            </handler>
        </phase>
        <phase name="Security" />
        <phase name="PreDispatch" />
        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
            <handler name="RequestURIBasedDispatcher"
                class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher" />
            <handler name="SOAPActionBasedDispatcher"
                class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher" />
            <handler name="RequestURIOperationDispatcher"
                class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher" />
            <handler name="SOAPMessageBodyBasedDispatcher"
                class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher" />
            <handler name="HTTPLocationBasedDispatcher"
                class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher" />
            <handler name="GenericProviderDispatcher"
                class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher" />
            <handler name="MustUnderstandValidationDispatcher"
                class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher" />
        </phase>
        <phase name="RMPhase" />
        <!-- user can add his own phases to this area -->
        <phase name="OperationInFaultPhase" />
        <phase name="soapmonitorPhase" />
    </phaseOrder>
    <phaseOrder type="OutFaultFlow">
        <!-- user can add his own phases to this area -->
        <phase name="soapmonitorPhase" />
        <phase name="OperationOutFaultPhase" />
        <phase name="RMPhase" />
        <phase name="PolicyDetermination" />
        <phase name="MessageOut" />
        <phase name="Security" />
    </phaseOrder>
</axisconfig>

服务器日志:

[INFO] contextInitialized(): session map has been set.
[INFO] Clustering has been disabled
[INFO] Deploying module: addressing-1.7.9 - file:/C:/workspaces/workspace_java14/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/webapps/SoapEndpoint/WEB-INF/modules/addressing-1.7.9.mar
[INFO] Deploying module: jaxws-1.7.9 - file:/C:/workspaces/workspace_java14/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/webapps/SoapEndpoint/WEB-INF/modules/axis2-jaxws-mar-1.7.9.mar
[INFO] Deploying module: metadataExchange-1.7.9 - file:/C:/workspaces/workspace_java14/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/webapps/SoapEndpoint/WEB-INF/modules/mex-1.7.9.mar
[INFO] Deploying module: mtompolicy-1.7.9 - file:/C:/workspaces/workspace_java14/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/webapps/SoapEndpoint/WEB-INF/modules/mtompolicy-1.7.9.mar
[INFO] Deploying module: ping-1.7.9 - file:/C:/workspaces/workspace_java14/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/webapps/SoapEndpoint/WEB-INF/modules/ping-1.7.9.mar
[INFO] Deploying module: script-1.7.9 - file:/C:/workspaces/workspace_java14/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/webapps/SoapEndpoint/WEB-INF/modules/scripting-1.7.9.mar
[INFO] Deploying module: soapmonitor-1.7.9 - file:/C:/workspaces/workspace_java14/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/webapps/SoapEndpoint/WEB-INF/modules/soapmonitor-1.7.9.mar
...
INFORMATION: Server startup in [23.900] milliseconds
[INFO] addSession: 832876A064CF10EF02A2618A72FAC00C
[ERROR] The service cannot be found for the endpoint reference (EPR) https://localhost:8443/SoapEndpoint/services/HttpsSoap11Endpoint/MainService.MainServiceHttpsSoap11Endpoint/
org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR) https://localhost:8443/SoapEndpoint/services/HttpsSoap11Endpoint/MainService.MainServiceHttpsSoap11Endpoint/
   at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:79)
   at org.apache.axis2.engine.Phase.invoke(Phase.java:324)
   at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:250)
   at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:156)
   at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:178)
   at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:164)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
   at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   at de.applicodata.serviceportal.appconnector.HelperEntities.SerializeRequestsFilter.doFilter(SerializeRequestsFilter.java:30)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
   at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
   at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
   at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
   at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:834)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
   at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.base/java.lang.Thread.run(Thread.java:834)

回应

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <soapenv:Fault xmlns:nsIDc08="http://schemas.xmlsoap.org/soap/envelope/">
         <faultcode>nsIDc08:Client</faultcode>
         <faultstring>The service cannot be found for the endpoint reference (EPR) https://localhost:8443/SoapEndpoint/services/HttpsSoap11Endpoint/MainService.MainServiceHttpsSoap11Endpoint/</faultstring>
         <detail/>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

经过一些研究和帮助,找到了解决方案:

Axis2 1.7.0 中出现重大变化 (https://issues.apache.org/jira/browse/AXIS2-5340)

将以下行添加到 axis2.xml 解决了我的问题:

<deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">
  <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
  <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
</deployer>

切换到 Java 11 (https://issues.apache.org/jira/browse/AXIS2-5935) 导致的后续故障可以通过以下方式修复 将 axis2-kernel 更新为 1.7.10-Snapshot

https://repository.apache.org/content/groups/snapshots/org/apache/axis2/axis2-kernel/1.7.10-SNAPSHOT/axis2-kernel-1.7.10-20200607.184936-18.jar

我有同样的问题,我通过在我的 axis2.xml 文件(在 <axisconfig> 中)添加以下行来修复它:

<deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">
    <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
    <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
</deployer>