wood burning stoves 2.0*
The moose likes Web Services and the fly likes Calling a web service in Axis2 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 "Calling a web service in Axis2" Watch "Calling a web service in Axis2" New topic
Author

Calling a web service in Axis2

Saathvik Reddy
Ranch Hand

Joined: Jun 03, 2005
Posts: 228
Hi,

I am new to web services. I am trying to make my first web service to work.
I am using Axis2. This example i am trying is from the book 'Developing web services with apache axis2' by Kent Ka Iok Tong. (http://www.agileskills2.org/DWSAA/index.html)

I downloaded the source code and trying to run 'SimpleService' example.
I deployed this service to axis and when i try to run the client it throws:

org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is http://localhost:8080/axis2/services/SimpleService and the WSA Action = http://ttdev.com/ss/NewOperation

I don't know what exactly the problem is. but my wild guess is it has some thing to do with WSDL file.

Here is the WSDL file



Could anyone please clarify me what exactly <soap peration soapAction="http://ttdev.com/ss/NewOperation"/> does? what is NewOperation?

Thanks,
Srikanth.

[ May 29, 2008: Message edited by: Srikanth Reddy ]
[ June 10, 2008: Message edited by: Ulf Dittmer ]
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

Srikanth:
I don't know what exactly the problem is. but my wild guess is it has some thing to do with WSDL file.

The problem will not be in the WSDL, it will be in the deployment of the service.
The error is suggesting that there is no service available with the url http://localhost:8080/axis2/services/SimpleService and soap action http://ttdev.com/ss/NewOperation
The url is the way of identifying a service and the soap action identifies the operation, in your case the service is SimpleServiceSOAP and the operation is concat.
Are you sure the service is properly deployed on axis. What do you get when you enter the url: http://localhost:8080/axis2/services/SimpleService on your browser?


apigee, a better way to API!
aruna sydu
Ranch Hand

Joined: Jan 21, 2008
Posts: 98

Hi Srikanth,

Irrespective of the example , Axis has its own framework to deploy a service where you can access using your standalone or web based client.
The heart of Axis is services XML file which generates WSDL for you
at run time.
To my knowledge,the problem might be
1.your example is not deployed properly as a service into Axis i.e problem with your deployment structure
2.you might be trying to access a operation in the service with a wrong name

try this in your browser http://localhost:8080/axis2/services/SimpleService?wsdl

This should show you a web service definition language if properly deployed

cheers aruna
[ June 10, 2008: Message edited by: Ulf Dittmer ]

Attitude Determines Altitude

SCJP4/SCWCD4/SCDJWS5/Preparing SCEA Part I
NarendraBabu Bandaru
Greenhorn

Joined: May 17, 2008
Posts: 20
If you are correctly deployed the service and the implementation is in your ear or war.
Then please remove the soap action and try it.

Make sure that you have specified the webservice method and end point interface details in some configuration file based on axis.

Thanks,
NAREN
M Anton
Greenhorn

Joined: Dec 01, 2008
Posts: 1
Just went through similar trials trying to get this to work.

The exciting bit is when you create the wsdl and you set the endpoint to http://localhost:8080/axis2/services/

It continues on the next page so the endpoint should really be

http://localhost:8080/axis2/services/SimpleService

(pages 39 -40 of Developing web services with apache axis2).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling a web service in Axis2
 
Similar Threads
org.apache.axis2.AxisFault: http
soap fault return empty <detail> element.
The service cannot be found for the endpoint reference (EPR) 127.0.0.1/a
org.apache.axis2.AxisFault: http
Rampart/Axis2 not generating Security Header.