Saju
Saju

Reputation: 422

Axis2 Webservice Fault - The service cannot be found for the endpoint reference

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

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");

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>

Upvotes: 1

Views: 25293

Answers (2)

Saju
Saju

Reputation: 422

I solved it. It was a misconfiguration in axis2.xml. I given wrong context path.

<parameter name="servicePath">SimpleService</parameter>

udated to

<parameter name="servicePath">services</parameter>

Upvotes: 1

Ratha
Ratha

Reputation: 9692

You have to provide service endpoint url..Not the wsdl url. You are sending requests to the service to be processed..not to the wsdl.

Upvotes: 0

Related Questions