• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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">
<wsdl:operation name="concat">
<wsdl:input message="tns:concatRequest">
</wsdl:input>
<wsdl:output message="tns:concatResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SimpleServiceSOAP" type="tns:SimpleService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="concat">
<soap:operation soapAction="http://ttdev.com/ss/NewOperation"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</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.
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

[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/
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is solution, add adress WSLD in SimpleServiceStub:

public static void main(String args[]) throws RemoteException {

SimpleServiceStub service = new SimpleServiceStub("http://localhost:8080/axis2/services/SimpleService");
ConcatRequest request = new ConcatRequest();
request.setS1("abc");
request.setS2("123");
ConcatResponse response = service.concat(request);
System.out.println(response.getConcatResponse());
}



I run my me perfectly!!

 
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic