Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis fault " Watch "Axis fault " New topic

Axis fault

partha naveen
Ranch Hand

Joined: Jul 17, 2008
Posts: 32

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: {}Server
faultString: You do not have the appropriate permissions to call this function.
{}stackTrace:You do not have the appropriate permissions to call this function.
at org.apache.axis.message.SOAPFaultBuilder.createFault(
at org.apache.axis.message.SOAPFaultBuilder.endElement(

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


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

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
I agree. Here's the link:
subject: Axis fault
It's not a secret anymore!