Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Eclipse to create a web service, Axis Exception

 
Chris Stabler
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could any one solve this problem because I also have the same problem.

Thanks
 
Ron Murphy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
Petr Hajič
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shreyansh jain wrote:Could any one solve this problem because I also have the same problem.

Thanks


I solved to create client like this:



The most tedious think was to find out every dependendecies, because the generated code by Eclipse is not possible to successfully compile due missing libraries. Very impportant is to check if Web App Libraries is present. Eclipse: Project Properties -> Java Build Path -> Libraries -> Add Library -> Web App Libraries.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic