my dog learned polymorphism*
The moose likes Web Services and the fly likes The service cannot be found for the endpoint reference (EPR) 127.0.0.1/a Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "The service cannot be found for the endpoint reference (EPR) 127.0.0.1/a" Watch "The service cannot be found for the endpoint reference (EPR) 127.0.0.1/a" New topic
Author

The service cannot be found for the endpoint reference (EPR) 127.0.0.1/a

John Smith
Ranch Hand

Joined: Aug 21, 2004
Posts: 48
Hi All:

I need help!!!

I am using axis2-1.5.1, jdk 1.6, eclipse 3.5, and Axis2_Codegen_Wizard_1.3.0 and windows xp.
I used Axis2_Codegen_Wizard_1.3.0 to generate the client stub and proxy.
I get the following error when I tried to call the web service:

package com.ttdev.ss.client;

import java.rmi.RemoteException;
import com.ttdev.ss.client.SimpleServiceStub.ConcatRequest;
import com.ttdev.ss.client.SimpleServiceStub.ConcatResponse;

public class SimpleClient
{
public static void main(String[] args) throws RemoteException
{
try
{
SimpleServiceStub service = new SimpleServiceStub();
ConcatRequest request = new ConcatRequest();
request.setS1("abc");
request.setS2("123");
ConcatResponse response = service.concat(request);
System.out.println(response.getConcatResponse());
}
catch(Exception e)
{
System.out.println("e.getMessage():"+e.getMessage());
}
}

}

Here is my SimpleService.wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="SimpleService" targetNamespace="http://ttdev.com/ss" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://ttdev.com/ss" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xsd:schema targetNamespace="http://ttdev.com/ss">
<xsd:element name="concatRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="s1" type="xsd:string"/>
<xsd:element name="s2" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="concatResponse" type="xsd:string">

</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="concatResponse">
<wsdl:part name="parameters" element="tns:concatResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="concatRequest">
<wsdl:part name="parameters" element="tns:concatRequest">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="SimpleService">
<wsdlperation name="concat">
<wsdl:input message="tns:concatRequest">
</wsdl:input>
<wsdlutput message="tns:concatResponse">
</wsdlutput>
</wsdlperation>
</wsdl:portType>
<wsdl:binding name="SimpleServiceSOAP" type="tns:SimpleService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdlperation name="concat">
<soapperation soapAction="http://ttdev.com/ss/NewOperation"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdlutput>
<soap:body use="literal"/>
</wsdlutput>
</wsdlperation>
</wsdl:binding>
<wsdl:service name="SimpleService">
<wsdl:port name="SimpleServiceSOAP" binding="tns:SimpleServiceSOAP">
<soap:address location="http://localhost:8080/axis2/services/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>


In the dos-prompt, I get the following error message:
[INFO] Listening on port 8080
[ERROR] The service cannot be found for the endpoint reference (EPR) 127.0.0.1/a
xis2/services/
org.apache.axis2.AxisFault: The service cannot be found for the endpoint referen
ce (EPR) 127.0.0.1/axis2/services/
at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPha
se.java:65)
at org.apache.axis2.engine.Phase.invoke(Phase.java:334)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:251)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:160)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq
uest(HTTPTransportUtils.java:167)
at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:26
6)
at org.apache.axis2.transport.http.server.AxisHttpService.doService(Axis
HttpService.java:281)
at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(
AxisHttpService.java:187)
at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpS
erviceProcessor.java:82)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:619)

Thank you for your help!!!

Yours,

John.
shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
[ERROR] The service cannot be found for the endpoint reference (EPR) 127.0.0.1/a
xis2/services/


Says your endpoint url is not correct. It should be something like 127.0.0.1:8080/a
xis2/services/


SCJP 1.5(97%) My Blog
Carlo LF
Greenhorn

Joined: Jan 28, 2009
Posts: 3
I had this problem too with my Axis2 webservices (reported by a BizTalk client). I heavily googled this and didn't find a solution.

Then we saw the strange thing, that the Axis2 generated WSDL (which was the basic information for the BizTalk client), listed a wrong port for the endpoint at element "soap:address location=...". It listed a port, that was used by another Tomcat instance on the same machine, whereas the Axis2 Tomcat was configured (in server.xml) on another port. Then the cause of the problem was clear: the configuration file "axis2.xml" (from axis2/WEB-INF/conf) contained the default ports. So all we had to do was to correctly configure these.

Carlo
Oleg GoodBoy
Greenhorn

Joined: Apr 04, 2011
Posts: 1
Your endpoint must be like: http://localhost:8080/axis2/services/SimpleService
At the end of the EPR you must add service's name (SimpleService - for example)!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The service cannot be found for the endpoint reference (EPR) 127.0.0.1/a
 
Similar Threads
Exception in thread "main" org.apache.axis2.AxisFault: Error in extracting message properties
soap fault return empty <detail> element.
Web Services using AXIS 2
Calling a web service in Axis2
Exception in WSDL2Java