wood burning stoves 2.0*
The moose likes Web Services and the fly likes Axis fault Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis fault " Watch "Axis fault " New topic
Author

Axis fault

partha naveen
Ranch Hand

Joined: Jul 17, 2008
Posts: 32
Hi,

I am trying to consume a service for which the WSDL is provided using Axis2. When I try to invoke any of the services it gives

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: You do not have the appropriate permissions to call this function.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:You do not have the appropriate permissions to call this function.
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)

I am not sure why I am getting this error. There is a sample PHP file which does the same and running the PHP script creates no problems. The authenticate() service works well though. Thats the only one that works actually, rest all of them triggers this error.

Any idea why is it showing that error? Does it mean these services need some kind of signature when being invoked. I do not see that in the PHP file though.

SAMPLE working PHP code

$client->authenticate($uid,$pwd)
$client->generateResult()

When I do the same in Java I get error for the second step.

Thanks
P
R Srini
Ranch Hand

Joined: Feb 19, 2010
Posts: 215
Hi. I couldn't find other references to this message "You do not have the appropriate permissions to call this function". So I am guessing that it is returned by a custom web service fault. Since the Java code does not do the same thing as the PHP code, then something is different in the SOAP requests sent to the web service. One thing to try is to intercept the SOAP request and response from PHP and Java, examine the requests see what is different between them.

Could it be that the authenticate() function returns a session id or something in the SOAP response, and this id needs to be used in the next request sent by calling generateResults() ?

You can use the SOAP Monitor that comes with Axis to view the SOAP request and response envelopes. If your version of Axis does not have it, then you can use Apache TCPMon
 
Consider Paul's rocket mass heater.
 
subject: Axis fault
 
Similar Threads
Sample Questions for 288 - Need answers
Using web services in Java
Creating Web Services With Apache Axis with more than One Argument
Axis and SAAJ
WSE security authentication problem.