• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Axis fault

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic