File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Using Eclipse to create a web service, Axis Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Using Eclipse to create a web service, Axis Exception" Watch "Using Eclipse to create a web service, Axis Exception" New topic
Author

Using Eclipse to create a web service, Axis Exception

Chris Stabler
Greenhorn

Joined: Oct 22, 2009
Posts: 13
hi all,

i am using Eclipse Galileo to create w WSDL from a simple java piece of code. i am using Axis/Tomcat 6.0. File name is Converter.java



once the WSDL is created, everything looks fine. now i need to create the client which i do from eclipse.

I get the following java files in my Converter/src now in my project:

ConverterProxy
ConverterService
ConverterServiceLocator
ConverterSoapBindingStub

i now want to write a simple client to retrieve information if i passed in a Celsius or F value.



i get no errors but when i run the client i get the following error messages:

AxisFault
faultCode: {http://xml.apache.org/axis/}Server.NoEndpoint
faultSubcode:
faultString: No endpoint
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}exceptionNamerg.apache.axis.NoEndPointException
{http://xml.apache.org/axis/}stackTrace:No endpoint
at wtp.ConverterSoapBindingStub.celsiusToFarenheit(ConverterSoapBindingStub.java:103)
at wtp.ConverterClient.main(ConverterClient.java:26)

{http://xml.apache.org/axis/}hostname:src

No endpoint
at wtp.ConverterSoapBindingStub.celsiusToFarenheit(ConverterSoapBindingStub.java:103)
at wtp.ConverterClient.main(ConverterClient.java:26)


I am totally new to web services and have no idea what i am doing. just trying something in the dark. If anyone could offer some help it would be appreciated.

I also noticed that my Converter.java file with the actual code has been changed to:



So i am trying to figure out how it is going to know what functionality is in each of those functions now. Sorry for the noob questions. thanks much in advance.
Chris Stabler
Greenhorn

Joined: Oct 22, 2009
Posts: 13
i noticed that that Stub constructor actually needs a URL and a Service so it can gather an endpoint for the service.



i was able to change the code to get the URL, which is just, "http://localhost:8080/Converter/services/Converter" but i find no where to actually get the service so i am stuck for now.

Updated Code:

shreyansh jain
Greenhorn

Joined: Jun 03, 2010
Posts: 8
Could any one solve this problem because I also have the same problem.

Thanks
Ron Murphy
Greenhorn

Joined: Sep 01, 2011
Posts: 1
Please help,

I have the same problem. When I create a web service client using WTP, I get a package with following files:
MyService_BindingStub.java
MyService_PortType.java
MyService_Service.java
MyService_ServiceLocator.java
MyService_Proxy.java

And?

OK, I generate a class and try to combine my calls like above. What ever I try I end up with the “NoEndPointException”.

Please tell me how to write the WSClient.

Thanks

Ron
mizark rizollins
Greenhorn

Joined: Jan 06, 2012
Posts: 1
should you be using the proxy to actually communicate w/the web service rather than the stub? the proxy will have all the wsdl endpoint information in it already......
sahil nanda
Greenhorn

Joined: Apr 11, 2012
Posts: 2
hi,
service locator creates the endpoint and also execute the actual implementation of web service i.e. the stub will be called from service locator.
service locator actually implements the service which you have created.


do this in your main method.

ConverterServiceLocator testService = new ConverterServiceLocator();
float fah = testService.celsiusToFarenheit (98.4);
System.out.println(fah);


this code should work....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Eclipse to create a web service, Axis Exception