zoukankan      html  css  js  c++  java
  • webService接口发布失败问题

    今天在原有工程上新增加了个webService接口的服务类,但是总提示

    axis2 出错 File "/axis2-web/listSingleService.jsp" not found

    解决步骤如下:

    1.查看url地址书写是否正确

     url访问地址格式为:http://IP地址:端口/工程名称/services/接口方法名称?wsdl

    eg:http://127.0.0.1:8080/Simple/services/SimpleService?wsdl

    2.检查META-INF/services.xml中的配置是否正确

    <service name="接口方法名称,eg:SimpleService">
    <description>
    SimpleService
    </description>
    <parameter name="ServiceObjectSupplier">
    org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier
    </parameter>
    <parameter name="SpringBeanName">
    Spring配置文件中配置的bean名称 eg:simpleServiceImpl
    </parameter>
    <messageReceivers>
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
    class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
    class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
    </messageReceivers>
    </service>

    3.检查spring中配置信息

    <bean id="Spring配置文件中配置的bean名称" class="接口方法完整引用路径"></bean>

    eg:<bean id="simpleServiceImpl" class="front.service.ws.impl.SimpleServiceImpl"></bean>

    4.更新WEB-INF/services/aa.aar文件

    由于新增加了类方法,故需要重新生成aar文件,如果只是在原有类基础上添加接口方法,则不需要更新aa.aar文件

    我的程序之所以没有访问成功,是因为没有更新aar文件,重新生成aar文件后问题得解。

  • 相关阅读:
    MongoDB中常用的find
    MongoDB文档的增删改操作
    我的notepad++
    MongoDB入门知识
    Python基础5-常用模块
    Python基础4
    Python基础3(2017-07-20)
    Python基础2(2017-07-18)
    Python基础1(2017-07-16)
    Python简介(2017-07-16)
  • 原文地址:https://www.cnblogs.com/lin-bear/p/5198295.html
Copyright © 2011-2022 走看看