问题描述
您好了创建了一个测试应用程序来学习Axis2。我使用war和afetr部署打包了轴,WSDL也可通过URL访问 - http:// localhost:8081 / SajuAxis2 / test / service / SajuServices.wsdl
Hi created a test application to learn Axis2. I packed the axis with my war and afetr deployment the WSDL is also acessible via URL - http://localhost:8081/SajuAxis2/test/service/SajuServices.wsdl
但是当我尝试使用带有上述URL的客户端存根调用服务时,它无效。
But when I try to invoke the service using client stub with the above URL, it is not working.
SajuServicesStub stub = new SajuServicesStub("http://localhost:8081/SajuAxis2/test/service/SajuServices?wsdl");
但如果我用 http:// localhost:9091替换端点URL /SajuAxis2/SajuService/SajuServices.SajuServicesHttpEndpoint
它正在运行。我正在使用JDK1.6和JBoss。我在metainf的conf中包含了axis2.xml,在 services.xml 中包含了以下内容
But if I replace the endpoint URL with http://localhost:9091/SajuAxis2/SajuService/SajuServices.SajuServicesHttpEndpoint
it is working. I am using JDK1.6 and JBoss. I have included the axis2.xml in conf of metainf and also the services.xml as below
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file was auto-generated from WSDL -->
<!-- by the Apache Axis2 version: 1.5.6 Built on : Aug 30, 2011 (10:00:16 CEST) -->
<serviceGroup>
<service name="SajuServices">
<messageReceivers>
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out" class="service.SajuServicesMessageReceiverInOut"/>
</messageReceivers>
<parameter name="ServiceClass">service.SajuServicesSkeleton</parameter>
<parameter name="useOriginalwsdl">true</parameter>
<parameter name="modifyUserWSDLPortAddress">true</parameter>
<operation name="process" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://service">
<actionMapping>urn:process</actionMapping>
<outputActionMapping>urn:processResponse</outputActionMapping>
<faultActionMapping faultName="RemoteException">urn:processRemoteException</faultActionMapping>
</operation>
</service>
</serviceGroup>
推荐答案
我解决了。这是axis2.xml中的错误配置。我给出了错误的上下文路径。
I solved it. It was a misconfiguration in axis2.xml. I given wrong context path.
<parameter name="servicePath">SimpleService</parameter>
udated to
udated to
<parameter name="servicePath">services</parameter>
这篇关于Axis2 Webservice Fault - 找不到端点引用的服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!